From 7208c2c0597a08e4a9a2d675cd0ce6357589569d Mon Sep 17 00:00:00 2001 From: Chicken Bones Date: Mon, 1 Oct 2012 11:10:09 +1000 Subject: [PATCH] Add some of the model subsystem to the server. The part that doesn't require openGL. This allows for systems that dual models as collision/selection boxes etc. --- .../net/minecraft/src/ModelBase.java.patch | 10 +++++ .../net/minecraft/src/ModelBox.java.patch | 18 ++++++++ .../minecraft/src/ModelRenderer.java.patch | 44 +++++++++++++++++++ .../src/PositionTextureVertex.java.patch | 10 +++++ .../net/minecraft/src/TexturedQuad.java.patch | 10 +++++ 5 files changed, 92 insertions(+) create mode 100644 patches/minecraft/net/minecraft/src/ModelBase.java.patch create mode 100644 patches/minecraft/net/minecraft/src/ModelBox.java.patch create mode 100644 patches/minecraft/net/minecraft/src/ModelRenderer.java.patch create mode 100644 patches/minecraft/net/minecraft/src/PositionTextureVertex.java.patch create mode 100644 patches/minecraft/net/minecraft/src/TexturedQuad.java.patch diff --git a/patches/minecraft/net/minecraft/src/ModelBase.java.patch b/patches/minecraft/net/minecraft/src/ModelBase.java.patch new file mode 100644 index 000000000..f773364d4 --- /dev/null +++ b/patches/minecraft/net/minecraft/src/ModelBase.java.patch @@ -0,0 +1,10 @@ +--- ../src_base/minecraft/net/minecraft/src/ModelBase.java ++++ ../src_work/minecraft/net/minecraft/src/ModelBase.java +@@ -7,7 +7,6 @@ + import java.util.List; + import java.util.Map; + +-@SideOnly(Side.CLIENT) + public abstract class ModelBase + { + public float onGround; diff --git a/patches/minecraft/net/minecraft/src/ModelBox.java.patch b/patches/minecraft/net/minecraft/src/ModelBox.java.patch new file mode 100644 index 000000000..03a329357 --- /dev/null +++ b/patches/minecraft/net/minecraft/src/ModelBox.java.patch @@ -0,0 +1,18 @@ +--- ../src_base/minecraft/net/minecraft/src/ModelBox.java ++++ ../src_work/minecraft/net/minecraft/src/ModelBox.java +@@ -3,7 +3,6 @@ + import cpw.mods.fml.common.Side; + import cpw.mods.fml.common.asm.SideOnly; + +-@SideOnly(Side.CLIENT) + public class ModelBox + { + /** +@@ -99,6 +98,7 @@ + /** + * Draw the six sided box defined by this ModelBox + */ ++ @SideOnly(Side.CLIENT) + public void render(Tessellator par1Tessellator, float par2) + { + TexturedQuad[] var3 = this.quadList; diff --git a/patches/minecraft/net/minecraft/src/ModelRenderer.java.patch b/patches/minecraft/net/minecraft/src/ModelRenderer.java.patch new file mode 100644 index 000000000..19804849d --- /dev/null +++ b/patches/minecraft/net/minecraft/src/ModelRenderer.java.patch @@ -0,0 +1,44 @@ +--- ../src_base/minecraft/net/minecraft/src/ModelRenderer.java ++++ ../src_work/minecraft/net/minecraft/src/ModelRenderer.java +@@ -7,7 +7,6 @@ + import java.util.List; + import org.lwjgl.opengl.GL11; + +-@SideOnly(Side.CLIENT) + public class ModelRenderer + { + /** The size of the texture file's width in pixels. */ +@@ -117,7 +116,8 @@ + this.rotationPointY = par2; + this.rotationPointZ = par3; + } +- ++ ++ @SideOnly(Side.CLIENT) + public void render(float par1) + { + if (!this.isHidden) +@@ -207,6 +207,7 @@ + } + } + ++ @SideOnly(Side.CLIENT) + public void renderWithRotation(float par1) + { + if (!this.isHidden) +@@ -245,6 +246,7 @@ + /** + * Allows the changing of Angles after a box has been rendered + */ ++ @SideOnly(Side.CLIENT) + public void postRender(float par1) + { + if (!this.isHidden) +@@ -289,6 +291,7 @@ + /** + * Compiles a GL display list for this model + */ ++ @SideOnly(Side.CLIENT) + private void compileDisplayList(float par1) + { + this.displayList = GLAllocation.generateDisplayLists(1); diff --git a/patches/minecraft/net/minecraft/src/PositionTextureVertex.java.patch b/patches/minecraft/net/minecraft/src/PositionTextureVertex.java.patch new file mode 100644 index 000000000..4ded62ff0 --- /dev/null +++ b/patches/minecraft/net/minecraft/src/PositionTextureVertex.java.patch @@ -0,0 +1,10 @@ +--- ../src_base/minecraft/net/minecraft/src/PositionTextureVertex.java ++++ ../src_work/minecraft/net/minecraft/src/PositionTextureVertex.java +@@ -3,7 +3,6 @@ + import cpw.mods.fml.common.Side; + import cpw.mods.fml.common.asm.SideOnly; + +-@SideOnly(Side.CLIENT) + public class PositionTextureVertex + { + public Vec3 vector3D; diff --git a/patches/minecraft/net/minecraft/src/TexturedQuad.java.patch b/patches/minecraft/net/minecraft/src/TexturedQuad.java.patch new file mode 100644 index 000000000..f5882d1ef --- /dev/null +++ b/patches/minecraft/net/minecraft/src/TexturedQuad.java.patch @@ -0,0 +1,10 @@ +--- ../src_base/minecraft/net/minecraft/src/TexturedQuad.java ++++ ../src_work/minecraft/net/minecraft/src/TexturedQuad.java +@@ -3,7 +3,6 @@ + import cpw.mods.fml.common.Side; + import cpw.mods.fml.common.asm.SideOnly; + +-@SideOnly(Side.CLIENT) + public class TexturedQuad + { + public PositionTextureVertex[] vertexPositions;