Fix vanilla entity update packet handling (fixes #607)
This commit is contained in:
@@ -13,6 +13,12 @@ import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.render.BufferBuilder;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
//#if MC>=11604
|
||||
//#else
|
||||
//$$ import net.minecraft.entity.Entity;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11600
|
||||
import net.minecraft.resource.ResourcePackSource;
|
||||
@@ -55,7 +61,6 @@ import org.lwjgl.glfw.GLFW;
|
||||
//#if MC>=10904
|
||||
import com.replaymod.render.blend.mixin.ParticleAccessor;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
//#endif
|
||||
|
||||
//#if MC>=10800
|
||||
@@ -297,6 +302,12 @@ public class MCVer {
|
||||
}
|
||||
//#endif
|
||||
|
||||
//#if MC<=11601
|
||||
//$$ public static Vec3d getTrackedPosition(Entity entity) {
|
||||
//$$ return new Vec3d(entity.trackedX, entity.trackedY, entity.trackedZ);
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
public static void openFile(File file) {
|
||||
//#if MC>=11400
|
||||
Util.getOperatingSystem().open(file);
|
||||
|
||||
@@ -21,6 +21,7 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.WorldChunk;
|
||||
|
||||
@@ -563,4 +564,13 @@ class Patterns {
|
||||
return new CrashException(((MinecraftAccessor) mc).getCrashReporter());
|
||||
//#endif
|
||||
}
|
||||
|
||||
@Pattern
|
||||
private static Vec3d getTrackedPosition(Entity entity) {
|
||||
//#if MC>=11604
|
||||
return entity.getTrackedPosition();
|
||||
//#else
|
||||
//$$ return com.replaymod.core.versions.MCVer.getTrackedPosition(entity);
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user