Switch core to 1.14 (generated via ./gradlew :1.14:setCoreVersion)
This commit is contained in:
@@ -4,10 +4,10 @@ import de.johni0702.minecraft.gui.utils.lwjgl.vector.Matrix3f;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.vector.Matrix4f;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.vector.Quaternion;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.vector.Vector3f;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.util.GlAllocationUtils;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import org.blender.dna.Link;
|
||||
import org.blender.dna.ListBase;
|
||||
import org.blender.utils.BlenderFactory;
|
||||
@@ -18,7 +18,7 @@ import java.io.IOException;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
//#endif
|
||||
|
||||
public class Util {
|
||||
@@ -39,7 +39,7 @@ public class Util {
|
||||
}
|
||||
}
|
||||
|
||||
private static FloatBuffer floatBuffer = GLAllocation.createDirectFloatBuffer(16);
|
||||
private static FloatBuffer floatBuffer = GlAllocationUtils.allocateFloatBuffer(16);
|
||||
public static Matrix4f getGlMatrix(int matrix) {
|
||||
floatBuffer.clear();
|
||||
//#if MC>=11300
|
||||
@@ -138,16 +138,16 @@ public class Util {
|
||||
|
||||
//#if MC>=10800
|
||||
public static Vector3f getCameraPos() {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
MinecraftClient mc = MinecraftClient.getInstance();
|
||||
//#if MC>=11400
|
||||
//$$ Vec3d pos = mc.getEntityRenderManager().camera.getPos();
|
||||
//$$ return new Vector3f((float) pos.x, (float) pos.y, (float) pos.z);
|
||||
Vec3d pos = mc.getEntityRenderManager().camera.getPos();
|
||||
return new Vector3f((float) pos.x, (float) pos.y, (float) pos.z);
|
||||
//#else
|
||||
return new Vector3f(
|
||||
(float) -mc.getRenderManager().viewerPosX,
|
||||
(float) -mc.getRenderManager().viewerPosY,
|
||||
(float) -mc.getRenderManager().viewerPosZ
|
||||
);
|
||||
//$$ return new Vector3f(
|
||||
//$$ (float) -mc.getRenderManager().viewerPosX,
|
||||
//$$ (float) -mc.getRenderManager().viewerPosY,
|
||||
//$$ (float) -mc.getRenderManager().viewerPosZ
|
||||
//$$ );
|
||||
//#endif
|
||||
}
|
||||
//#endif
|
||||
@@ -182,10 +182,10 @@ public class Util {
|
||||
}
|
||||
}
|
||||
|
||||
public static String getTileEntityId(TileEntity tileEntity) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
public static String getTileEntityId(BlockEntity tileEntity) {
|
||||
CompoundTag nbt = new CompoundTag();
|
||||
//#if MC>=11300
|
||||
tileEntity.write(nbt);
|
||||
tileEntity.toTag(nbt);
|
||||
//#else
|
||||
//$$ tileEntity.writeToNBT(nbt);
|
||||
//#endif
|
||||
|
||||
Reference in New Issue
Block a user