Skip to content

Commit

Permalink
"small" refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiyou06 committed Aug 9, 2024
1 parent 346acf5 commit 3e5edd7
Show file tree
Hide file tree
Showing 42 changed files with 166 additions and 332 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.pathfinder.PathfindingContext;
import net.minecraft.world.level.pathfinder.WalkNodeEvaluator;
import net.minecraft.world.level.pathfinder.BinaryHeap;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.LevelChunkSection;
import net.minecraft.world.level.pathfinder.PathType;
import net.gensokyoreimagined.nitori.mixin.ai.pathing.PathContextAccessor;
import net.gensokyoreimagined.nitori.mixin.unapplied.ai.pathing.PathContextAccessor;

public abstract class PathNodeCache {
private static boolean isChunkSectionDangerousNeighbor(LevelChunkSection section) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//import it.unimi.dsi.fastutil.HashCommon;
//import it.unimi.dsi.fastutil.objects.Reference2IntMap;
//import it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap;
//import net.gensokyoreimagined.nitori.mixin.needs_testing.chunk.palette.PaletteResizeAccessor;
//import net.gensokyoreimagined.nitori.mixin.removed.palette.PaletteResizeAccessor;
//import net.minecraft.network.FriendlyByteBuf;
//import net.minecraft.network.VarInt;
//import net.minecraft.core.IdMap;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Nitori Copyright (C) 2024 Gensokyo Reimagined
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
package net.gensokyoreimagined.nitori.mixin.removed;

//import com.google.common.collect.Lists;
//import net.gensokyoreimagined.nitori.common.util.collections.HashedReferenceList;
//import net.gensokyoreimagined.nitori.common.world.ChunkRandomSource;
//import net.minecraft.core.BlockPos;
//import net.minecraft.world.level.Level;
//import net.minecraft.world.level.block.entity.TickingBlockEntity;
//import org.spongepowered.asm.mixin.Final;
//import org.spongepowered.asm.mixin.Mixin;
//import org.spongepowered.asm.mixin.Mutable;
//import org.spongepowered.asm.mixin.Shadow;
//import org.spongepowered.asm.mixin.injection.At;
//import org.spongepowered.asm.mixin.injection.Inject;
//import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
//
//import java.util.List;
//
//@Mixin(Level.class)
//public class MixinLevel implements ChunkRandomSource {
// // Implementation of 0006-lithium-HashedReferenceList.patch
// @Mutable
// @Final @Shadow
// public List<TickingBlockEntity> blockEntityTickers;
//
// // Implementation of 0006-lithium-HashedReferenceList.patch
// @Mutable
// @Final @Shadow
// private List<TickingBlockEntity> pendingBlockEntityTickers;
//
// @Shadow
// protected int randValue;
//
// // Implementation of 0006-lithium-HashedReferenceList.patch
// @Inject(method = "<init>", at = @At("RETURN"))
// private void onInit(CallbackInfo ci) {
// this.blockEntityTickers = new HashedReferenceList<>(Lists.newArrayList());
// this.pendingBlockEntityTickers = new HashedReferenceList<>(Lists.newArrayList());
// }
//
// @Override
// public void nitori$getRandomPosInChunk(int x, int y, int z, int mask, BlockPos.MutableBlockPos out) {
// this.randValue = this.randValue * 3 + 1013904223;
// int rand = this.randValue >> 2;
// out.set(x + (rand & 15), y + (rand >> 16 & mask), z + (rand >> 8 & 15));
// }
//}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
package net.gensokyoreimagined.nitori.mixin;
package net.gensokyoreimagined.nitori.mixin.removed;

//import org.spongepowered.asm.mixin.Mixin;
//import org.spongepowered.asm.mixin.injection.At;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package net.gensokyoreimagined.nitori.mixin.removed.chunk.palette;

//import org.spongepowered.asm.mixin.Mixin;
//import org.spongepowered.asm.mixin.gen.Invoker;
//
//@Mixin(targets = "net.minecraft.world.level.chunk.PaletteResize")
//public abstract class PaletteResizeAccessor<T> {
// @Invoker
// public abstract int callOnResize(int newBits, T object);
//}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.gensokyoreimagined.nitori.mixin.needs_testing.chunk.palette;
package net.gensokyoreimagined.nitori.mixin.removed.chunk.palette;

// import net.minecraft.core.IdMap;
// import net.minecraft.world.level.chunk.Palette;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.gensokyoreimagined.nitori.mixin.needs_testing.chunk.palette;
package net.gensokyoreimagined.nitori.mixin.removed.chunk.palette;

// import net.gensokyoreimagined.nitori.common.world.chunk.LithiumHashPalette;
// import net.minecraft.core.IdMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.gensokyoreimagined.nitori.mixin.collections.attributes;
package net.gensokyoreimagined.nitori.mixin.removed.collections.attributes;

//import it.unimi.dsi.fastutil.objects.Reference2ReferenceOpenHashMap;
//import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet;
Expand Down
Loading

0 comments on commit 3e5edd7

Please sign in to comment.