Update to 1.21
This commit is contained in:
@@ -5,8 +5,8 @@ import com.replaymod.render.blend.data.DMaterial;
|
||||
import com.replaymod.render.blend.data.DPackedFile;
|
||||
import com.replaymod.render.blend.data.DTexture;
|
||||
import de.johni0702.minecraft.gui.versions.Image;
|
||||
import net.minecraft.client.util.GlAllocationUtils;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@@ -25,7 +25,7 @@ public class BlendMaterials {
|
||||
// Read raw image data from GL
|
||||
int width = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, 0, GL11.GL_TEXTURE_WIDTH);
|
||||
int height = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, 0, GL11.GL_TEXTURE_HEIGHT);
|
||||
ByteBuffer buffer = GlAllocationUtils.allocateByteBuffer(width * height * 4);
|
||||
ByteBuffer buffer = BufferUtils.createByteBuffer(width * height * 4);
|
||||
GL11.glGetTexImage(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buffer);
|
||||
|
||||
// Convert to Image
|
||||
|
||||
@@ -5,13 +5,13 @@ 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.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;
|
||||
import org.cakelab.blender.nio.CPointer;
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -39,7 +39,7 @@ public class Util {
|
||||
}
|
||||
}
|
||||
|
||||
private static FloatBuffer floatBuffer = GlAllocationUtils.allocateByteBuffer(16 * 4).asFloatBuffer();
|
||||
private static FloatBuffer floatBuffer = BufferUtils.createByteBuffer(16 * 4).asFloatBuffer();
|
||||
public static Matrix4f getGlMatrix(int matrix) {
|
||||
floatBuffer.clear();
|
||||
//#if MC>=11400
|
||||
|
||||
Reference in New Issue
Block a user