From 3e5edd79e83f7111be629d2a18c4540d41a0eed6 Mon Sep 17 00:00:00 2001 From: Taiyou06 Date: Fri, 9 Aug 2024 14:31:06 +0300 Subject: [PATCH] "small" refactor --- .../common/ai/pathing/PathNodeCache.java | 3 +- .../world/chunk/LithiumHashPalette.java | 2 +- .../mixin/needs_testing/MixinLevel.java | 61 --------- .../chunk/palette/PaletteResizeAccessor.java | 10 -- .../collections/mob_spawning/PoolMixin.java | 40 ------ .../enum_values/LivingEntityMixin.java | 23 ---- .../redirector/RedirectorTransformer.java | 124 ------------------ .../nitori/mixin/removed/MixinLevel.java | 61 +++++++++ .../mixin/{ => removed}/MixinSpongeSIMD.java | 2 +- .../chunk/palette/PaletteResizeAccessor.java | 10 ++ .../PalettedContainerConfigurationMixin.java | 2 +- .../chunk/palette/PalettedContainerMixin.java | 2 +- .../attributes/AttributeContainerMixin.java | 2 +- .../collections/mob_spawning/PoolMixin.java | 40 ++++++ .../enum_values/LivingEntityMixin.java | 23 ++++ .../block_tracking/ChunkSectionMixin.java | 2 +- .../mixin/{ => unapplied}/ChunkMapMixin.java | 2 +- .../{ => unapplied}/MixinServerEntity.java | 2 +- .../{ => unapplied}/MixinServerWorld.java | 12 +- .../{ => unapplied}/MixinWorldGenRegion.java | 21 +-- .../access/IMixinChunkMapAccess.java | 2 +- .../IMixinChunkMap_TrackedEntityAccess.java | 2 +- .../ai/pathing/AbstractBlockStateMixin.java | 2 +- .../ai/pathing/BirdPathNodeMakerMixin.java | 2 +- .../ai/pathing/ChunkCacheMixin.java | 2 +- .../ai/pathing/LandPathNodeMakerMixin.java | 2 +- .../ai/pathing/PathContextAccessor.java | 2 +- .../ai/pathing/PathContextMixin.java | 2 +- .../ai/pathing/TargetPredicateMixin.java | 2 +- .../ai/poi/PointOfInterestSetMixin.java | 2 +- .../ai/poi/PointOfInterestTypesMixin.java | 2 +- .../SecondaryPointsOfInterestSensorMixin.java | 2 +- .../ai/task/launch/BrainMixin.java | 2 +- .../memory_change_counting/BrainMixin.java | 2 +- .../MultiTickTaskMixin.java | 2 +- .../replace_streams/WeightedListMixin.java | 2 +- .../alloc/chunk_random/ServerWorldMixin.java | 2 +- .../ServerChunkManagerMixin.java | 2 +- .../alloc/deep_passengers/EntityMixin.java | 2 +- .../inline_height/WorldChunkMixin.java | 2 +- .../inline_height/WorldMixin.java | 2 +- src/main/resources/mixins.core.json | 12 -- 42 files changed, 166 insertions(+), 332 deletions(-) delete mode 100644 src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/MixinLevel.java delete mode 100644 src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/chunk/palette/PaletteResizeAccessor.java delete mode 100644 src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/collections/mob_spawning/PoolMixin.java delete mode 100644 src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/living_entity/enum_values/LivingEntityMixin.java delete mode 100644 src/main/java/net/gensokyoreimagined/nitori/mixin/redirector/RedirectorTransformer.java create mode 100644 src/main/java/net/gensokyoreimagined/nitori/mixin/removed/MixinLevel.java rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => removed}/MixinSpongeSIMD.java (96%) create mode 100644 src/main/java/net/gensokyoreimagined/nitori/mixin/removed/chunk/palette/PaletteResizeAccessor.java rename src/main/java/net/gensokyoreimagined/nitori/mixin/{needs_testing => removed}/chunk/palette/PalettedContainerConfigurationMixin.java (92%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{needs_testing => removed}/chunk/palette/PalettedContainerMixin.java (98%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => removed}/collections/attributes/AttributeContainerMixin.java (94%) create mode 100644 src/main/java/net/gensokyoreimagined/nitori/mixin/removed/collections/mob_spawning/PoolMixin.java create mode 100644 src/main/java/net/gensokyoreimagined/nitori/mixin/removed/living_entity/enum_values/LivingEntityMixin.java rename src/main/java/net/gensokyoreimagined/nitori/mixin/{needs_testing => removed}/util/block_tracking/ChunkSectionMixin.java (99%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ChunkMapMixin.java (99%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/MixinServerEntity.java (99%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/MixinServerWorld.java (83%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/MixinWorldGenRegion.java (75%) rename src/main/java/net/gensokyoreimagined/nitori/{ => mixin/unapplied}/access/IMixinChunkMapAccess.java (92%) rename src/main/java/net/gensokyoreimagined/nitori/{ => mixin/unapplied}/access/IMixinChunkMap_TrackedEntityAccess.java (94%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/pathing/AbstractBlockStateMixin.java (98%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/pathing/BirdPathNodeMakerMixin.java (94%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/pathing/ChunkCacheMixin.java (98%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/pathing/LandPathNodeMakerMixin.java (98%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/pathing/PathContextAccessor.java (83%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/pathing/PathContextMixin.java (94%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/pathing/TargetPredicateMixin.java (96%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/poi/PointOfInterestSetMixin.java (98%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/poi/PointOfInterestTypesMixin.java (93%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/sensor/secondary_poi/SecondaryPointsOfInterestSensorMixin.java (92%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/task/launch/BrainMixin.java (99%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/task/memory_change_counting/BrainMixin.java (95%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/task/memory_change_counting/MultiTickTaskMixin.java (96%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/ai/task/replace_streams/WeightedListMixin.java (89%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/alloc/chunk_random/ServerWorldMixin.java (97%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{ => unapplied}/alloc/chunk_ticking/ServerChunkManagerMixin.java (96%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{needs_testing => unapplied}/alloc/deep_passengers/EntityMixin.java (97%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{needs_testing => unapplied}/inline_height/WorldChunkMixin.java (95%) rename src/main/java/net/gensokyoreimagined/nitori/mixin/{needs_testing => unapplied}/inline_height/WorldMixin.java (97%) diff --git a/src/main/java/net/gensokyoreimagined/nitori/common/ai/pathing/PathNodeCache.java b/src/main/java/net/gensokyoreimagined/nitori/common/ai/pathing/PathNodeCache.java index 6ac7680..adb6050 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/common/ai/pathing/PathNodeCache.java +++ b/src/main/java/net/gensokyoreimagined/nitori/common/ai/pathing/PathNodeCache.java @@ -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) { diff --git a/src/main/java/net/gensokyoreimagined/nitori/common/world/chunk/LithiumHashPalette.java b/src/main/java/net/gensokyoreimagined/nitori/common/world/chunk/LithiumHashPalette.java index d73bfd1..add853d 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/common/world/chunk/LithiumHashPalette.java +++ b/src/main/java/net/gensokyoreimagined/nitori/common/world/chunk/LithiumHashPalette.java @@ -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; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/MixinLevel.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/MixinLevel.java deleted file mode 100644 index 0bad6c1..0000000 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/MixinLevel.java +++ /dev/null @@ -1,61 +0,0 @@ -// 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 . -package net.gensokyoreimagined.nitori.mixin.needs_testing; - -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 blockEntityTickers; - - // Implementation of 0006-lithium-HashedReferenceList.patch - @Mutable - @Final @Shadow - private List pendingBlockEntityTickers; - - @Shadow - protected int randValue; - - // Implementation of 0006-lithium-HashedReferenceList.patch - @Inject(method = "", 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)); - } -} diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/chunk/palette/PaletteResizeAccessor.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/chunk/palette/PaletteResizeAccessor.java deleted file mode 100644 index 12e075f..0000000 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/chunk/palette/PaletteResizeAccessor.java +++ /dev/null @@ -1,10 +0,0 @@ -package net.gensokyoreimagined.nitori.mixin.needs_testing.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 { - @Invoker - public abstract int callOnResize(int newBits, T object); -} diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/collections/mob_spawning/PoolMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/collections/mob_spawning/PoolMixin.java deleted file mode 100644 index 6ca65db..0000000 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/collections/mob_spawning/PoolMixin.java +++ /dev/null @@ -1,40 +0,0 @@ -package net.gensokyoreimagined.nitori.mixin.needs_testing.collections.mob_spawning; - -import com.google.common.collect.ImmutableList; -import net.gensokyoreimagined.nitori.common.util.collections.HashedReferenceList; -import net.minecraft.util.random.WeightedRandomList; -import net.minecraft.util.random.WeightedEntry; -import org.spongepowered.asm.mixin.*; -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.Collections; -import java.util.List; - -@Mixin(WeightedRandomList.class) -public class PoolMixin { - - @Mutable - @Shadow - @Final - private ImmutableList items; - //Need a separate variable due to entries being type ImmutableList - @Unique - private List entryHashList; - - @Inject(method = "", at = @At("RETURN")) - private void init(List entries, CallbackInfo ci) { - //We are using reference equality here, because all vanilla implementations of Weighted use reference equality - this.entryHashList = this.items.size() > 4 ? Collections.unmodifiableList(new HashedReferenceList<>(this.items)) : this.items; - } - - /** - * @author 2No2Name - * @reason return a collection with a faster contains() call - */ - @Overwrite - public List unwrap() { - return this.entryHashList; - } -} \ No newline at end of file diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/living_entity/enum_values/LivingEntityMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/living_entity/enum_values/LivingEntityMixin.java deleted file mode 100644 index 570d7d6..0000000 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/living_entity/enum_values/LivingEntityMixin.java +++ /dev/null @@ -1,23 +0,0 @@ -package net.gensokyoreimagined.nitori.mixin.needs_testing.living_entity.enum_values; - -import net.gensokyoreimagined.nitori.common.util.EquipmentSlotConstants; -import net.minecraft.world.entity.EquipmentSlot; -import net.minecraft.world.entity.LivingEntity; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -@Mixin(LivingEntity.class) -public class LivingEntityMixin { - - @Redirect( - method = "collectEquipmentChanges", - at = @At( - value = "INVOKE", - target = "Lnet/minecraft/world/entity/EquipmentSlot;values()[Lnet/minecraft/world/entity/EquipmentSlot;" - ) - ) - private EquipmentSlot[] removeAllocation() { - return EquipmentSlotConstants.ALL; - } -} \ No newline at end of file diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/redirector/RedirectorTransformer.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/redirector/RedirectorTransformer.java deleted file mode 100644 index 3ae1e2c..0000000 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/redirector/RedirectorTransformer.java +++ /dev/null @@ -1,124 +0,0 @@ -package net.gensokyoreimagined.nitori.mixin.redirector; - -// https://github.com/MCTeamPotato/Redirector/issues/9 - - - -//import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; -//import org.jetbrains.annotations.Contract; -//import org.jetbrains.annotations.NotNull; -//import org.objectweb.asm.ClassReader; -//import org.objectweb.asm.ClassWriter; -//import org.objectweb.asm.Opcodes; -//import org.objectweb.asm.tree.AbstractInsnNode; -//import org.objectweb.asm.tree.ClassNode; -//import org.objectweb.asm.tree.InsnList; -//import org.objectweb.asm.tree.MethodNode; -// -//import java.lang.instrument.ClassFileTransformer; -//import java.security.ProtectionDomain; -//import java.util.ListIterator; -//import java.util.Map; -// -//public class RedirectorTransformer implements ClassFileTransformer { -// public static @NotNull String getSuperClass(byte[] clazz) { -// Map utfMap = new Int2IntOpenHashMap(); -// Map classMap = new Int2IntOpenHashMap(); -// int constantsCount = readUnsignedShort(clazz, 8); -// int passcount = 10; -// for (int i = 1; i < constantsCount; i++) { -// int size; -// switch (clazz[passcount]) { -// case 9: -// case 10: -// case 11: -// case 3: -// case 4: -// case 12: -// case 18: -// size = 5; -// break; -// case 5: -// case 6: -// size = 9; -// break; -// case 1://UTF8 -// int UTFSize = readUnsignedShort(clazz, passcount + 1); -// size = 3 + UTFSize; -// utfMap.put(i, passcount); -// break; -// case 15: -// size = 4; -// break; -// case 7://class -// size = 3; -// int index = readUnsignedShort(clazz, passcount + 1); -// classMap.put(i, index); -// break; -// default: -// size = 3; -// break; -// } -// passcount += size; -// -// } -// passcount += 4; -// passcount = readUnsignedShort(clazz, passcount); -// passcount = classMap.get(passcount); -// passcount = utfMap.get(passcount); -// int UTFSize = readUnsignedShort(clazz, passcount + 1); -// return readUTF8(clazz, passcount + 3, UTFSize); -// } -// -// @Contract(pure = true) -// public static int readUnsignedShort(byte @NotNull [] b, int index) { -// return ((b[index] & 0xFF) << 8) | (b[index + 1] & 0xFF); -// } -// -// @Contract(value = "_, _, _ -> new", pure = true) -// public static @NotNull String readUTF8(byte[] b, int index, int length) { -// char[] str = new char[length]; -// for (int i = 0; i < length; i++) { -// str[i] = (char) b[i + index]; -// } -// return new String(str); -// } -// -// @Override -// public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] basicClass) { -// try { -// String superClass = getSuperClass(basicClass); -// if (!"java/lang/Enum".equals(superClass)) return basicClass; -// ClassReader classReader = new ClassReader(basicClass); -// if ("java/lang/Enum".equals(classReader.getSuperName())) { -// ClassNode cn = new ClassNode(); -// classReader.accept(cn, 0); -// for (MethodNode mn : cn.methods) { -// if ("values".equals(mn.name) && mn.desc.contains("()")) { -// InsnList il = mn.instructions; -// ListIterator iterator = il.iterator(); -// AbstractInsnNode n1 = null; -// AbstractInsnNode n2 = null; -// while (iterator.hasNext()) { -// AbstractInsnNode note = iterator.next(); -// if (Opcodes.GETSTATIC == note.getOpcode()) { -// n1 = note; -// } else if (Opcodes.ARETURN == note.getOpcode()) { -// n2 = note; -// } -// } -// il.clear(); -// il.add(n1); -// il.add(n2); -// } -// } -// ClassWriter classWriter = new ClassWriter(classReader, ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS); -// cn.accept(classWriter); -// return classWriter.toByteArray(); -// } -// } catch (Exception e) { -// return basicClass; -// } -// return basicClass; -// } -//} \ No newline at end of file diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/MixinLevel.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/MixinLevel.java new file mode 100644 index 0000000..cb89cea --- /dev/null +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/MixinLevel.java @@ -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 . +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 blockEntityTickers; +// +// // Implementation of 0006-lithium-HashedReferenceList.patch +// @Mutable +// @Final @Shadow +// private List pendingBlockEntityTickers; +// +// @Shadow +// protected int randValue; +// +// // Implementation of 0006-lithium-HashedReferenceList.patch +// @Inject(method = "", 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)); +// } +//} diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/MixinSpongeSIMD.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/MixinSpongeSIMD.java similarity index 96% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/MixinSpongeSIMD.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/removed/MixinSpongeSIMD.java index 011a1b2..fe4f862 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/MixinSpongeSIMD.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/MixinSpongeSIMD.java @@ -12,7 +12,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package net.gensokyoreimagined.nitori.mixin; +package net.gensokyoreimagined.nitori.mixin.removed; //import org.spongepowered.asm.mixin.Mixin; //import org.spongepowered.asm.mixin.injection.At; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/chunk/palette/PaletteResizeAccessor.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/chunk/palette/PaletteResizeAccessor.java new file mode 100644 index 0000000..cc58da0 --- /dev/null +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/chunk/palette/PaletteResizeAccessor.java @@ -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 { +// @Invoker +// public abstract int callOnResize(int newBits, T object); +//} diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/chunk/palette/PalettedContainerConfigurationMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/chunk/palette/PalettedContainerConfigurationMixin.java similarity index 92% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/chunk/palette/PalettedContainerConfigurationMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/removed/chunk/palette/PalettedContainerConfigurationMixin.java index 9446cbb..61c5c07 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/chunk/palette/PalettedContainerConfigurationMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/chunk/palette/PalettedContainerConfigurationMixin.java @@ -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; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/chunk/palette/PalettedContainerMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/chunk/palette/PalettedContainerMixin.java similarity index 98% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/chunk/palette/PalettedContainerMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/removed/chunk/palette/PalettedContainerMixin.java index b895c3e..0d044a0 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/chunk/palette/PalettedContainerMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/chunk/palette/PalettedContainerMixin.java @@ -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; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/collections/attributes/AttributeContainerMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/collections/attributes/AttributeContainerMixin.java similarity index 94% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/collections/attributes/AttributeContainerMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/removed/collections/attributes/AttributeContainerMixin.java index c19b7ac..94acb62 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/collections/attributes/AttributeContainerMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/collections/attributes/AttributeContainerMixin.java @@ -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; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/collections/mob_spawning/PoolMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/collections/mob_spawning/PoolMixin.java new file mode 100644 index 0000000..df26457 --- /dev/null +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/collections/mob_spawning/PoolMixin.java @@ -0,0 +1,40 @@ +package net.gensokyoreimagined.nitori.mixin.removed.collections.mob_spawning; + +//import com.google.common.collect.ImmutableList; +//import net.gensokyoreimagined.nitori.common.util.collections.HashedReferenceList; +//import net.minecraft.util.random.WeightedRandomList; +//import net.minecraft.util.random.WeightedEntry; +//import org.spongepowered.asm.mixin.*; +//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.Collections; +//import java.util.List; +// +//@Mixin(WeightedRandomList.class) +//public class PoolMixin { +// +// @Mutable +// @Shadow +// @Final +// private ImmutableList items; +// //Need a separate variable due to entries being type ImmutableList +// @Unique +// private List entryHashList; +// +// @Inject(method = "", at = @At("RETURN")) +// private void init(List entries, CallbackInfo ci) { +// //We are using reference equality here, because all vanilla implementations of Weighted use reference equality +// this.entryHashList = this.items.size() > 4 ? Collections.unmodifiableList(new HashedReferenceList<>(this.items)) : this.items; +// } +// +// /** +// * @author 2No2Name +// * @reason return a collection with a faster contains() call +// */ +// @Overwrite +// public List unwrap() { +// return this.entryHashList; +// } +//} \ No newline at end of file diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/living_entity/enum_values/LivingEntityMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/living_entity/enum_values/LivingEntityMixin.java new file mode 100644 index 0000000..885da9b --- /dev/null +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/living_entity/enum_values/LivingEntityMixin.java @@ -0,0 +1,23 @@ +package net.gensokyoreimagined.nitori.mixin.removed.living_entity.enum_values; + +//import net.gensokyoreimagined.nitori.common.util.EquipmentSlotConstants; +//import net.minecraft.world.entity.EquipmentSlot; +//import net.minecraft.world.entity.LivingEntity; +//import org.spongepowered.asm.mixin.Mixin; +//import org.spongepowered.asm.mixin.injection.At; +//import org.spongepowered.asm.mixin.injection.Redirect; +// +//@Mixin(LivingEntity.class) +//public class LivingEntityMixin { +// +// @Redirect( +// method = "collectEquipmentChanges", +// at = @At( +// value = "INVOKE", +// target = "Lnet/minecraft/world/entity/EquipmentSlot;values()[Lnet/minecraft/world/entity/EquipmentSlot;" +// ) +// ) +// private EquipmentSlot[] removeAllocation() { +// return EquipmentSlotConstants.ALL; +// } +//} \ No newline at end of file diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/util/block_tracking/ChunkSectionMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/util/block_tracking/ChunkSectionMixin.java similarity index 99% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/util/block_tracking/ChunkSectionMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/removed/util/block_tracking/ChunkSectionMixin.java index 92feef0..3bf4c91 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/util/block_tracking/ChunkSectionMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/removed/util/block_tracking/ChunkSectionMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.needs_testing.util.block_tracking; +package net.gensokyoreimagined.nitori.mixin.removed.util.block_tracking; //import net.gensokyoreimagined.nitori.common.block.*; //import net.gensokyoreimagined.nitori.common.entity.block_tracking.ChunkSectionChangeCallback; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ChunkMapMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ChunkMapMixin.java similarity index 99% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ChunkMapMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ChunkMapMixin.java index 3ff77fa..a1acb6b 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ChunkMapMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ChunkMapMixin.java @@ -12,7 +12,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package net.gensokyoreimagined.nitori.mixin; +package net.gensokyoreimagined.nitori.mixin.unapplied; //import ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel; //import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/MixinServerEntity.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/MixinServerEntity.java similarity index 99% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/MixinServerEntity.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/MixinServerEntity.java index 4ede944..add80c2 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/MixinServerEntity.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/MixinServerEntity.java @@ -12,7 +12,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package net.gensokyoreimagined.nitori.mixin; +package net.gensokyoreimagined.nitori.mixin.unapplied; //import com.google.common.collect.Lists; //import com.llamalad7.mixinextras.sugar.Local; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/MixinServerWorld.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/MixinServerWorld.java similarity index 83% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/MixinServerWorld.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/MixinServerWorld.java index dfb2b03..cb29dc4 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/MixinServerWorld.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/MixinServerWorld.java @@ -12,17 +12,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package net.gensokyoreimagined.nitori.mixin; - -import net.gensokyoreimagined.nitori.common.world.ChunkRandomSource; -import net.minecraft.core.BlockPos; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.util.RandomSource; -import net.minecraft.world.level.block.state.BlockState; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; +package net.gensokyoreimagined.nitori.mixin.unapplied; // Taken from Lithium // https://github.com/CaffeineMC/lithium-fabric/blob/427dd75ffc922cc1858c1db4b283cc54744567e0/src/main/java/me/jellysquid/mods/lithium/mixin/alloc/chunk_random/ServerWorldMixin.java#L24 diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/MixinWorldGenRegion.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/MixinWorldGenRegion.java similarity index 75% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/MixinWorldGenRegion.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/MixinWorldGenRegion.java index 229e8fb..f1e4da4 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/MixinWorldGenRegion.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/MixinWorldGenRegion.java @@ -12,26 +12,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package net.gensokyoreimagined.nitori.mixin; - -import net.gensokyoreimagined.nitori.common.util.Pos; -import net.minecraft.core.BlockPos; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.server.level.WorldGenRegion; -import net.minecraft.world.level.ChunkPos; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.chunk.ChunkAccess; -import net.minecraft.world.level.chunk.status.ChunkStatus; -import org.spongepowered.asm.mixin.Final; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import java.util.List; +package net.gensokyoreimagined.nitori.mixin.unapplied; //@Mixin(WorldGenRegion.class) //public class MixinWorldGenRegion { diff --git a/src/main/java/net/gensokyoreimagined/nitori/access/IMixinChunkMapAccess.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/access/IMixinChunkMapAccess.java similarity index 92% rename from src/main/java/net/gensokyoreimagined/nitori/access/IMixinChunkMapAccess.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/access/IMixinChunkMapAccess.java index 63662ce..b8429da 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/access/IMixinChunkMapAccess.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/access/IMixinChunkMapAccess.java @@ -12,7 +12,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package net.gensokyoreimagined.nitori.access; +package net.gensokyoreimagined.nitori.mixin.unapplied.access; //public interface IMixinChunkMapAccess { // void gensouHacks$runOnTrackerMainThread(final Runnable runnable); diff --git a/src/main/java/net/gensokyoreimagined/nitori/access/IMixinChunkMap_TrackedEntityAccess.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/access/IMixinChunkMap_TrackedEntityAccess.java similarity index 94% rename from src/main/java/net/gensokyoreimagined/nitori/access/IMixinChunkMap_TrackedEntityAccess.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/access/IMixinChunkMap_TrackedEntityAccess.java index e3c7760..67470ee 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/access/IMixinChunkMap_TrackedEntityAccess.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/access/IMixinChunkMap_TrackedEntityAccess.java @@ -12,7 +12,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package net.gensokyoreimagined.nitori.access; +package net.gensokyoreimagined.nitori.mixin.unapplied.access; //import net.minecraft.server.level.ServerPlayer; //import net.minecraft.world.entity.Entity; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/AbstractBlockStateMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/AbstractBlockStateMixin.java similarity index 98% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/AbstractBlockStateMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/AbstractBlockStateMixin.java index 06084d2..7706116 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/AbstractBlockStateMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/AbstractBlockStateMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.pathing; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.pathing; import net.gensokyoreimagined.nitori.common.ai.pathing.BlockStatePathingCache; import net.gensokyoreimagined.nitori.common.world.blockview.SingleBlockBlockView; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/BirdPathNodeMakerMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/BirdPathNodeMakerMixin.java similarity index 94% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/BirdPathNodeMakerMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/BirdPathNodeMakerMixin.java index fd7a414..9a921cb 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/BirdPathNodeMakerMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/BirdPathNodeMakerMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.pathing; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.pathing; //import net.gensokyoreimagined.nitori.common.ai.pathing.PathNodeCache; //import net.minecraft.world.level.pathfinder.FlyNodeEvaluator; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/ChunkCacheMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/ChunkCacheMixin.java similarity index 98% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/ChunkCacheMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/ChunkCacheMixin.java index 53847ce..68b621e 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/ChunkCacheMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/ChunkCacheMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.pathing; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.pathing; import net.gensokyoreimagined.nitori.common.util.Pos; import net.minecraft.world.level.block.state.BlockState; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/LandPathNodeMakerMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/LandPathNodeMakerMixin.java similarity index 98% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/LandPathNodeMakerMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/LandPathNodeMakerMixin.java index ab9766c..3f1ca85 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/LandPathNodeMakerMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/LandPathNodeMakerMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.pathing; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.pathing; //import net.gensokyoreimagined.nitori.common.ai.pathing.PathNodeCache; //import net.minecraft.world.level.block.state.BlockState; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/PathContextAccessor.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/PathContextAccessor.java similarity index 83% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/PathContextAccessor.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/PathContextAccessor.java index 92d5bce..93708e4 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/PathContextAccessor.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/PathContextAccessor.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.pathing; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.pathing; import net.minecraft.core.BlockPos; import net.minecraft.world.level.pathfinder.PathfindingContext; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/PathContextMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/PathContextMixin.java similarity index 94% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/PathContextMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/PathContextMixin.java index 7ab990d..7877032 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/PathContextMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/PathContextMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.pathing; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.pathing; import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/TargetPredicateMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/TargetPredicateMixin.java similarity index 96% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/TargetPredicateMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/TargetPredicateMixin.java index 6afb743..ec8d8fe 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/pathing/TargetPredicateMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/pathing/TargetPredicateMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.pathing; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.pathing; import com.llamalad7.mixinextras.sugar.Share; import com.llamalad7.mixinextras.sugar.ref.LocalDoubleRef; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/poi/PointOfInterestSetMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/poi/PointOfInterestSetMixin.java similarity index 98% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/poi/PointOfInterestSetMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/poi/PointOfInterestSetMixin.java index 3886b69..56c7395 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/poi/PointOfInterestSetMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/poi/PointOfInterestSetMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.poi; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.poi; import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import it.unimi.dsi.fastutil.objects.Reference2ReferenceMap; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/poi/PointOfInterestTypesMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/poi/PointOfInterestTypesMixin.java similarity index 93% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/poi/PointOfInterestTypesMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/poi/PointOfInterestTypesMixin.java index 45e2ad1..9b3450a 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/poi/PointOfInterestTypesMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/poi/PointOfInterestTypesMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.poi; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.poi; import it.unimi.dsi.fastutil.objects.Reference2ReferenceOpenHashMap; import net.gensokyoreimagined.nitori.common.world.interests.types.PointOfInterestTypeHelper; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/sensor/secondary_poi/SecondaryPointsOfInterestSensorMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/sensor/secondary_poi/SecondaryPointsOfInterestSensorMixin.java similarity index 92% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/sensor/secondary_poi/SecondaryPointsOfInterestSensorMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/sensor/secondary_poi/SecondaryPointsOfInterestSensorMixin.java index 7309847..35319c6 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/sensor/secondary_poi/SecondaryPointsOfInterestSensorMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/sensor/secondary_poi/SecondaryPointsOfInterestSensorMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.sensor.secondary_poi; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.sensor.secondary_poi; import net.minecraft.world.entity.ai.memory.MemoryModuleType; import net.minecraft.world.entity.ai.sensing.SecondaryPoiSensor; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/launch/BrainMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/launch/BrainMixin.java similarity index 99% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/launch/BrainMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/launch/BrainMixin.java index c0a7249..7b34859 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/launch/BrainMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/launch/BrainMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.task.launch; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.task.launch; import com.google.common.collect.ImmutableList; import it.unimi.dsi.fastutil.objects.ObjectArrayList; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/memory_change_counting/BrainMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/memory_change_counting/BrainMixin.java similarity index 95% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/memory_change_counting/BrainMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/memory_change_counting/BrainMixin.java index c5273dd..656db6e 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/memory_change_counting/BrainMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/memory_change_counting/BrainMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.task.memory_change_counting; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.task.memory_change_counting; import net.gensokyoreimagined.nitori.common.ai.MemoryModificationCounter; import net.minecraft.world.entity.ai.Brain; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/memory_change_counting/MultiTickTaskMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/memory_change_counting/MultiTickTaskMixin.java similarity index 96% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/memory_change_counting/MultiTickTaskMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/memory_change_counting/MultiTickTaskMixin.java index ac0b19d..e449367 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/memory_change_counting/MultiTickTaskMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/memory_change_counting/MultiTickTaskMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.task.memory_change_counting; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.task.memory_change_counting; import it.unimi.dsi.fastutil.objects.ObjectIterator; import it.unimi.dsi.fastutil.objects.Reference2ObjectMap; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/replace_streams/WeightedListMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/replace_streams/WeightedListMixin.java similarity index 89% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/replace_streams/WeightedListMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/replace_streams/WeightedListMixin.java index 7600a10..b1dbad6 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/ai/task/replace_streams/WeightedListMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/ai/task/replace_streams/WeightedListMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.ai.task.replace_streams; +package net.gensokyoreimagined.nitori.mixin.unapplied.ai.task.replace_streams; import net.gensokyoreimagined.nitori.common.ai.WeightedListIterable; import net.minecraft.world.entity.ai.behavior.ShufflingList; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/alloc/chunk_random/ServerWorldMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/alloc/chunk_random/ServerWorldMixin.java similarity index 97% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/alloc/chunk_random/ServerWorldMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/alloc/chunk_random/ServerWorldMixin.java index 0298377..1665522 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/alloc/chunk_random/ServerWorldMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/alloc/chunk_random/ServerWorldMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.alloc.chunk_random; +package net.gensokyoreimagined.nitori.mixin.unapplied.alloc.chunk_random; //import net.gensokyoreimagined.nitori.common.world.ChunkRandomSource; //import net.minecraft.world.level.block.state.BlockState; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/alloc/chunk_ticking/ServerChunkManagerMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/alloc/chunk_ticking/ServerChunkManagerMixin.java similarity index 96% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/alloc/chunk_ticking/ServerChunkManagerMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/alloc/chunk_ticking/ServerChunkManagerMixin.java index f0c3c8a..9ade6ba 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/alloc/chunk_ticking/ServerChunkManagerMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/alloc/chunk_ticking/ServerChunkManagerMixin.java @@ -12,7 +12,7 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package net.gensokyoreimagined.nitori.mixin.alloc.chunk_ticking; +package net.gensokyoreimagined.nitori.mixin.unapplied.alloc.chunk_ticking; //import net.minecraft.server.level.ChunkHolder; //import net.minecraft.server.level.ServerChunkCache; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/alloc/deep_passengers/EntityMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/alloc/deep_passengers/EntityMixin.java similarity index 97% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/alloc/deep_passengers/EntityMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/alloc/deep_passengers/EntityMixin.java index 65c6794..0ae1d6a 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/alloc/deep_passengers/EntityMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/alloc/deep_passengers/EntityMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.needs_testing.alloc.deep_passengers; +package net.gensokyoreimagined.nitori.mixin.unapplied.alloc.deep_passengers; import com.google.common.collect.ImmutableList; import net.minecraft.world.entity.Entity; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/inline_height/WorldChunkMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/inline_height/WorldChunkMixin.java similarity index 95% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/inline_height/WorldChunkMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/inline_height/WorldChunkMixin.java index 0c78040..e2d46dd 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/inline_height/WorldChunkMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/inline_height/WorldChunkMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.needs_testing.inline_height; +package net.gensokyoreimagined.nitori.mixin.unapplied.inline_height; //import net.minecraft.core.BlockPos; //import net.minecraft.world.level.LevelHeightAccessor; diff --git a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/inline_height/WorldMixin.java b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/inline_height/WorldMixin.java similarity index 97% rename from src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/inline_height/WorldMixin.java rename to src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/inline_height/WorldMixin.java index e235d79..6f57492 100644 --- a/src/main/java/net/gensokyoreimagined/nitori/mixin/needs_testing/inline_height/WorldMixin.java +++ b/src/main/java/net/gensokyoreimagined/nitori/mixin/unapplied/inline_height/WorldMixin.java @@ -1,4 +1,4 @@ -package net.gensokyoreimagined.nitori.mixin.needs_testing.inline_height; +package net.gensokyoreimagined.nitori.mixin.unapplied.inline_height; //import net.minecraft.core.RegistryAccess; //import net.minecraft.resources.ResourceKey; diff --git a/src/main/resources/mixins.core.json b/src/main/resources/mixins.core.json index 5de393d..75509d9 100755 --- a/src/main/resources/mixins.core.json +++ b/src/main/resources/mixins.core.json @@ -18,18 +18,6 @@ "MixinPlayerList", "MixinReobfServer", "MixinServerBossEvent", - "ai.sensor.secondary_poi.SecondaryPointsOfInterestSensorMixin", - "ai.pathing.PathContextAccessor", - "ai.poi.PointOfInterestSetMixin", - "ai.poi.PointOfInterestTypesMixin", - "ai.task.replace_streams.WeightedListMixin", - "ai.task.launch.BrainMixin", - "ai.task.memory_change_counting.BrainMixin", - "ai.task.memory_change_counting.MultiTickTaskMixin", - "ai.pathing.AbstractBlockStateMixin", - "ai.pathing.PathContextMixin", - "ai.pathing.ChunkCacheMixin", - "ai.pathing.TargetPredicateMixin", "alloc.blockstate.StateMixin", "alloc.composter.ComposterMixin$ComposterBlockComposterInventoryMixin", "alloc.composter.ComposterMixin$ComposterBlockDummyInventoryMixin",