"small" refactor
This commit is contained in:
@@ -9,13 +9,12 @@ import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
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) {
|
||||
|
||||
@@ -4,7 +4,7 @@ package net.gensokyoreimagined.nitori.common.world.chunk;
|
||||
//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;
|
||||
|
||||
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
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<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));
|
||||
}
|
||||
}
|
||||
@@ -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<T> {
|
||||
@Invoker
|
||||
public abstract int callOnResize(int newBits, T object);
|
||||
}
|
||||
@@ -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<E extends WeightedEntry> {
|
||||
|
||||
@Mutable
|
||||
@Shadow
|
||||
@Final
|
||||
private ImmutableList<E> items;
|
||||
//Need a separate variable due to entries being type ImmutableList
|
||||
@Unique
|
||||
private List<E> entryHashList;
|
||||
|
||||
@Inject(method = "<init>", at = @At("RETURN"))
|
||||
private void init(List<? extends E> 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<E> unwrap() {
|
||||
return this.entryHashList;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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<Integer, Integer> utfMap = new Int2IntOpenHashMap();
|
||||
// Map<Integer, Integer> 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<AbstractInsnNode> 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;
|
||||
// }
|
||||
//}
|
||||
@@ -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));
|
||||
// }
|
||||
//}
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
//}
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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<E extends WeightedEntry> {
|
||||
//
|
||||
// @Mutable
|
||||
// @Shadow
|
||||
// @Final
|
||||
// private ImmutableList<E> items;
|
||||
// //Need a separate variable due to entries being type ImmutableList
|
||||
// @Unique
|
||||
// private List<E> entryHashList;
|
||||
//
|
||||
// @Inject(method = "<init>", at = @At("RETURN"))
|
||||
// private void init(List<? extends E> 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<E> unwrap() {
|
||||
// return this.entryHashList;
|
||||
// }
|
||||
//}
|
||||
@@ -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;
|
||||
// }
|
||||
//}
|
||||
@@ -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;
|
||||
@@ -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.unapplied;
|
||||
|
||||
//import ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel;
|
||||
//import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap;
|
||||
@@ -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.unapplied;
|
||||
|
||||
//import com.google.common.collect.Lists;
|
||||
//import com.llamalad7.mixinextras.sugar.Local;
|
||||
@@ -12,17 +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;
|
||||
|
||||
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
|
||||
@@ -12,26 +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;
|
||||
|
||||
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 {
|
||||
@@ -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.access;
|
||||
package net.gensokyoreimagined.nitori.mixin.unapplied.access;
|
||||
|
||||
//public interface IMixinChunkMapAccess {
|
||||
// void gensouHacks$runOnTrackerMainThread(final Runnable runnable);
|
||||
@@ -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.access;
|
||||
package net.gensokyoreimagined.nitori.mixin.unapplied.access;
|
||||
|
||||
//import net.minecraft.server.level.ServerPlayer;
|
||||
//import net.minecraft.world.entity.Entity;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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.alloc.chunk_ticking;
|
||||
package net.gensokyoreimagined.nitori.mixin.unapplied.alloc.chunk_ticking;
|
||||
|
||||
//import net.minecraft.server.level.ChunkHolder;
|
||||
//import net.minecraft.server.level.ServerChunkCache;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user