mirror of
https://github.com/Eaglercraft-Archive/EaglercraftX-1.8-workspace.git
synced 2026-06-22 17:58:18 +02:00
add files
This commit is contained in:
147
src/main/java/net/minecraft/client/model/ModelArmorStand.java
Executable file
147
src/main/java/net/minecraft/client/model/ModelArmorStand.java
Executable file
@@ -0,0 +1,147 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityArmorStand;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelArmorStand extends ModelArmorStandArmor {
|
||||
public ModelRenderer standRightSide;
|
||||
public ModelRenderer standLeftSide;
|
||||
public ModelRenderer standWaist;
|
||||
public ModelRenderer standBase;
|
||||
|
||||
public ModelArmorStand() {
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public ModelArmorStand(float parFloat1) {
|
||||
super(parFloat1, 64, 64);
|
||||
this.bipedHead = new ModelRenderer(this, 0, 0);
|
||||
this.bipedHead.addBox(-1.0F, -7.0F, -1.0F, 2, 7, 2, parFloat1);
|
||||
this.bipedHead.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.bipedBody = new ModelRenderer(this, 0, 26);
|
||||
this.bipedBody.addBox(-6.0F, 0.0F, -1.5F, 12, 3, 3, parFloat1);
|
||||
this.bipedBody.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.bipedRightArm = new ModelRenderer(this, 24, 0);
|
||||
this.bipedRightArm.addBox(-2.0F, -2.0F, -1.0F, 2, 12, 2, parFloat1);
|
||||
this.bipedRightArm.setRotationPoint(-5.0F, 2.0F, 0.0F);
|
||||
this.bipedLeftArm = new ModelRenderer(this, 32, 16);
|
||||
this.bipedLeftArm.mirror = true;
|
||||
this.bipedLeftArm.addBox(0.0F, -2.0F, -1.0F, 2, 12, 2, parFloat1);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.0F, 0.0F);
|
||||
this.bipedRightLeg = new ModelRenderer(this, 8, 0);
|
||||
this.bipedRightLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 11, 2, parFloat1);
|
||||
this.bipedRightLeg.setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
this.bipedLeftLeg = new ModelRenderer(this, 40, 16);
|
||||
this.bipedLeftLeg.mirror = true;
|
||||
this.bipedLeftLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 11, 2, parFloat1);
|
||||
this.bipedLeftLeg.setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.standRightSide = new ModelRenderer(this, 16, 0);
|
||||
this.standRightSide.addBox(-3.0F, 3.0F, -1.0F, 2, 7, 2, parFloat1);
|
||||
this.standRightSide.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.standRightSide.showModel = true;
|
||||
this.standLeftSide = new ModelRenderer(this, 48, 16);
|
||||
this.standLeftSide.addBox(1.0F, 3.0F, -1.0F, 2, 7, 2, parFloat1);
|
||||
this.standLeftSide.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.standWaist = new ModelRenderer(this, 0, 48);
|
||||
this.standWaist.addBox(-4.0F, 10.0F, -1.0F, 8, 2, 2, parFloat1);
|
||||
this.standWaist.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.standBase = new ModelRenderer(this, 0, 32);
|
||||
this.standBase.addBox(-6.0F, 11.0F, -6.0F, 12, 1, 12, parFloat1);
|
||||
this.standBase.setRotationPoint(0.0F, 12.0F, 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
if (entity instanceof EntityArmorStand) {
|
||||
EntityArmorStand entityarmorstand = (EntityArmorStand) entity;
|
||||
this.bipedLeftArm.showModel = entityarmorstand.getShowArms();
|
||||
this.bipedRightArm.showModel = entityarmorstand.getShowArms();
|
||||
this.standBase.showModel = !entityarmorstand.hasNoBasePlate();
|
||||
this.bipedLeftLeg.setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.bipedRightLeg.setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
this.standRightSide.rotateAngleX = 0.017453292F * entityarmorstand.getBodyRotation().getX();
|
||||
this.standRightSide.rotateAngleY = 0.017453292F * entityarmorstand.getBodyRotation().getY();
|
||||
this.standRightSide.rotateAngleZ = 0.017453292F * entityarmorstand.getBodyRotation().getZ();
|
||||
this.standLeftSide.rotateAngleX = 0.017453292F * entityarmorstand.getBodyRotation().getX();
|
||||
this.standLeftSide.rotateAngleY = 0.017453292F * entityarmorstand.getBodyRotation().getY();
|
||||
this.standLeftSide.rotateAngleZ = 0.017453292F * entityarmorstand.getBodyRotation().getZ();
|
||||
this.standWaist.rotateAngleX = 0.017453292F * entityarmorstand.getBodyRotation().getX();
|
||||
this.standWaist.rotateAngleY = 0.017453292F * entityarmorstand.getBodyRotation().getY();
|
||||
this.standWaist.rotateAngleZ = 0.017453292F * entityarmorstand.getBodyRotation().getZ();
|
||||
float f6 = (entityarmorstand.getLeftLegRotation().getX() + entityarmorstand.getRightLegRotation().getX())
|
||||
/ 2.0F;
|
||||
float f7 = (entityarmorstand.getLeftLegRotation().getY() + entityarmorstand.getRightLegRotation().getY())
|
||||
/ 2.0F;
|
||||
float f8 = (entityarmorstand.getLeftLegRotation().getZ() + entityarmorstand.getRightLegRotation().getZ())
|
||||
/ 2.0F;
|
||||
this.standBase.rotateAngleX = 0.0F;
|
||||
this.standBase.rotateAngleY = 0.017453292F * -entity.rotationYaw;
|
||||
this.standBase.rotateAngleZ = 0.0F;
|
||||
}
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entityIn, float scale, float parFloat2, float parFloat3, float parFloat4, float parFloat5,
|
||||
float parFloat6) {
|
||||
super.render(entityIn, scale, parFloat2, parFloat3, parFloat4, parFloat5, parFloat6);
|
||||
GlStateManager.pushMatrix();
|
||||
if (this.isChild) {
|
||||
float f = 2.0F;
|
||||
GlStateManager.scale(1.0F / f, 1.0F / f, 1.0F / f);
|
||||
GlStateManager.translate(0.0F, 24.0F * parFloat6, 0.0F);
|
||||
this.standRightSide.render(parFloat6);
|
||||
this.standLeftSide.render(parFloat6);
|
||||
this.standWaist.render(parFloat6);
|
||||
this.standBase.render(parFloat6);
|
||||
} else {
|
||||
if (entityIn.isSneaking()) {
|
||||
GlStateManager.translate(0.0F, 0.2F, 0.0F);
|
||||
}
|
||||
|
||||
this.standRightSide.render(parFloat6);
|
||||
this.standLeftSide.render(parFloat6);
|
||||
this.standWaist.render(parFloat6);
|
||||
this.standBase.render(parFloat6);
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public void postRenderArm(float scale) {
|
||||
boolean flag = this.bipedRightArm.showModel;
|
||||
this.bipedRightArm.showModel = true;
|
||||
super.postRenderArm(scale);
|
||||
this.bipedRightArm.showModel = flag;
|
||||
}
|
||||
}
|
||||
74
src/main/java/net/minecraft/client/model/ModelArmorStandArmor.java
Executable file
74
src/main/java/net/minecraft/client/model/ModelArmorStandArmor.java
Executable file
@@ -0,0 +1,74 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityArmorStand;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelArmorStandArmor extends ModelBiped {
|
||||
public ModelArmorStandArmor() {
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public ModelArmorStandArmor(float modelSize) {
|
||||
this(modelSize, 64, 32);
|
||||
}
|
||||
|
||||
protected ModelArmorStandArmor(float modelSize, int textureWidthIn, int textureHeightIn) {
|
||||
super(modelSize, 0.0F, textureWidthIn, textureHeightIn);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float entityIn, float parFloat2, float parFloat3, float parFloat4, float parFloat5,
|
||||
float parFloat6, Entity parEntity) {
|
||||
if (parEntity instanceof EntityArmorStand) {
|
||||
EntityArmorStand entityarmorstand = (EntityArmorStand) parEntity;
|
||||
this.bipedHead.rotateAngleX = 0.017453292F * entityarmorstand.getHeadRotation().getX();
|
||||
this.bipedHead.rotateAngleY = 0.017453292F * entityarmorstand.getHeadRotation().getY();
|
||||
this.bipedHead.rotateAngleZ = 0.017453292F * entityarmorstand.getHeadRotation().getZ();
|
||||
this.bipedHead.setRotationPoint(0.0F, 1.0F, 0.0F);
|
||||
this.bipedBody.rotateAngleX = 0.017453292F * entityarmorstand.getBodyRotation().getX();
|
||||
this.bipedBody.rotateAngleY = 0.017453292F * entityarmorstand.getBodyRotation().getY();
|
||||
this.bipedBody.rotateAngleZ = 0.017453292F * entityarmorstand.getBodyRotation().getZ();
|
||||
this.bipedLeftArm.rotateAngleX = 0.017453292F * entityarmorstand.getLeftArmRotation().getX();
|
||||
this.bipedLeftArm.rotateAngleY = 0.017453292F * entityarmorstand.getLeftArmRotation().getY();
|
||||
this.bipedLeftArm.rotateAngleZ = 0.017453292F * entityarmorstand.getLeftArmRotation().getZ();
|
||||
this.bipedRightArm.rotateAngleX = 0.017453292F * entityarmorstand.getRightArmRotation().getX();
|
||||
this.bipedRightArm.rotateAngleY = 0.017453292F * entityarmorstand.getRightArmRotation().getY();
|
||||
this.bipedRightArm.rotateAngleZ = 0.017453292F * entityarmorstand.getRightArmRotation().getZ();
|
||||
this.bipedLeftLeg.rotateAngleX = 0.017453292F * entityarmorstand.getLeftLegRotation().getX();
|
||||
this.bipedLeftLeg.rotateAngleY = 0.017453292F * entityarmorstand.getLeftLegRotation().getY();
|
||||
this.bipedLeftLeg.rotateAngleZ = 0.017453292F * entityarmorstand.getLeftLegRotation().getZ();
|
||||
this.bipedLeftLeg.setRotationPoint(1.9F, 11.0F, 0.0F);
|
||||
this.bipedRightLeg.rotateAngleX = 0.017453292F * entityarmorstand.getRightLegRotation().getX();
|
||||
this.bipedRightLeg.rotateAngleY = 0.017453292F * entityarmorstand.getRightLegRotation().getY();
|
||||
this.bipedRightLeg.rotateAngleZ = 0.017453292F * entityarmorstand.getRightLegRotation().getZ();
|
||||
this.bipedRightLeg.setRotationPoint(-1.9F, 11.0F, 0.0F);
|
||||
copyModelAngles(this.bipedHead, this.bipedHeadwear);
|
||||
}
|
||||
}
|
||||
}
|
||||
48
src/main/java/net/minecraft/client/model/ModelBanner.java
Executable file
48
src/main/java/net/minecraft/client/model/ModelBanner.java
Executable file
@@ -0,0 +1,48 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelBanner extends ModelBase {
|
||||
public ModelRenderer bannerSlate;
|
||||
public ModelRenderer bannerStand;
|
||||
public ModelRenderer bannerTop;
|
||||
|
||||
public ModelBanner() {
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 64;
|
||||
this.bannerSlate = new ModelRenderer(this, 0, 0);
|
||||
this.bannerSlate.addBox(-10.0F, 0.0F, -2.0F, 20, 40, 1, 0.0F);
|
||||
this.bannerStand = new ModelRenderer(this, 44, 0);
|
||||
this.bannerStand.addBox(-1.0F, -30.0F, -1.0F, 2, 42, 2, 0.0F);
|
||||
this.bannerTop = new ModelRenderer(this, 0, 42);
|
||||
this.bannerTop.addBox(-10.0F, -32.0F, -1.0F, 20, 2, 2, 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Renders the banner model in.
|
||||
*/
|
||||
public void renderBanner() {
|
||||
this.bannerSlate.rotationPointY = -32.0F;
|
||||
this.bannerSlate.render(0.0625F);
|
||||
this.bannerStand.render(0.0625F);
|
||||
this.bannerTop.render(0.0625F);
|
||||
}
|
||||
}
|
||||
102
src/main/java/net/minecraft/client/model/ModelBase.java
Executable file
102
src/main/java/net/minecraft/client/model/ModelBase.java
Executable file
@@ -0,0 +1,102 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public abstract class ModelBase {
|
||||
public float swingProgress;
|
||||
public boolean isRiding;
|
||||
public boolean isChild = true;
|
||||
/**+
|
||||
* This is a list of all the boxes (ModelRenderer.class) in the
|
||||
* current model.
|
||||
*/
|
||||
public List<ModelRenderer> boxList = Lists.newArrayList();
|
||||
private Map<String, TextureOffset> modelTextureMap = Maps.newHashMap();
|
||||
public int textureWidth = 64;
|
||||
public int textureHeight = 32;
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7) {
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7) {
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase var1, float var2, float var3, float var4) {
|
||||
}
|
||||
|
||||
public ModelRenderer getRandomModelBox(EaglercraftRandom rand) {
|
||||
return (ModelRenderer) this.boxList.get(rand.nextInt(this.boxList.size()));
|
||||
}
|
||||
|
||||
protected void setTextureOffset(String partName, int x, int y) {
|
||||
this.modelTextureMap.put(partName, new TextureOffset(x, y));
|
||||
}
|
||||
|
||||
public TextureOffset getTextureOffset(String partName) {
|
||||
return (TextureOffset) this.modelTextureMap.get(partName);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Copies the angles from one object to another. This is used
|
||||
* when objects should stay aligned with each other, like the
|
||||
* hair over a players head.
|
||||
*/
|
||||
public static void copyModelAngles(ModelRenderer source, ModelRenderer dest) {
|
||||
dest.rotateAngleX = source.rotateAngleX;
|
||||
dest.rotateAngleY = source.rotateAngleY;
|
||||
dest.rotateAngleZ = source.rotateAngleZ;
|
||||
dest.rotationPointX = source.rotationPointX;
|
||||
dest.rotationPointY = source.rotationPointY;
|
||||
dest.rotationPointZ = source.rotationPointZ;
|
||||
}
|
||||
|
||||
public void setModelAttributes(ModelBase modelbase) {
|
||||
this.swingProgress = modelbase.swingProgress;
|
||||
this.isRiding = modelbase.isRiding;
|
||||
this.isChild = modelbase.isChild;
|
||||
}
|
||||
}
|
||||
118
src/main/java/net/minecraft/client/model/ModelBat.java
Executable file
118
src/main/java/net/minecraft/client/model/ModelBat.java
Executable file
@@ -0,0 +1,118 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.passive.EntityBat;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelBat extends ModelBase {
|
||||
private ModelRenderer batHead;
|
||||
private ModelRenderer batBody;
|
||||
private ModelRenderer batRightWing;
|
||||
private ModelRenderer batLeftWing;
|
||||
private ModelRenderer batOuterRightWing;
|
||||
private ModelRenderer batOuterLeftWing;
|
||||
|
||||
public ModelBat() {
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 64;
|
||||
this.batHead = new ModelRenderer(this, 0, 0);
|
||||
this.batHead.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6);
|
||||
ModelRenderer modelrenderer = new ModelRenderer(this, 24, 0);
|
||||
modelrenderer.addBox(-4.0F, -6.0F, -2.0F, 3, 4, 1);
|
||||
this.batHead.addChild(modelrenderer);
|
||||
ModelRenderer modelrenderer1 = new ModelRenderer(this, 24, 0);
|
||||
modelrenderer1.mirror = true;
|
||||
modelrenderer1.addBox(1.0F, -6.0F, -2.0F, 3, 4, 1);
|
||||
this.batHead.addChild(modelrenderer1);
|
||||
this.batBody = new ModelRenderer(this, 0, 16);
|
||||
this.batBody.addBox(-3.0F, 4.0F, -3.0F, 6, 12, 6);
|
||||
this.batBody.setTextureOffset(0, 34).addBox(-5.0F, 16.0F, 0.0F, 10, 6, 1);
|
||||
this.batRightWing = new ModelRenderer(this, 42, 0);
|
||||
this.batRightWing.addBox(-12.0F, 1.0F, 1.5F, 10, 16, 1);
|
||||
this.batOuterRightWing = new ModelRenderer(this, 24, 16);
|
||||
this.batOuterRightWing.setRotationPoint(-12.0F, 1.0F, 1.5F);
|
||||
this.batOuterRightWing.addBox(-8.0F, 1.0F, 0.0F, 8, 12, 1);
|
||||
this.batLeftWing = new ModelRenderer(this, 42, 0);
|
||||
this.batLeftWing.mirror = true;
|
||||
this.batLeftWing.addBox(2.0F, 1.0F, 1.5F, 10, 16, 1);
|
||||
this.batOuterLeftWing = new ModelRenderer(this, 24, 16);
|
||||
this.batOuterLeftWing.mirror = true;
|
||||
this.batOuterLeftWing.setRotationPoint(12.0F, 1.0F, 1.5F);
|
||||
this.batOuterLeftWing.addBox(0.0F, 1.0F, 0.0F, 8, 12, 1);
|
||||
this.batBody.addChild(this.batRightWing);
|
||||
this.batBody.addChild(this.batLeftWing);
|
||||
this.batRightWing.addChild(this.batOuterRightWing);
|
||||
this.batLeftWing.addChild(this.batOuterLeftWing);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.batHead.render(f5);
|
||||
this.batBody.render(f5);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float var1, float var2, float f, float f1, float f2, float var6, Entity entity) {
|
||||
if (((EntityBat) entity).getIsBatHanging()) {
|
||||
float f3 = 57.295776F;
|
||||
this.batHead.rotateAngleX = f2 / 57.295776F;
|
||||
this.batHead.rotateAngleY = 3.1415927F - f1 / 57.295776F;
|
||||
this.batHead.rotateAngleZ = 3.1415927F;
|
||||
this.batHead.setRotationPoint(0.0F, -2.0F, 0.0F);
|
||||
this.batRightWing.setRotationPoint(-3.0F, 0.0F, 3.0F);
|
||||
this.batLeftWing.setRotationPoint(3.0F, 0.0F, 3.0F);
|
||||
this.batBody.rotateAngleX = 3.1415927F;
|
||||
this.batRightWing.rotateAngleX = -0.15707964F;
|
||||
this.batRightWing.rotateAngleY = -1.2566371F;
|
||||
this.batOuterRightWing.rotateAngleY = -1.7278761F;
|
||||
this.batLeftWing.rotateAngleX = this.batRightWing.rotateAngleX;
|
||||
this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
|
||||
this.batOuterLeftWing.rotateAngleY = -this.batOuterRightWing.rotateAngleY;
|
||||
} else {
|
||||
float f4 = 57.295776F;
|
||||
this.batHead.rotateAngleX = f2 / 57.295776F;
|
||||
this.batHead.rotateAngleY = f1 / 57.295776F;
|
||||
this.batHead.rotateAngleZ = 0.0F;
|
||||
this.batHead.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.batRightWing.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.batLeftWing.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
this.batBody.rotateAngleX = 0.7853982F + MathHelper.cos(f * 0.1F) * 0.15F;
|
||||
this.batBody.rotateAngleY = 0.0F;
|
||||
this.batRightWing.rotateAngleY = MathHelper.cos(f * 1.3F) * 3.1415927F * 0.25F;
|
||||
this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
|
||||
this.batOuterRightWing.rotateAngleY = this.batRightWing.rotateAngleY * 0.5F;
|
||||
this.batOuterLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY * 0.5F;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
254
src/main/java/net/minecraft/client/model/ModelBiped.java
Executable file
254
src/main/java/net/minecraft/client/model/ModelBiped.java
Executable file
@@ -0,0 +1,254 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelBiped extends ModelBase {
|
||||
public ModelRenderer bipedHead;
|
||||
public ModelRenderer bipedHeadwear;
|
||||
public ModelRenderer bipedBody;
|
||||
public ModelRenderer bipedRightArm;
|
||||
public ModelRenderer bipedLeftArm;
|
||||
public ModelRenderer bipedRightLeg;
|
||||
public ModelRenderer bipedLeftLeg;
|
||||
public int heldItemLeft;
|
||||
public int heldItemRight;
|
||||
public boolean isSneak;
|
||||
public boolean aimedBow;
|
||||
|
||||
public ModelBiped() {
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public ModelBiped(float modelSize) {
|
||||
this(modelSize, 0.0F, 64, 32);
|
||||
}
|
||||
|
||||
public ModelBiped(float modelSize, float parFloat1, int textureWidthIn, int textureHeightIn) {
|
||||
this.textureWidth = textureWidthIn;
|
||||
this.textureHeight = textureHeightIn;
|
||||
this.bipedHead = new ModelRenderer(this, 0, 0);
|
||||
this.bipedHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, modelSize);
|
||||
this.bipedHead.setRotationPoint(0.0F, 0.0F + parFloat1, 0.0F);
|
||||
this.bipedHeadwear = new ModelRenderer(this, 32, 0);
|
||||
this.bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, modelSize + 0.5F);
|
||||
this.bipedHeadwear.setRotationPoint(0.0F, 0.0F + parFloat1, 0.0F);
|
||||
this.bipedBody = new ModelRenderer(this, 16, 16);
|
||||
this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, modelSize);
|
||||
this.bipedBody.setRotationPoint(0.0F, 0.0F + parFloat1, 0.0F);
|
||||
this.bipedRightArm = new ModelRenderer(this, 40, 16);
|
||||
this.bipedRightArm.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, modelSize);
|
||||
this.bipedRightArm.setRotationPoint(-5.0F, 2.0F + parFloat1, 0.0F);
|
||||
this.bipedLeftArm = new ModelRenderer(this, 40, 16);
|
||||
this.bipedLeftArm.mirror = true;
|
||||
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, modelSize);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + parFloat1, 0.0F);
|
||||
this.bipedRightLeg = new ModelRenderer(this, 0, 16);
|
||||
this.bipedRightLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, modelSize);
|
||||
this.bipedRightLeg.setRotationPoint(-1.9F, 12.0F + parFloat1, 0.0F);
|
||||
this.bipedLeftLeg = new ModelRenderer(this, 0, 16);
|
||||
this.bipedLeftLeg.mirror = true;
|
||||
this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, modelSize);
|
||||
this.bipedLeftLeg.setRotationPoint(1.9F, 12.0F + parFloat1, 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
GlStateManager.pushMatrix();
|
||||
if (this.isChild) {
|
||||
float f6 = 2.0F;
|
||||
GlStateManager.scale(1.5F / f6, 1.5F / f6, 1.5F / f6);
|
||||
GlStateManager.translate(0.0F, 16.0F * f5, 0.0F);
|
||||
this.bipedHead.render(f5);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(1.0F / f6, 1.0F / f6, 1.0F / f6);
|
||||
GlStateManager.translate(0.0F, 24.0F * f5, 0.0F);
|
||||
this.bipedBody.render(f5);
|
||||
this.bipedRightArm.render(f5);
|
||||
this.bipedLeftArm.render(f5);
|
||||
this.bipedRightLeg.render(f5);
|
||||
this.bipedLeftLeg.render(f5);
|
||||
this.bipedHeadwear.render(f5);
|
||||
} else {
|
||||
if (entity != null && entity.isSneaking()) {
|
||||
GlStateManager.translate(0.0F, 0.2F, 0.0F);
|
||||
}
|
||||
|
||||
this.bipedHead.render(f5);
|
||||
this.bipedBody.render(f5);
|
||||
this.bipedRightArm.render(f5);
|
||||
this.bipedLeftArm.render(f5);
|
||||
this.bipedRightLeg.render(f5);
|
||||
this.bipedLeftLeg.render(f5);
|
||||
this.bipedHeadwear.render(f5);
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float var6, Entity var7) {
|
||||
this.bipedHead.rotateAngleY = f3 / 57.295776F;
|
||||
this.bipedHead.rotateAngleX = f4 / 57.295776F;
|
||||
this.bipedRightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 2.0F * f1 * 0.5F;
|
||||
this.bipedLeftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;
|
||||
this.bipedRightArm.rotateAngleZ = 0.0F;
|
||||
this.bipedLeftArm.rotateAngleZ = 0.0F;
|
||||
this.bipedRightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.bipedLeftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.4F * f1;
|
||||
this.bipedRightLeg.rotateAngleY = 0.0F;
|
||||
this.bipedLeftLeg.rotateAngleY = 0.0F;
|
||||
if (this.isRiding) {
|
||||
this.bipedRightArm.rotateAngleX += -0.62831855F;
|
||||
this.bipedLeftArm.rotateAngleX += -0.62831855F;
|
||||
this.bipedRightLeg.rotateAngleX = -1.2566371F;
|
||||
this.bipedLeftLeg.rotateAngleX = -1.2566371F;
|
||||
this.bipedRightLeg.rotateAngleY = 0.31415927F;
|
||||
this.bipedLeftLeg.rotateAngleY = -0.31415927F;
|
||||
}
|
||||
|
||||
if (this.heldItemLeft != 0) {
|
||||
this.bipedLeftArm.rotateAngleX = this.bipedLeftArm.rotateAngleX * 0.5F
|
||||
- 0.31415927F * (float) this.heldItemLeft;
|
||||
}
|
||||
|
||||
this.bipedRightArm.rotateAngleY = 0.0F;
|
||||
this.bipedRightArm.rotateAngleZ = 0.0F;
|
||||
switch (this.heldItemRight) {
|
||||
case 0:
|
||||
case 2:
|
||||
default:
|
||||
break;
|
||||
case 1:
|
||||
this.bipedRightArm.rotateAngleX = this.bipedRightArm.rotateAngleX * 0.5F
|
||||
- 0.31415927F * (float) this.heldItemRight;
|
||||
break;
|
||||
case 3:
|
||||
this.bipedRightArm.rotateAngleX = this.bipedRightArm.rotateAngleX * 0.5F
|
||||
- 0.31415927F * (float) this.heldItemRight;
|
||||
this.bipedRightArm.rotateAngleY = -0.5235988F;
|
||||
}
|
||||
|
||||
this.bipedLeftArm.rotateAngleY = 0.0F;
|
||||
if (this.swingProgress > -9990.0F) {
|
||||
float f5 = this.swingProgress;
|
||||
this.bipedBody.rotateAngleY = MathHelper.sin(MathHelper.sqrt_float(f5) * 3.1415927F * 2.0F) * 0.2F;
|
||||
this.bipedRightArm.rotationPointZ = MathHelper.sin(this.bipedBody.rotateAngleY) * 5.0F;
|
||||
this.bipedRightArm.rotationPointX = -MathHelper.cos(this.bipedBody.rotateAngleY) * 5.0F;
|
||||
this.bipedLeftArm.rotationPointZ = -MathHelper.sin(this.bipedBody.rotateAngleY) * 5.0F;
|
||||
this.bipedLeftArm.rotationPointX = MathHelper.cos(this.bipedBody.rotateAngleY) * 5.0F;
|
||||
this.bipedRightArm.rotateAngleY += this.bipedBody.rotateAngleY;
|
||||
this.bipedLeftArm.rotateAngleY += this.bipedBody.rotateAngleY;
|
||||
this.bipedLeftArm.rotateAngleX += this.bipedBody.rotateAngleY;
|
||||
f5 = 1.0F - this.swingProgress;
|
||||
f5 = f5 * f5;
|
||||
f5 = f5 * f5;
|
||||
f5 = 1.0F - f5;
|
||||
float f6 = MathHelper.sin(f5 * 3.1415927F);
|
||||
float f7 = MathHelper.sin(this.swingProgress * 3.1415927F) * -(this.bipedHead.rotateAngleX - 0.7F) * 0.75F;
|
||||
this.bipedRightArm.rotateAngleX = (float) ((double) this.bipedRightArm.rotateAngleX
|
||||
- ((double) f6 * 1.2D + (double) f7));
|
||||
this.bipedRightArm.rotateAngleY += this.bipedBody.rotateAngleY * 2.0F;
|
||||
this.bipedRightArm.rotateAngleZ += MathHelper.sin(this.swingProgress * 3.1415927F) * -0.4F;
|
||||
}
|
||||
|
||||
if (this.isSneak) {
|
||||
this.bipedBody.rotateAngleX = 0.5F;
|
||||
this.bipedRightArm.rotateAngleX += 0.4F;
|
||||
this.bipedLeftArm.rotateAngleX += 0.4F;
|
||||
this.bipedRightLeg.rotationPointZ = 4.0F;
|
||||
this.bipedLeftLeg.rotationPointZ = 4.0F;
|
||||
this.bipedRightLeg.rotationPointY = 9.0F;
|
||||
this.bipedLeftLeg.rotationPointY = 9.0F;
|
||||
this.bipedHead.rotationPointY = 1.0F;
|
||||
} else {
|
||||
this.bipedBody.rotateAngleX = 0.0F;
|
||||
this.bipedRightLeg.rotationPointZ = 0.1F;
|
||||
this.bipedLeftLeg.rotationPointZ = 0.1F;
|
||||
this.bipedRightLeg.rotationPointY = 12.0F;
|
||||
this.bipedLeftLeg.rotationPointY = 12.0F;
|
||||
this.bipedHead.rotationPointY = 0.0F;
|
||||
}
|
||||
|
||||
this.bipedRightArm.rotateAngleZ += MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedRightArm.rotateAngleX += MathHelper.sin(f2 * 0.067F) * 0.05F;
|
||||
this.bipedLeftArm.rotateAngleX -= MathHelper.sin(f2 * 0.067F) * 0.05F;
|
||||
if (this.aimedBow) {
|
||||
float f8 = 0.0F;
|
||||
float f9 = 0.0F;
|
||||
this.bipedRightArm.rotateAngleZ = 0.0F;
|
||||
this.bipedLeftArm.rotateAngleZ = 0.0F;
|
||||
this.bipedRightArm.rotateAngleY = -(0.1F - f8 * 0.6F) + this.bipedHead.rotateAngleY;
|
||||
this.bipedLeftArm.rotateAngleY = 0.1F - f8 * 0.6F + this.bipedHead.rotateAngleY + 0.4F;
|
||||
this.bipedRightArm.rotateAngleX = -1.5707964F + this.bipedHead.rotateAngleX;
|
||||
this.bipedLeftArm.rotateAngleX = -1.5707964F + this.bipedHead.rotateAngleX;
|
||||
this.bipedRightArm.rotateAngleX -= f8 * 1.2F - f9 * 0.4F;
|
||||
this.bipedLeftArm.rotateAngleX -= f8 * 1.2F - f9 * 0.4F;
|
||||
this.bipedRightArm.rotateAngleZ += MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedRightArm.rotateAngleX += MathHelper.sin(f2 * 0.067F) * 0.05F;
|
||||
this.bipedLeftArm.rotateAngleX -= MathHelper.sin(f2 * 0.067F) * 0.05F;
|
||||
}
|
||||
|
||||
copyModelAngles(this.bipedHead, this.bipedHeadwear);
|
||||
}
|
||||
|
||||
public void setModelAttributes(ModelBase model) {
|
||||
super.setModelAttributes(model);
|
||||
if (model instanceof ModelBiped) {
|
||||
ModelBiped modelbiped = (ModelBiped) model;
|
||||
this.heldItemLeft = modelbiped.heldItemLeft;
|
||||
this.heldItemRight = modelbiped.heldItemRight;
|
||||
this.isSneak = modelbiped.isSneak;
|
||||
this.aimedBow = modelbiped.aimedBow;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setInvisible(boolean invisible) {
|
||||
this.bipedHead.showModel = invisible;
|
||||
this.bipedHeadwear.showModel = invisible;
|
||||
this.bipedBody.showModel = invisible;
|
||||
this.bipedRightArm.showModel = invisible;
|
||||
this.bipedLeftArm.showModel = invisible;
|
||||
this.bipedRightLeg.showModel = invisible;
|
||||
this.bipedLeftLeg.showModel = invisible;
|
||||
}
|
||||
|
||||
public void postRenderArm(float f) {
|
||||
this.bipedRightArm.postRender(f);
|
||||
}
|
||||
}
|
||||
95
src/main/java/net/minecraft/client/model/ModelBlaze.java
Executable file
95
src/main/java/net/minecraft/client/model/ModelBlaze.java
Executable file
@@ -0,0 +1,95 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelBlaze extends ModelBase {
|
||||
/**+
|
||||
* The sticks that fly around the Blaze.
|
||||
*/
|
||||
private ModelRenderer[] blazeSticks = new ModelRenderer[12];
|
||||
private ModelRenderer blazeHead;
|
||||
|
||||
public ModelBlaze() {
|
||||
for (int i = 0; i < this.blazeSticks.length; ++i) {
|
||||
this.blazeSticks[i] = new ModelRenderer(this, 0, 16);
|
||||
this.blazeSticks[i].addBox(0.0F, 0.0F, 0.0F, 2, 8, 2);
|
||||
}
|
||||
|
||||
this.blazeHead = new ModelRenderer(this, 0, 0);
|
||||
this.blazeHead.addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.blazeHead.render(f5);
|
||||
|
||||
for (int i = 0; i < this.blazeSticks.length; ++i) {
|
||||
this.blazeSticks[i].render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float var1, float var2, float f, float f1, float f2, float var6, Entity var7) {
|
||||
float f3 = f * 3.1415927F * -0.1F;
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
this.blazeSticks[i].rotationPointY = -2.0F + MathHelper.cos(((float) (i * 2) + f) * 0.25F);
|
||||
this.blazeSticks[i].rotationPointX = MathHelper.cos(f3) * 9.0F;
|
||||
this.blazeSticks[i].rotationPointZ = MathHelper.sin(f3) * 9.0F;
|
||||
++f3;
|
||||
}
|
||||
|
||||
f3 = 0.7853982F + f * 3.1415927F * 0.03F;
|
||||
|
||||
for (int j = 4; j < 8; ++j) {
|
||||
this.blazeSticks[j].rotationPointY = 2.0F + MathHelper.cos(((float) (j * 2) + f) * 0.25F);
|
||||
this.blazeSticks[j].rotationPointX = MathHelper.cos(f3) * 7.0F;
|
||||
this.blazeSticks[j].rotationPointZ = MathHelper.sin(f3) * 7.0F;
|
||||
++f3;
|
||||
}
|
||||
|
||||
f3 = 0.47123894F + f * 3.1415927F * -0.05F;
|
||||
|
||||
for (int k = 8; k < 12; ++k) {
|
||||
this.blazeSticks[k].rotationPointY = 11.0F + MathHelper.cos(((float) k * 1.5F + f) * 0.5F);
|
||||
this.blazeSticks[k].rotationPointX = MathHelper.cos(f3) * 5.0F;
|
||||
this.blazeSticks[k].rotationPointZ = MathHelper.sin(f3) * 5.0F;
|
||||
++f3;
|
||||
}
|
||||
|
||||
this.blazeHead.rotateAngleY = f1 / 57.295776F;
|
||||
this.blazeHead.rotateAngleX = f2 / 57.295776F;
|
||||
}
|
||||
}
|
||||
64
src/main/java/net/minecraft/client/model/ModelBoat.java
Executable file
64
src/main/java/net/minecraft/client/model/ModelBoat.java
Executable file
@@ -0,0 +1,64 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelBoat extends ModelBase {
|
||||
public ModelRenderer[] boatSides = new ModelRenderer[5];
|
||||
|
||||
public ModelBoat() {
|
||||
this.boatSides[0] = new ModelRenderer(this, 0, 8);
|
||||
this.boatSides[1] = new ModelRenderer(this, 0, 0);
|
||||
this.boatSides[2] = new ModelRenderer(this, 0, 0);
|
||||
this.boatSides[3] = new ModelRenderer(this, 0, 0);
|
||||
this.boatSides[4] = new ModelRenderer(this, 0, 0);
|
||||
byte b0 = 24;
|
||||
byte b1 = 6;
|
||||
byte b2 = 20;
|
||||
byte b3 = 4;
|
||||
this.boatSides[0].addBox((float) (-b0 / 2), (float) (-b2 / 2 + 2), -3.0F, b0, b2 - 4, 4, 0.0F);
|
||||
this.boatSides[0].setRotationPoint(0.0F, (float) b3, 0.0F);
|
||||
this.boatSides[1].addBox((float) (-b0 / 2 + 2), (float) (-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F);
|
||||
this.boatSides[1].setRotationPoint((float) (-b0 / 2 + 1), (float) b3, 0.0F);
|
||||
this.boatSides[2].addBox((float) (-b0 / 2 + 2), (float) (-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F);
|
||||
this.boatSides[2].setRotationPoint((float) (b0 / 2 - 1), (float) b3, 0.0F);
|
||||
this.boatSides[3].addBox((float) (-b0 / 2 + 2), (float) (-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F);
|
||||
this.boatSides[3].setRotationPoint(0.0F, (float) b3, (float) (-b2 / 2 + 1));
|
||||
this.boatSides[4].addBox((float) (-b0 / 2 + 2), (float) (-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F);
|
||||
this.boatSides[4].setRotationPoint(0.0F, (float) b3, (float) (b2 / 2 - 1));
|
||||
this.boatSides[0].rotateAngleX = 1.5707964F;
|
||||
this.boatSides[1].rotateAngleY = 4.712389F;
|
||||
this.boatSides[2].rotateAngleY = 1.5707964F;
|
||||
this.boatSides[3].rotateAngleY = 3.1415927F;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float f) {
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
this.boatSides[i].render(f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
104
src/main/java/net/minecraft/client/model/ModelBook.java
Executable file
104
src/main/java/net/minecraft/client/model/ModelBook.java
Executable file
@@ -0,0 +1,104 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelBook extends ModelBase {
|
||||
/**+
|
||||
* Right cover renderer (when facing the book)
|
||||
*/
|
||||
public ModelRenderer coverRight = (new ModelRenderer(this)).setTextureOffset(0, 0).addBox(-6.0F, -5.0F, 0.0F, 6, 10,
|
||||
0);
|
||||
/**+
|
||||
* Left cover renderer (when facing the book)
|
||||
*/
|
||||
public ModelRenderer coverLeft = (new ModelRenderer(this)).setTextureOffset(16, 0).addBox(0.0F, -5.0F, 0.0F, 6, 10,
|
||||
0);
|
||||
/**+
|
||||
* The right pages renderer (when facing the book)
|
||||
*/
|
||||
public ModelRenderer pagesRight = (new ModelRenderer(this)).setTextureOffset(0, 10).addBox(0.0F, -4.0F, -0.99F, 5,
|
||||
8, 1);
|
||||
/**+
|
||||
* The left pages renderer (when facing the book)
|
||||
*/
|
||||
public ModelRenderer pagesLeft = (new ModelRenderer(this)).setTextureOffset(12, 10).addBox(0.0F, -4.0F, -0.01F, 5,
|
||||
8, 1);
|
||||
/**+
|
||||
* Right cover renderer (when facing the book)
|
||||
*/
|
||||
public ModelRenderer flippingPageRight = (new ModelRenderer(this)).setTextureOffset(24, 10).addBox(0.0F, -4.0F,
|
||||
0.0F, 5, 8, 0);
|
||||
/**+
|
||||
* Right cover renderer (when facing the book)
|
||||
*/
|
||||
public ModelRenderer flippingPageLeft = (new ModelRenderer(this)).setTextureOffset(24, 10).addBox(0.0F, -4.0F, 0.0F,
|
||||
5, 8, 0);
|
||||
/**+
|
||||
* The renderer of spine of the book
|
||||
*/
|
||||
public ModelRenderer bookSpine = (new ModelRenderer(this)).setTextureOffset(12, 0).addBox(-1.0F, -5.0F, 0.0F, 2, 10,
|
||||
0);
|
||||
|
||||
public ModelBook() {
|
||||
this.coverRight.setRotationPoint(0.0F, 0.0F, -1.0F);
|
||||
this.coverLeft.setRotationPoint(0.0F, 0.0F, 1.0F);
|
||||
this.bookSpine.rotateAngleY = 1.5707964F;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.coverRight.render(f5);
|
||||
this.coverLeft.render(f5);
|
||||
this.bookSpine.render(f5);
|
||||
this.pagesRight.render(f5);
|
||||
this.pagesLeft.render(f5);
|
||||
this.flippingPageRight.render(f5);
|
||||
this.flippingPageLeft.render(f5);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float var5, float var6, Entity var7) {
|
||||
float f4 = (MathHelper.sin(f * 0.02F) * 0.1F + 1.25F) * f3;
|
||||
this.coverRight.rotateAngleY = 3.1415927F + f4;
|
||||
this.coverLeft.rotateAngleY = -f4;
|
||||
this.pagesRight.rotateAngleY = f4;
|
||||
this.pagesLeft.rotateAngleY = -f4;
|
||||
this.flippingPageRight.rotateAngleY = f4 - f4 * 2.0F * f1;
|
||||
this.flippingPageLeft.rotateAngleY = f4 - f4 * 2.0F * f2;
|
||||
this.pagesRight.rotationPointX = MathHelper.sin(f4);
|
||||
this.pagesLeft.rotationPointX = MathHelper.sin(f4);
|
||||
this.flippingPageRight.rotationPointX = MathHelper.sin(f4);
|
||||
this.flippingPageLeft.rotationPointX = MathHelper.sin(f4);
|
||||
}
|
||||
}
|
||||
134
src/main/java/net/minecraft/client/model/ModelBox.java
Executable file
134
src/main/java/net/minecraft/client/model/ModelBox.java
Executable file
@@ -0,0 +1,134 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelBox {
|
||||
private PositionTextureVertex[] vertexPositions;
|
||||
private TexturedQuad[] quadList;
|
||||
public final float posX1;
|
||||
public final float posY1;
|
||||
public final float posZ1;
|
||||
public final float posX2;
|
||||
public final float posY2;
|
||||
public final float posZ2;
|
||||
public String boxName;
|
||||
|
||||
public ModelBox(ModelRenderer renderer, int parInt1, int parInt2, float parFloat1, float parFloat2, float parFloat3,
|
||||
int parInt3, int parInt4, int parInt5, float parFloat4) {
|
||||
this(renderer, parInt1, parInt2, parFloat1, parFloat2, parFloat3, parInt3, parInt4, parInt5, parFloat4,
|
||||
renderer.mirror);
|
||||
}
|
||||
|
||||
public ModelBox(ModelRenderer renderer, int textureX, int textureY, float parFloat1, float parFloat2,
|
||||
float parFloat3, int parInt1, int parInt2, int parInt3, float parFloat4, boolean parFlag) {
|
||||
this.posX1 = parFloat1;
|
||||
this.posY1 = parFloat2;
|
||||
this.posZ1 = parFloat3;
|
||||
this.posX2 = parFloat1 + (float) parInt1;
|
||||
this.posY2 = parFloat2 + (float) parInt2;
|
||||
this.posZ2 = parFloat3 + (float) parInt3;
|
||||
this.vertexPositions = new PositionTextureVertex[8];
|
||||
this.quadList = new TexturedQuad[6];
|
||||
float f = parFloat1 + (float) parInt1;
|
||||
float f1 = parFloat2 + (float) parInt2;
|
||||
float f2 = parFloat3 + (float) parInt3;
|
||||
parFloat1 = parFloat1 - parFloat4;
|
||||
parFloat2 = parFloat2 - parFloat4;
|
||||
parFloat3 = parFloat3 - parFloat4;
|
||||
f = f + parFloat4;
|
||||
f1 = f1 + parFloat4;
|
||||
f2 = f2 + parFloat4;
|
||||
if (parFlag) {
|
||||
float f3 = f;
|
||||
f = parFloat1;
|
||||
parFloat1 = f3;
|
||||
}
|
||||
|
||||
PositionTextureVertex positiontexturevertex7 = new PositionTextureVertex(parFloat1, parFloat2, parFloat3, 0.0F,
|
||||
0.0F);
|
||||
PositionTextureVertex positiontexturevertex = new PositionTextureVertex(f, parFloat2, parFloat3, 0.0F, 8.0F);
|
||||
PositionTextureVertex positiontexturevertex1 = new PositionTextureVertex(f, f1, parFloat3, 8.0F, 8.0F);
|
||||
PositionTextureVertex positiontexturevertex2 = new PositionTextureVertex(parFloat1, f1, parFloat3, 8.0F, 0.0F);
|
||||
PositionTextureVertex positiontexturevertex3 = new PositionTextureVertex(parFloat1, parFloat2, f2, 0.0F, 0.0F);
|
||||
PositionTextureVertex positiontexturevertex4 = new PositionTextureVertex(f, parFloat2, f2, 0.0F, 8.0F);
|
||||
PositionTextureVertex positiontexturevertex5 = new PositionTextureVertex(f, f1, f2, 8.0F, 8.0F);
|
||||
PositionTextureVertex positiontexturevertex6 = new PositionTextureVertex(parFloat1, f1, f2, 8.0F, 0.0F);
|
||||
this.vertexPositions[0] = positiontexturevertex7;
|
||||
this.vertexPositions[1] = positiontexturevertex;
|
||||
this.vertexPositions[2] = positiontexturevertex1;
|
||||
this.vertexPositions[3] = positiontexturevertex2;
|
||||
this.vertexPositions[4] = positiontexturevertex3;
|
||||
this.vertexPositions[5] = positiontexturevertex4;
|
||||
this.vertexPositions[6] = positiontexturevertex5;
|
||||
this.vertexPositions[7] = positiontexturevertex6;
|
||||
this.quadList[0] = new TexturedQuad(
|
||||
new PositionTextureVertex[] { positiontexturevertex4, positiontexturevertex, positiontexturevertex1,
|
||||
positiontexturevertex5 },
|
||||
textureX + parInt3 + parInt1, textureY + parInt3, textureX + parInt3 + parInt1 + parInt3,
|
||||
textureY + parInt3 + parInt2, renderer.textureWidth, renderer.textureHeight);
|
||||
this.quadList[1] = new TexturedQuad(
|
||||
new PositionTextureVertex[] { positiontexturevertex7, positiontexturevertex3, positiontexturevertex6,
|
||||
positiontexturevertex2 },
|
||||
textureX, textureY + parInt3, textureX + parInt3, textureY + parInt3 + parInt2, renderer.textureWidth,
|
||||
renderer.textureHeight);
|
||||
this.quadList[2] = new TexturedQuad(
|
||||
new PositionTextureVertex[] { positiontexturevertex4, positiontexturevertex3, positiontexturevertex7,
|
||||
positiontexturevertex },
|
||||
textureX + parInt3, textureY, textureX + parInt3 + parInt1, textureY + parInt3, renderer.textureWidth,
|
||||
renderer.textureHeight);
|
||||
this.quadList[3] = new TexturedQuad(
|
||||
new PositionTextureVertex[] { positiontexturevertex1, positiontexturevertex2, positiontexturevertex6,
|
||||
positiontexturevertex5 },
|
||||
textureX + parInt3 + parInt1, textureY + parInt3, textureX + parInt3 + parInt1 + parInt1, textureY,
|
||||
renderer.textureWidth, renderer.textureHeight);
|
||||
this.quadList[4] = new TexturedQuad(
|
||||
new PositionTextureVertex[] { positiontexturevertex, positiontexturevertex7, positiontexturevertex2,
|
||||
positiontexturevertex1 },
|
||||
textureX + parInt3, textureY + parInt3, textureX + parInt3 + parInt1, textureY + parInt3 + parInt2,
|
||||
renderer.textureWidth, renderer.textureHeight);
|
||||
this.quadList[5] = new TexturedQuad(
|
||||
new PositionTextureVertex[] { positiontexturevertex3, positiontexturevertex4, positiontexturevertex5,
|
||||
positiontexturevertex6 },
|
||||
textureX + parInt3 + parInt1 + parInt3, textureY + parInt3,
|
||||
textureX + parInt3 + parInt1 + parInt3 + parInt1, textureY + parInt3 + parInt2, renderer.textureWidth,
|
||||
renderer.textureHeight);
|
||||
if (parFlag) {
|
||||
for (int i = 0; i < this.quadList.length; ++i) {
|
||||
this.quadList[i].flipFace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void render(WorldRenderer renderer, float scale) {
|
||||
for (int i = 0; i < this.quadList.length; ++i) {
|
||||
this.quadList[i].draw(renderer, scale);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public ModelBox setBoxName(String name) {
|
||||
this.boxName = name;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
57
src/main/java/net/minecraft/client/model/ModelChest.java
Executable file
57
src/main/java/net/minecraft/client/model/ModelChest.java
Executable file
@@ -0,0 +1,57 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelChest extends ModelBase {
|
||||
/**+
|
||||
* The chest lid in the chest's model.
|
||||
*/
|
||||
public ModelRenderer chestLid = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64);
|
||||
public ModelRenderer chestBelow;
|
||||
public ModelRenderer chestKnob;
|
||||
|
||||
public ModelChest() {
|
||||
this.chestLid.addBox(0.0F, -5.0F, -14.0F, 14, 5, 14, 0.0F);
|
||||
this.chestLid.rotationPointX = 1.0F;
|
||||
this.chestLid.rotationPointY = 7.0F;
|
||||
this.chestLid.rotationPointZ = 15.0F;
|
||||
this.chestKnob = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64);
|
||||
this.chestKnob.addBox(-1.0F, -2.0F, -15.0F, 2, 4, 1, 0.0F);
|
||||
this.chestKnob.rotationPointX = 8.0F;
|
||||
this.chestKnob.rotationPointY = 7.0F;
|
||||
this.chestKnob.rotationPointZ = 15.0F;
|
||||
this.chestBelow = (new ModelRenderer(this, 0, 19)).setTextureSize(64, 64);
|
||||
this.chestBelow.addBox(0.0F, 0.0F, 0.0F, 14, 10, 14, 0.0F);
|
||||
this.chestBelow.rotationPointX = 1.0F;
|
||||
this.chestBelow.rotationPointY = 6.0F;
|
||||
this.chestBelow.rotationPointZ = 1.0F;
|
||||
}
|
||||
|
||||
/**+
|
||||
* This method renders out all parts of the chest model.
|
||||
*/
|
||||
public void renderAll() {
|
||||
this.chestKnob.rotateAngleX = this.chestLid.rotateAngleX;
|
||||
this.chestLid.render(0.0625F);
|
||||
this.chestKnob.render(0.0625F);
|
||||
this.chestBelow.render(0.0625F);
|
||||
}
|
||||
}
|
||||
121
src/main/java/net/minecraft/client/model/ModelChicken.java
Executable file
121
src/main/java/net/minecraft/client/model/ModelChicken.java
Executable file
@@ -0,0 +1,121 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelChicken extends ModelBase {
|
||||
public ModelRenderer head;
|
||||
public ModelRenderer body;
|
||||
public ModelRenderer rightLeg;
|
||||
public ModelRenderer leftLeg;
|
||||
public ModelRenderer rightWing;
|
||||
public ModelRenderer leftWing;
|
||||
public ModelRenderer bill;
|
||||
public ModelRenderer chin;
|
||||
|
||||
public ModelChicken() {
|
||||
byte b0 = 16;
|
||||
this.head = new ModelRenderer(this, 0, 0);
|
||||
this.head.addBox(-2.0F, -6.0F, -2.0F, 4, 6, 3, 0.0F);
|
||||
this.head.setRotationPoint(0.0F, (float) (-1 + b0), -4.0F);
|
||||
this.bill = new ModelRenderer(this, 14, 0);
|
||||
this.bill.addBox(-2.0F, -4.0F, -4.0F, 4, 2, 2, 0.0F);
|
||||
this.bill.setRotationPoint(0.0F, (float) (-1 + b0), -4.0F);
|
||||
this.chin = new ModelRenderer(this, 14, 4);
|
||||
this.chin.addBox(-1.0F, -2.0F, -3.0F, 2, 2, 2, 0.0F);
|
||||
this.chin.setRotationPoint(0.0F, (float) (-1 + b0), -4.0F);
|
||||
this.body = new ModelRenderer(this, 0, 9);
|
||||
this.body.addBox(-3.0F, -4.0F, -3.0F, 6, 8, 6, 0.0F);
|
||||
this.body.setRotationPoint(0.0F, (float) b0, 0.0F);
|
||||
this.rightLeg = new ModelRenderer(this, 26, 0);
|
||||
this.rightLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3);
|
||||
this.rightLeg.setRotationPoint(-2.0F, (float) (3 + b0), 1.0F);
|
||||
this.leftLeg = new ModelRenderer(this, 26, 0);
|
||||
this.leftLeg.addBox(-1.0F, 0.0F, -3.0F, 3, 5, 3);
|
||||
this.leftLeg.setRotationPoint(1.0F, (float) (3 + b0), 1.0F);
|
||||
this.rightWing = new ModelRenderer(this, 24, 13);
|
||||
this.rightWing.addBox(0.0F, 0.0F, -3.0F, 1, 4, 6);
|
||||
this.rightWing.setRotationPoint(-4.0F, (float) (-3 + b0), 0.0F);
|
||||
this.leftWing = new ModelRenderer(this, 24, 13);
|
||||
this.leftWing.addBox(-1.0F, 0.0F, -3.0F, 1, 4, 6);
|
||||
this.leftWing.setRotationPoint(4.0F, (float) (-3 + b0), 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
if (this.isChild) {
|
||||
float f6 = 2.0F;
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.0F, 5.0F * f5, 2.0F * f5);
|
||||
this.head.render(f5);
|
||||
this.bill.render(f5);
|
||||
this.chin.render(f5);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(1.0F / f6, 1.0F / f6, 1.0F / f6);
|
||||
GlStateManager.translate(0.0F, 24.0F * f5, 0.0F);
|
||||
this.body.render(f5);
|
||||
this.rightLeg.render(f5);
|
||||
this.leftLeg.render(f5);
|
||||
this.rightWing.render(f5);
|
||||
this.leftWing.render(f5);
|
||||
GlStateManager.popMatrix();
|
||||
} else {
|
||||
this.head.render(f5);
|
||||
this.bill.render(f5);
|
||||
this.chin.render(f5);
|
||||
this.body.render(f5);
|
||||
this.rightLeg.render(f5);
|
||||
this.leftLeg.render(f5);
|
||||
this.rightWing.render(f5);
|
||||
this.leftWing.render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float var6, Entity var7) {
|
||||
this.head.rotateAngleX = f4 / 57.295776F;
|
||||
this.head.rotateAngleY = f3 / 57.295776F;
|
||||
this.bill.rotateAngleX = this.head.rotateAngleX;
|
||||
this.bill.rotateAngleY = this.head.rotateAngleY;
|
||||
this.chin.rotateAngleX = this.head.rotateAngleX;
|
||||
this.chin.rotateAngleY = this.head.rotateAngleY;
|
||||
this.body.rotateAngleX = 1.5707964F;
|
||||
this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.4F * f1;
|
||||
this.rightWing.rotateAngleZ = f2;
|
||||
this.leftWing.rotateAngleZ = -f2;
|
||||
}
|
||||
}
|
||||
45
src/main/java/net/minecraft/client/model/ModelCow.java
Executable file
45
src/main/java/net/minecraft/client/model/ModelCow.java
Executable file
@@ -0,0 +1,45 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelCow extends ModelQuadruped {
|
||||
public ModelCow() {
|
||||
super(12, 0.0F);
|
||||
this.head = new ModelRenderer(this, 0, 0);
|
||||
this.head.addBox(-4.0F, -4.0F, -6.0F, 8, 8, 6, 0.0F);
|
||||
this.head.setRotationPoint(0.0F, 4.0F, -8.0F);
|
||||
this.head.setTextureOffset(22, 0).addBox(-5.0F, -5.0F, -4.0F, 1, 3, 1, 0.0F);
|
||||
this.head.setTextureOffset(22, 0).addBox(4.0F, -5.0F, -4.0F, 1, 3, 1, 0.0F);
|
||||
this.body = new ModelRenderer(this, 18, 4);
|
||||
this.body.addBox(-6.0F, -10.0F, -7.0F, 12, 18, 10, 0.0F);
|
||||
this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
|
||||
this.body.setTextureOffset(52, 0).addBox(-2.0F, 2.0F, -8.0F, 4, 6, 1);
|
||||
--this.leg1.rotationPointX;
|
||||
++this.leg2.rotationPointX;
|
||||
this.leg1.rotationPointZ += 0.0F;
|
||||
this.leg2.rotationPointZ += 0.0F;
|
||||
--this.leg3.rotationPointX;
|
||||
++this.leg4.rotationPointX;
|
||||
--this.leg3.rotationPointZ;
|
||||
--this.leg4.rotationPointZ;
|
||||
this.childZOffset += 2.0F;
|
||||
}
|
||||
}
|
||||
93
src/main/java/net/minecraft/client/model/ModelCreeper.java
Executable file
93
src/main/java/net/minecraft/client/model/ModelCreeper.java
Executable file
@@ -0,0 +1,93 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelCreeper extends ModelBase {
|
||||
public ModelRenderer head;
|
||||
public ModelRenderer creeperArmor;
|
||||
public ModelRenderer body;
|
||||
public ModelRenderer leg1;
|
||||
public ModelRenderer leg2;
|
||||
public ModelRenderer leg3;
|
||||
public ModelRenderer leg4;
|
||||
|
||||
public ModelCreeper() {
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public ModelCreeper(float parFloat1) {
|
||||
byte b0 = 6;
|
||||
this.head = new ModelRenderer(this, 0, 0);
|
||||
this.head.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, parFloat1);
|
||||
this.head.setRotationPoint(0.0F, (float) b0, 0.0F);
|
||||
this.creeperArmor = new ModelRenderer(this, 32, 0);
|
||||
this.creeperArmor.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, parFloat1 + 0.5F);
|
||||
this.creeperArmor.setRotationPoint(0.0F, (float) b0, 0.0F);
|
||||
this.body = new ModelRenderer(this, 16, 16);
|
||||
this.body.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, parFloat1);
|
||||
this.body.setRotationPoint(0.0F, (float) b0, 0.0F);
|
||||
this.leg1 = new ModelRenderer(this, 0, 16);
|
||||
this.leg1.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, parFloat1);
|
||||
this.leg1.setRotationPoint(-2.0F, (float) (12 + b0), 4.0F);
|
||||
this.leg2 = new ModelRenderer(this, 0, 16);
|
||||
this.leg2.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, parFloat1);
|
||||
this.leg2.setRotationPoint(2.0F, (float) (12 + b0), 4.0F);
|
||||
this.leg3 = new ModelRenderer(this, 0, 16);
|
||||
this.leg3.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, parFloat1);
|
||||
this.leg3.setRotationPoint(-2.0F, (float) (12 + b0), -4.0F);
|
||||
this.leg4 = new ModelRenderer(this, 0, 16);
|
||||
this.leg4.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, parFloat1);
|
||||
this.leg4.setRotationPoint(2.0F, (float) (12 + b0), -4.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.head.render(f5);
|
||||
this.body.render(f5);
|
||||
this.leg1.render(f5);
|
||||
this.leg2.render(f5);
|
||||
this.leg3.render(f5);
|
||||
this.leg4.render(f5);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float var3, float f2, float f3, float var6, Entity var7) {
|
||||
this.head.rotateAngleY = f2 / 57.295776F;
|
||||
this.head.rotateAngleX = f3 / 57.295776F;
|
||||
this.leg1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.leg2.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.4F * f1;
|
||||
this.leg3.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.4F * f1;
|
||||
this.leg4.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
}
|
||||
}
|
||||
261
src/main/java/net/minecraft/client/model/ModelDragon.java
Executable file
261
src/main/java/net/minecraft/client/model/ModelDragon.java
Executable file
@@ -0,0 +1,261 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.boss.EntityDragon;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelDragon extends ModelBase {
|
||||
private ModelRenderer head;
|
||||
private ModelRenderer spine;
|
||||
private ModelRenderer jaw;
|
||||
private ModelRenderer body;
|
||||
private ModelRenderer rearLeg;
|
||||
private ModelRenderer frontLeg;
|
||||
private ModelRenderer rearLegTip;
|
||||
private ModelRenderer frontLegTip;
|
||||
private ModelRenderer rearFoot;
|
||||
private ModelRenderer frontFoot;
|
||||
private ModelRenderer wing;
|
||||
private ModelRenderer wingTip;
|
||||
private float partialTicks;
|
||||
|
||||
public ModelDragon(float parFloat1) {
|
||||
this.textureWidth = 256;
|
||||
this.textureHeight = 256;
|
||||
this.setTextureOffset("body.body", 0, 0);
|
||||
this.setTextureOffset("wing.skin", -56, 88);
|
||||
this.setTextureOffset("wingtip.skin", -56, 144);
|
||||
this.setTextureOffset("rearleg.main", 0, 0);
|
||||
this.setTextureOffset("rearfoot.main", 112, 0);
|
||||
this.setTextureOffset("rearlegtip.main", 196, 0);
|
||||
this.setTextureOffset("head.upperhead", 112, 30);
|
||||
this.setTextureOffset("wing.bone", 112, 88);
|
||||
this.setTextureOffset("head.upperlip", 176, 44);
|
||||
this.setTextureOffset("jaw.jaw", 176, 65);
|
||||
this.setTextureOffset("frontleg.main", 112, 104);
|
||||
this.setTextureOffset("wingtip.bone", 112, 136);
|
||||
this.setTextureOffset("frontfoot.main", 144, 104);
|
||||
this.setTextureOffset("neck.box", 192, 104);
|
||||
this.setTextureOffset("frontlegtip.main", 226, 138);
|
||||
this.setTextureOffset("body.scale", 220, 53);
|
||||
this.setTextureOffset("head.scale", 0, 0);
|
||||
this.setTextureOffset("neck.scale", 48, 0);
|
||||
this.setTextureOffset("head.nostril", 112, 0);
|
||||
float f = -16.0F;
|
||||
this.head = new ModelRenderer(this, "head");
|
||||
this.head.addBox("upperlip", -6.0F, -1.0F, -8.0F + f, 12, 5, 16);
|
||||
this.head.addBox("upperhead", -8.0F, -8.0F, 6.0F + f, 16, 16, 16);
|
||||
this.head.mirror = true;
|
||||
this.head.addBox("scale", -5.0F, -12.0F, 12.0F + f, 2, 4, 6);
|
||||
this.head.addBox("nostril", -5.0F, -3.0F, -6.0F + f, 2, 2, 4);
|
||||
this.head.mirror = false;
|
||||
this.head.addBox("scale", 3.0F, -12.0F, 12.0F + f, 2, 4, 6);
|
||||
this.head.addBox("nostril", 3.0F, -3.0F, -6.0F + f, 2, 2, 4);
|
||||
this.jaw = new ModelRenderer(this, "jaw");
|
||||
this.jaw.setRotationPoint(0.0F, 4.0F, 8.0F + f);
|
||||
this.jaw.addBox("jaw", -6.0F, 0.0F, -16.0F, 12, 4, 16);
|
||||
this.head.addChild(this.jaw);
|
||||
this.spine = new ModelRenderer(this, "neck");
|
||||
this.spine.addBox("box", -5.0F, -5.0F, -5.0F, 10, 10, 10);
|
||||
this.spine.addBox("scale", -1.0F, -9.0F, -3.0F, 2, 4, 6);
|
||||
this.body = new ModelRenderer(this, "body");
|
||||
this.body.setRotationPoint(0.0F, 4.0F, 8.0F);
|
||||
this.body.addBox("body", -12.0F, 0.0F, -16.0F, 24, 24, 64);
|
||||
this.body.addBox("scale", -1.0F, -6.0F, -10.0F, 2, 6, 12);
|
||||
this.body.addBox("scale", -1.0F, -6.0F, 10.0F, 2, 6, 12);
|
||||
this.body.addBox("scale", -1.0F, -6.0F, 30.0F, 2, 6, 12);
|
||||
this.wing = new ModelRenderer(this, "wing");
|
||||
this.wing.setRotationPoint(-12.0F, 5.0F, 2.0F);
|
||||
this.wing.addBox("bone", -56.0F, -4.0F, -4.0F, 56, 8, 8);
|
||||
this.wing.addBox("skin", -56.0F, 0.0F, 2.0F, 56, 0, 56);
|
||||
this.wingTip = new ModelRenderer(this, "wingtip");
|
||||
this.wingTip.setRotationPoint(-56.0F, 0.0F, 0.0F);
|
||||
this.wingTip.addBox("bone", -56.0F, -2.0F, -2.0F, 56, 4, 4);
|
||||
this.wingTip.addBox("skin", -56.0F, 0.0F, 2.0F, 56, 0, 56);
|
||||
this.wing.addChild(this.wingTip);
|
||||
this.frontLeg = new ModelRenderer(this, "frontleg");
|
||||
this.frontLeg.setRotationPoint(-12.0F, 20.0F, 2.0F);
|
||||
this.frontLeg.addBox("main", -4.0F, -4.0F, -4.0F, 8, 24, 8);
|
||||
this.frontLegTip = new ModelRenderer(this, "frontlegtip");
|
||||
this.frontLegTip.setRotationPoint(0.0F, 20.0F, -1.0F);
|
||||
this.frontLegTip.addBox("main", -3.0F, -1.0F, -3.0F, 6, 24, 6);
|
||||
this.frontLeg.addChild(this.frontLegTip);
|
||||
this.frontFoot = new ModelRenderer(this, "frontfoot");
|
||||
this.frontFoot.setRotationPoint(0.0F, 23.0F, 0.0F);
|
||||
this.frontFoot.addBox("main", -4.0F, 0.0F, -12.0F, 8, 4, 16);
|
||||
this.frontLegTip.addChild(this.frontFoot);
|
||||
this.rearLeg = new ModelRenderer(this, "rearleg");
|
||||
this.rearLeg.setRotationPoint(-16.0F, 16.0F, 42.0F);
|
||||
this.rearLeg.addBox("main", -8.0F, -4.0F, -8.0F, 16, 32, 16);
|
||||
this.rearLegTip = new ModelRenderer(this, "rearlegtip");
|
||||
this.rearLegTip.setRotationPoint(0.0F, 32.0F, -4.0F);
|
||||
this.rearLegTip.addBox("main", -6.0F, -2.0F, 0.0F, 12, 32, 12);
|
||||
this.rearLeg.addChild(this.rearLegTip);
|
||||
this.rearFoot = new ModelRenderer(this, "rearfoot");
|
||||
this.rearFoot.setRotationPoint(0.0F, 31.0F, 4.0F);
|
||||
this.rearFoot.addBox("main", -9.0F, 0.0F, -20.0F, 18, 6, 24);
|
||||
this.rearLegTip.addChild(this.rearFoot);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase var1, float var2, float var3, float f) {
|
||||
this.partialTicks = f;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float var2, float var3, float var4, float var5, float var6, float f) {
|
||||
GlStateManager.pushMatrix();
|
||||
EntityDragon entitydragon = (EntityDragon) entity;
|
||||
float f1 = entitydragon.prevAnimTime + (entitydragon.animTime - entitydragon.prevAnimTime) * this.partialTicks;
|
||||
this.jaw.rotateAngleX = (float) (Math.sin((double) (f1 * 3.1415927F * 2.0F)) + 1.0D) * 0.2F;
|
||||
float f2 = (float) (Math.sin((double) (f1 * 3.1415927F * 2.0F - 1.0F)) + 1.0D);
|
||||
f2 = (f2 * f2 * 1.0F + f2 * 2.0F) * 0.05F;
|
||||
GlStateManager.translate(0.0F, f2 - 2.0F, -3.0F);
|
||||
GlStateManager.rotate(f2 * 2.0F, 1.0F, 0.0F, 0.0F);
|
||||
float f3 = -30.0F;
|
||||
float f5 = 0.0F;
|
||||
float f6 = 1.5F;
|
||||
double[] adouble = entitydragon.getMovementOffsets(6, this.partialTicks);
|
||||
float f7 = this.updateRotations(entitydragon.getMovementOffsets(5, this.partialTicks)[0]
|
||||
- entitydragon.getMovementOffsets(10, this.partialTicks)[0]);
|
||||
float f8 = this
|
||||
.updateRotations(entitydragon.getMovementOffsets(5, this.partialTicks)[0] + (double) (f7 / 2.0F));
|
||||
f3 = f3 + 2.0F;
|
||||
float f9 = f1 * 3.1415927F * 2.0F;
|
||||
f3 = 20.0F;
|
||||
float f4 = -12.0F;
|
||||
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
double[] adouble1 = entitydragon.getMovementOffsets(5 - i, this.partialTicks);
|
||||
float f10 = (float) Math.cos((double) ((float) i * 0.45F + f9)) * 0.15F;
|
||||
this.spine.rotateAngleY = this.updateRotations(adouble1[0] - adouble[0]) * 3.1415927F / 180.0F * f6;
|
||||
this.spine.rotateAngleX = f10 + (float) (adouble1[1] - adouble[1]) * 3.1415927F / 180.0F * f6 * 5.0F;
|
||||
this.spine.rotateAngleZ = -this.updateRotations(adouble1[0] - (double) f8) * 3.1415927F / 180.0F * f6;
|
||||
this.spine.rotationPointY = f3;
|
||||
this.spine.rotationPointZ = f4;
|
||||
this.spine.rotationPointX = f5;
|
||||
f3 = (float) ((double) f3 + Math.sin((double) this.spine.rotateAngleX) * 10.0D);
|
||||
f4 = (float) ((double) f4
|
||||
- Math.cos((double) this.spine.rotateAngleY) * Math.cos((double) this.spine.rotateAngleX) * 10.0D);
|
||||
f5 = (float) ((double) f5
|
||||
- Math.sin((double) this.spine.rotateAngleY) * Math.cos((double) this.spine.rotateAngleX) * 10.0D);
|
||||
this.spine.render(f);
|
||||
}
|
||||
|
||||
this.head.rotationPointY = f3;
|
||||
this.head.rotationPointZ = f4;
|
||||
this.head.rotationPointX = f5;
|
||||
double[] adouble2 = entitydragon.getMovementOffsets(0, this.partialTicks);
|
||||
this.head.rotateAngleY = this.updateRotations(adouble2[0] - adouble[0]) * 3.1415927F / 180.0F * 1.0F;
|
||||
this.head.rotateAngleZ = -this.updateRotations(adouble2[0] - (double) f8) * 3.1415927F / 180.0F * 1.0F;
|
||||
this.head.render(f);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(-f7 * f6 * 1.0F, 0.0F, 0.0F, 1.0F);
|
||||
GlStateManager.translate(0.0F, -1.0F, 0.0F);
|
||||
this.body.rotateAngleZ = 0.0F;
|
||||
this.body.render(f);
|
||||
|
||||
boolean flag = DeferredStateManager.isEnableShadowRender();
|
||||
for (int j = 0; j < 2; ++j) {
|
||||
GlStateManager.enableCull();
|
||||
float f12 = f1 * 3.1415927F * 2.0F;
|
||||
this.wing.rotateAngleX = 0.125F - (float) Math.cos((double) f12) * 0.2F;
|
||||
this.wing.rotateAngleY = 0.25F;
|
||||
this.wing.rotateAngleZ = (float) (Math.sin((double) f12) + 0.125D) * 0.8F;
|
||||
this.wingTip.rotateAngleZ = -((float) (Math.sin((double) (f12 + 2.0F)) + 0.5D)) * 0.75F;
|
||||
this.rearLeg.rotateAngleX = 1.0F + f2 * 0.1F;
|
||||
this.rearLegTip.rotateAngleX = 0.5F + f2 * 0.1F;
|
||||
this.rearFoot.rotateAngleX = 0.75F + f2 * 0.1F;
|
||||
this.frontLeg.rotateAngleX = 1.3F + f2 * 0.1F;
|
||||
this.frontLegTip.rotateAngleX = -0.5F - f2 * 0.1F;
|
||||
this.frontFoot.rotateAngleX = 0.75F + f2 * 0.1F;
|
||||
this.wing.render(f);
|
||||
this.frontLeg.render(f);
|
||||
this.rearLeg.render(f);
|
||||
GlStateManager.scale(-1.0F, 1.0F, 1.0F);
|
||||
if (j == 0) {
|
||||
GlStateManager.cullFace(flag ? GL_BACK : GL_FRONT);
|
||||
}
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.cullFace(flag ? GL_FRONT : GL_BACK);
|
||||
GlStateManager.disableCull();
|
||||
float f11 = -((float) Math.sin((double) (f1 * 3.1415927F * 2.0F))) * 0.0F;
|
||||
f9 = f1 * 3.1415927F * 2.0F;
|
||||
f3 = 10.0F;
|
||||
f4 = 60.0F;
|
||||
f5 = 0.0F;
|
||||
adouble = entitydragon.getMovementOffsets(11, this.partialTicks);
|
||||
|
||||
for (int k = 0; k < 12; ++k) {
|
||||
adouble2 = entitydragon.getMovementOffsets(12 + k, this.partialTicks);
|
||||
f11 = (float) ((double) f11 + Math.sin((double) ((float) k * 0.45F + f9)) * 0.05000000074505806D);
|
||||
this.spine.rotateAngleY = (this.updateRotations(adouble2[0] - adouble[0]) * f6 + 180.0F) * 3.1415927F
|
||||
/ 180.0F;
|
||||
this.spine.rotateAngleX = f11 + (float) (adouble2[1] - adouble[1]) * 3.1415927F / 180.0F * f6 * 5.0F;
|
||||
this.spine.rotateAngleZ = this.updateRotations(adouble2[0] - (double) f8) * 3.1415927F / 180.0F * f6;
|
||||
this.spine.rotationPointY = f3;
|
||||
this.spine.rotationPointZ = f4;
|
||||
this.spine.rotationPointX = f5;
|
||||
f3 = (float) ((double) f3 + Math.sin((double) this.spine.rotateAngleX) * 10.0D);
|
||||
f4 = (float) ((double) f4
|
||||
- Math.cos((double) this.spine.rotateAngleY) * Math.cos((double) this.spine.rotateAngleX) * 10.0D);
|
||||
f5 = (float) ((double) f5
|
||||
- Math.sin((double) this.spine.rotateAngleY) * Math.cos((double) this.spine.rotateAngleX) * 10.0D);
|
||||
this.spine.render(f);
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
/**+
|
||||
* Updates the rotations in the parameters for rotations greater
|
||||
* than 180 degrees or less than -180 degrees. It adds or
|
||||
* subtracts 360 degrees, so that the appearance is the same,
|
||||
* although the numbers are then simplified to range -180 to 180
|
||||
*/
|
||||
private float updateRotations(double parDouble1) {
|
||||
while (parDouble1 >= 180.0D) {
|
||||
parDouble1 -= 360.0D;
|
||||
}
|
||||
|
||||
while (parDouble1 < -180.0D) {
|
||||
parDouble1 += 360.0D;
|
||||
}
|
||||
|
||||
return (float) parDouble1;
|
||||
}
|
||||
}
|
||||
72
src/main/java/net/minecraft/client/model/ModelEnderCrystal.java
Executable file
72
src/main/java/net/minecraft/client/model/ModelEnderCrystal.java
Executable file
@@ -0,0 +1,72 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelEnderCrystal extends ModelBase {
|
||||
private ModelRenderer cube;
|
||||
/**+
|
||||
* The glass model for the Ender Crystal.
|
||||
*/
|
||||
private ModelRenderer glass = new ModelRenderer(this, "glass");
|
||||
private ModelRenderer base;
|
||||
|
||||
public ModelEnderCrystal(float parFloat1, boolean parFlag) {
|
||||
this.glass.setTextureOffset(0, 0).addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8);
|
||||
this.cube = new ModelRenderer(this, "cube");
|
||||
this.cube.setTextureOffset(32, 0).addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8);
|
||||
if (parFlag) {
|
||||
this.base = new ModelRenderer(this, "base");
|
||||
this.base.setTextureOffset(0, 16).addBox(-6.0F, 0.0F, -6.0F, 12, 4, 12);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity var1, float var2, float f, float f1, float var5, float var6, float f2) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(2.0F, 2.0F, 2.0F);
|
||||
GlStateManager.translate(0.0F, -0.5F, 0.0F);
|
||||
if (this.base != null) {
|
||||
this.base.render(f2);
|
||||
}
|
||||
|
||||
GlStateManager.rotate(f, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.translate(0.0F, 0.8F + f1, 0.0F);
|
||||
GlStateManager.rotate(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
this.glass.render(f2);
|
||||
float f3 = 0.875F;
|
||||
GlStateManager.scale(f3, f3, f3);
|
||||
GlStateManager.rotate(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
GlStateManager.rotate(f, 0.0F, 1.0F, 0.0F);
|
||||
this.glass.render(f2);
|
||||
GlStateManager.scale(f3, f3, f3);
|
||||
GlStateManager.rotate(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
GlStateManager.rotate(f, 0.0F, 1.0F, 0.0F);
|
||||
this.cube.render(f2);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
78
src/main/java/net/minecraft/client/model/ModelEnderMite.java
Executable file
78
src/main/java/net/minecraft/client/model/ModelEnderMite.java
Executable file
@@ -0,0 +1,78 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelEnderMite extends ModelBase {
|
||||
private static final int[][] field_178716_a = new int[][] { { 4, 3, 2 }, { 6, 4, 5 }, { 3, 3, 1 }, { 1, 2, 1 } };
|
||||
private static final int[][] field_178714_b = new int[][] { { 0, 0 }, { 0, 5 }, { 0, 14 }, { 0, 18 } };
|
||||
private static final int field_178715_c = field_178716_a.length;
|
||||
private final ModelRenderer[] field_178713_d;
|
||||
|
||||
public ModelEnderMite() {
|
||||
this.field_178713_d = new ModelRenderer[field_178715_c];
|
||||
float f = -3.5F;
|
||||
|
||||
for (int i = 0; i < this.field_178713_d.length; ++i) {
|
||||
this.field_178713_d[i] = new ModelRenderer(this, field_178714_b[i][0], field_178714_b[i][1]);
|
||||
this.field_178713_d[i].addBox((float) field_178716_a[i][0] * -0.5F, 0.0F,
|
||||
(float) field_178716_a[i][2] * -0.5F, field_178716_a[i][0], field_178716_a[i][1],
|
||||
field_178716_a[i][2]);
|
||||
this.field_178713_d[i].setRotationPoint(0.0F, (float) (24 - field_178716_a[i][1]), f);
|
||||
if (i < this.field_178713_d.length - 1) {
|
||||
f += (float) (field_178716_a[i][2] + field_178716_a[i + 1][2]) * 0.5F;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
for (int i = 0; i < this.field_178713_d.length; ++i) {
|
||||
this.field_178713_d[i].render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float var1, float var2, float f, float var4, float var5, float var6, Entity var7) {
|
||||
for (int i = 0; i < this.field_178713_d.length; ++i) {
|
||||
this.field_178713_d[i].rotateAngleY = MathHelper.cos(f * 0.9F + (float) i * 0.15F * 3.1415927F) * 3.1415927F
|
||||
* 0.01F * (float) (1 + Math.abs(i - 2));
|
||||
this.field_178713_d[i].rotationPointX = MathHelper.sin(f * 0.9F + (float) i * 0.15F * 3.1415927F)
|
||||
* 3.1415927F * 0.1F * (float) Math.abs(i - 2);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
134
src/main/java/net/minecraft/client/model/ModelEnderman.java
Executable file
134
src/main/java/net/minecraft/client/model/ModelEnderman.java
Executable file
@@ -0,0 +1,134 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelEnderman extends ModelBiped {
|
||||
public boolean isCarrying;
|
||||
public boolean isAttacking;
|
||||
|
||||
public ModelEnderman(float parFloat1) {
|
||||
super(0.0F, -14.0F, 64, 32);
|
||||
float f = -14.0F;
|
||||
this.bipedHeadwear = new ModelRenderer(this, 0, 16);
|
||||
this.bipedHeadwear.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, parFloat1 - 0.5F);
|
||||
this.bipedHeadwear.setRotationPoint(0.0F, 0.0F + f, 0.0F);
|
||||
this.bipedBody = new ModelRenderer(this, 32, 16);
|
||||
this.bipedBody.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, parFloat1);
|
||||
this.bipedBody.setRotationPoint(0.0F, 0.0F + f, 0.0F);
|
||||
this.bipedRightArm = new ModelRenderer(this, 56, 0);
|
||||
this.bipedRightArm.addBox(-1.0F, -2.0F, -1.0F, 2, 30, 2, parFloat1);
|
||||
this.bipedRightArm.setRotationPoint(-3.0F, 2.0F + f, 0.0F);
|
||||
this.bipedLeftArm = new ModelRenderer(this, 56, 0);
|
||||
this.bipedLeftArm.mirror = true;
|
||||
this.bipedLeftArm.addBox(-1.0F, -2.0F, -1.0F, 2, 30, 2, parFloat1);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.0F + f, 0.0F);
|
||||
this.bipedRightLeg = new ModelRenderer(this, 56, 0);
|
||||
this.bipedRightLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 30, 2, parFloat1);
|
||||
this.bipedRightLeg.setRotationPoint(-2.0F, 12.0F + f, 0.0F);
|
||||
this.bipedLeftLeg = new ModelRenderer(this, 56, 0);
|
||||
this.bipedLeftLeg.mirror = true;
|
||||
this.bipedLeftLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 30, 2, parFloat1);
|
||||
this.bipedLeftLeg.setRotationPoint(2.0F, 12.0F + f, 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.bipedHead.showModel = true;
|
||||
float f6 = -14.0F;
|
||||
this.bipedBody.rotateAngleX = 0.0F;
|
||||
this.bipedBody.rotationPointY = f6;
|
||||
this.bipedBody.rotationPointZ = 0.0F;
|
||||
this.bipedRightLeg.rotateAngleX -= 0.0F;
|
||||
this.bipedLeftLeg.rotateAngleX -= 0.0F;
|
||||
this.bipedRightArm.rotateAngleX = (float) ((double) this.bipedRightArm.rotateAngleX * 0.5D);
|
||||
this.bipedLeftArm.rotateAngleX = (float) ((double) this.bipedLeftArm.rotateAngleX * 0.5D);
|
||||
this.bipedRightLeg.rotateAngleX = (float) ((double) this.bipedRightLeg.rotateAngleX * 0.5D);
|
||||
this.bipedLeftLeg.rotateAngleX = (float) ((double) this.bipedLeftLeg.rotateAngleX * 0.5D);
|
||||
float f7 = 0.4F;
|
||||
if (this.bipedRightArm.rotateAngleX > f7) {
|
||||
this.bipedRightArm.rotateAngleX = f7;
|
||||
}
|
||||
|
||||
if (this.bipedLeftArm.rotateAngleX > f7) {
|
||||
this.bipedLeftArm.rotateAngleX = f7;
|
||||
}
|
||||
|
||||
if (this.bipedRightArm.rotateAngleX < -f7) {
|
||||
this.bipedRightArm.rotateAngleX = -f7;
|
||||
}
|
||||
|
||||
if (this.bipedLeftArm.rotateAngleX < -f7) {
|
||||
this.bipedLeftArm.rotateAngleX = -f7;
|
||||
}
|
||||
|
||||
if (this.bipedRightLeg.rotateAngleX > f7) {
|
||||
this.bipedRightLeg.rotateAngleX = f7;
|
||||
}
|
||||
|
||||
if (this.bipedLeftLeg.rotateAngleX > f7) {
|
||||
this.bipedLeftLeg.rotateAngleX = f7;
|
||||
}
|
||||
|
||||
if (this.bipedRightLeg.rotateAngleX < -f7) {
|
||||
this.bipedRightLeg.rotateAngleX = -f7;
|
||||
}
|
||||
|
||||
if (this.bipedLeftLeg.rotateAngleX < -f7) {
|
||||
this.bipedLeftLeg.rotateAngleX = -f7;
|
||||
}
|
||||
|
||||
if (this.isCarrying) {
|
||||
this.bipedRightArm.rotateAngleX = -0.5F;
|
||||
this.bipedLeftArm.rotateAngleX = -0.5F;
|
||||
this.bipedRightArm.rotateAngleZ = 0.05F;
|
||||
this.bipedLeftArm.rotateAngleZ = -0.05F;
|
||||
}
|
||||
|
||||
this.bipedRightArm.rotationPointZ = 0.0F;
|
||||
this.bipedLeftArm.rotationPointZ = 0.0F;
|
||||
this.bipedRightLeg.rotationPointZ = 0.0F;
|
||||
this.bipedLeftLeg.rotationPointZ = 0.0F;
|
||||
this.bipedRightLeg.rotationPointY = 9.0F + f6;
|
||||
this.bipedLeftLeg.rotationPointY = 9.0F + f6;
|
||||
this.bipedHead.rotationPointZ = 0.0F;
|
||||
this.bipedHead.rotationPointY = f6 + 1.0F;
|
||||
this.bipedHeadwear.rotationPointX = this.bipedHead.rotationPointX;
|
||||
this.bipedHeadwear.rotationPointY = this.bipedHead.rotationPointY;
|
||||
this.bipedHeadwear.rotationPointZ = this.bipedHead.rotationPointZ;
|
||||
this.bipedHeadwear.rotateAngleX = this.bipedHead.rotateAngleX;
|
||||
this.bipedHeadwear.rotateAngleY = this.bipedHead.rotateAngleY;
|
||||
this.bipedHeadwear.rotateAngleZ = this.bipedHead.rotateAngleZ;
|
||||
if (this.isAttacking) {
|
||||
float f8 = 1.0F;
|
||||
this.bipedHead.rotationPointY -= f8 * 5.0F;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
83
src/main/java/net/minecraft/client/model/ModelGhast.java
Executable file
83
src/main/java/net/minecraft/client/model/ModelGhast.java
Executable file
@@ -0,0 +1,83 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelGhast extends ModelBase {
|
||||
ModelRenderer body;
|
||||
ModelRenderer[] tentacles = new ModelRenderer[9];
|
||||
|
||||
public ModelGhast() {
|
||||
byte b0 = -16;
|
||||
this.body = new ModelRenderer(this, 0, 0);
|
||||
this.body.addBox(-8.0F, -8.0F, -8.0F, 16, 16, 16);
|
||||
this.body.rotationPointY += (float) (24 + b0);
|
||||
EaglercraftRandom random = new EaglercraftRandom(1660L);
|
||||
|
||||
for (int i = 0; i < this.tentacles.length; ++i) {
|
||||
this.tentacles[i] = new ModelRenderer(this, 0, 0);
|
||||
float f = (((float) (i % 3) - (float) (i / 3 % 2) * 0.5F + 0.25F) / 2.0F * 2.0F - 1.0F) * 5.0F;
|
||||
float f1 = ((float) (i / 3) / 2.0F * 2.0F - 1.0F) * 5.0F;
|
||||
int j = random.nextInt(7) + 8;
|
||||
this.tentacles[i].addBox(-1.0F, 0.0F, -1.0F, 2, j, 2);
|
||||
this.tentacles[i].rotationPointX = f;
|
||||
this.tentacles[i].rotationPointZ = f1;
|
||||
this.tentacles[i].rotationPointY = (float) (31 + b0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float var1, float var2, float f, float var4, float var5, float var6, Entity var7) {
|
||||
for (int i = 0; i < this.tentacles.length; ++i) {
|
||||
this.tentacles[i].rotateAngleX = 0.2F * MathHelper.sin(f * 0.3F + (float) i) + 0.4F;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.0F, 0.6F, 0.0F);
|
||||
this.body.render(f5);
|
||||
|
||||
for (ModelRenderer modelrenderer : this.tentacles) {
|
||||
modelrenderer.render(f5);
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
150
src/main/java/net/minecraft/client/model/ModelGuardian.java
Executable file
150
src/main/java/net/minecraft/client/model/ModelGuardian.java
Executable file
@@ -0,0 +1,150 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntityGuardian;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelGuardian extends ModelBase {
|
||||
private ModelRenderer guardianBody;
|
||||
private ModelRenderer guardianEye;
|
||||
private ModelRenderer[] guardianSpines;
|
||||
private ModelRenderer[] guardianTail;
|
||||
|
||||
public ModelGuardian() {
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 64;
|
||||
this.guardianSpines = new ModelRenderer[12];
|
||||
this.guardianBody = new ModelRenderer(this);
|
||||
this.guardianBody.setTextureOffset(0, 0).addBox(-6.0F, 10.0F, -8.0F, 12, 12, 16);
|
||||
this.guardianBody.setTextureOffset(0, 28).addBox(-8.0F, 10.0F, -6.0F, 2, 12, 12);
|
||||
this.guardianBody.setTextureOffset(0, 28).addBox(6.0F, 10.0F, -6.0F, 2, 12, 12, true);
|
||||
this.guardianBody.setTextureOffset(16, 40).addBox(-6.0F, 8.0F, -6.0F, 12, 2, 12);
|
||||
this.guardianBody.setTextureOffset(16, 40).addBox(-6.0F, 22.0F, -6.0F, 12, 2, 12);
|
||||
|
||||
for (int i = 0; i < this.guardianSpines.length; ++i) {
|
||||
this.guardianSpines[i] = new ModelRenderer(this, 0, 0);
|
||||
this.guardianSpines[i].addBox(-1.0F, -4.5F, -1.0F, 2, 9, 2);
|
||||
this.guardianBody.addChild(this.guardianSpines[i]);
|
||||
}
|
||||
|
||||
this.guardianEye = new ModelRenderer(this, 8, 0);
|
||||
this.guardianEye.addBox(-1.0F, 15.0F, 0.0F, 2, 2, 1);
|
||||
this.guardianBody.addChild(this.guardianEye);
|
||||
this.guardianTail = new ModelRenderer[3];
|
||||
this.guardianTail[0] = new ModelRenderer(this, 40, 0);
|
||||
this.guardianTail[0].addBox(-2.0F, 14.0F, 7.0F, 4, 4, 8);
|
||||
this.guardianTail[1] = new ModelRenderer(this, 0, 54);
|
||||
this.guardianTail[1].addBox(0.0F, 14.0F, 0.0F, 3, 3, 7);
|
||||
this.guardianTail[2] = new ModelRenderer(this);
|
||||
this.guardianTail[2].setTextureOffset(41, 32).addBox(0.0F, 14.0F, 0.0F, 2, 2, 6);
|
||||
this.guardianTail[2].setTextureOffset(25, 19).addBox(1.0F, 10.5F, 3.0F, 1, 9, 9);
|
||||
this.guardianBody.addChild(this.guardianTail[0]);
|
||||
this.guardianTail[0].addChild(this.guardianTail[1]);
|
||||
this.guardianTail[1].addChild(this.guardianTail[2]);
|
||||
}
|
||||
|
||||
public int func_178706_a() {
|
||||
return 54;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.guardianBody.render(f5);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float var1, float var2, float f, float f1, float f2, float var6, Entity entity) {
|
||||
EntityGuardian entityguardian = (EntityGuardian) entity;
|
||||
float f3 = f - (float) entityguardian.ticksExisted;
|
||||
this.guardianBody.rotateAngleY = f1 / 57.295776F;
|
||||
this.guardianBody.rotateAngleX = f2 / 57.295776F;
|
||||
float[] afloat = new float[] { 1.75F, 0.25F, 0.0F, 0.0F, 0.5F, 0.5F, 0.5F, 0.5F, 1.25F, 0.75F, 0.0F, 0.0F };
|
||||
float[] afloat1 = new float[] { 0.0F, 0.0F, 0.0F, 0.0F, 0.25F, 1.75F, 1.25F, 0.75F, 0.0F, 0.0F, 0.0F, 0.0F };
|
||||
float[] afloat2 = new float[] { 0.0F, 0.0F, 0.25F, 1.75F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.75F, 1.25F };
|
||||
float[] afloat3 = new float[] { 0.0F, 0.0F, 8.0F, -8.0F, -8.0F, 8.0F, 8.0F, -8.0F, 0.0F, 0.0F, 8.0F, -8.0F };
|
||||
float[] afloat4 = new float[] { -8.0F, -8.0F, -8.0F, -8.0F, 0.0F, 0.0F, 0.0F, 0.0F, 8.0F, 8.0F, 8.0F, 8.0F };
|
||||
float[] afloat5 = new float[] { 8.0F, -8.0F, 0.0F, 0.0F, -8.0F, -8.0F, 8.0F, 8.0F, 8.0F, -8.0F, 0.0F, 0.0F };
|
||||
float f4 = (1.0F - entityguardian.func_175469_o(f3)) * 0.55F;
|
||||
|
||||
for (int i = 0; i < 12; ++i) {
|
||||
this.guardianSpines[i].rotateAngleX = 3.1415927F * afloat[i];
|
||||
this.guardianSpines[i].rotateAngleY = 3.1415927F * afloat1[i];
|
||||
this.guardianSpines[i].rotateAngleZ = 3.1415927F * afloat2[i];
|
||||
this.guardianSpines[i].rotationPointX = afloat3[i]
|
||||
* (1.0F + MathHelper.cos(f * 1.5F + (float) i) * 0.01F - f4);
|
||||
this.guardianSpines[i].rotationPointY = 16.0F
|
||||
+ afloat4[i] * (1.0F + MathHelper.cos(f * 1.5F + (float) i) * 0.01F - f4);
|
||||
this.guardianSpines[i].rotationPointZ = afloat5[i]
|
||||
* (1.0F + MathHelper.cos(f * 1.5F + (float) i) * 0.01F - f4);
|
||||
}
|
||||
|
||||
this.guardianEye.rotationPointZ = -8.25F;
|
||||
Object object = Minecraft.getMinecraft().getRenderViewEntity();
|
||||
if (entityguardian.hasTargetedEntity()) {
|
||||
object = entityguardian.getTargetedEntity();
|
||||
}
|
||||
|
||||
if (object != null) {
|
||||
Vec3 vec3 = ((Entity) object).getPositionEyes(0.0F);
|
||||
Vec3 vec31 = entity.getPositionEyes(0.0F);
|
||||
double d0 = vec3.yCoord - vec31.yCoord;
|
||||
if (d0 > 0.0D) {
|
||||
this.guardianEye.rotationPointY = 0.0F;
|
||||
} else {
|
||||
this.guardianEye.rotationPointY = 1.0F;
|
||||
}
|
||||
|
||||
Vec3 vec32 = entity.getLook(0.0F);
|
||||
vec32 = new Vec3(vec32.xCoord, 0.0D, vec32.zCoord);
|
||||
Vec3 vec33 = (new Vec3(vec31.xCoord - vec3.xCoord, 0.0D, vec31.zCoord - vec3.zCoord)).normalize()
|
||||
.rotateYaw(1.5707964F);
|
||||
double d1 = vec32.dotProduct(vec33);
|
||||
this.guardianEye.rotationPointX = MathHelper.sqrt_float((float) Math.abs(d1)) * 2.0F
|
||||
* (float) Math.signum(d1);
|
||||
}
|
||||
|
||||
this.guardianEye.showModel = true;
|
||||
float f5 = entityguardian.func_175471_a(f3);
|
||||
this.guardianTail[0].rotateAngleY = MathHelper.sin(f5) * 3.1415927F * 0.05F;
|
||||
this.guardianTail[1].rotateAngleY = MathHelper.sin(f5) * 3.1415927F * 0.1F;
|
||||
this.guardianTail[1].rotationPointX = -1.5F;
|
||||
this.guardianTail[1].rotationPointY = 0.5F;
|
||||
this.guardianTail[1].rotationPointZ = 14.0F;
|
||||
this.guardianTail[2].rotateAngleY = MathHelper.sin(f5) * 3.1415927F * 0.15F;
|
||||
this.guardianTail[2].rotationPointX = 0.5F;
|
||||
this.guardianTail[2].rotationPointY = 0.5F;
|
||||
this.guardianTail[2].rotationPointZ = 6.0F;
|
||||
}
|
||||
}
|
||||
557
src/main/java/net/minecraft/client/model/ModelHorse.java
Executable file
557
src/main/java/net/minecraft/client/model/ModelHorse.java
Executable file
@@ -0,0 +1,557 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelHorse extends ModelBase {
|
||||
private ModelRenderer head;
|
||||
private ModelRenderer field_178711_b;
|
||||
private ModelRenderer field_178712_c;
|
||||
private ModelRenderer horseLeftEar;
|
||||
private ModelRenderer horseRightEar;
|
||||
private ModelRenderer muleLeftEar;
|
||||
private ModelRenderer muleRightEar;
|
||||
private ModelRenderer neck;
|
||||
private ModelRenderer horseFaceRopes;
|
||||
private ModelRenderer mane;
|
||||
private ModelRenderer body;
|
||||
private ModelRenderer tailBase;
|
||||
private ModelRenderer tailMiddle;
|
||||
private ModelRenderer tailTip;
|
||||
private ModelRenderer backLeftLeg;
|
||||
private ModelRenderer backLeftShin;
|
||||
private ModelRenderer backLeftHoof;
|
||||
private ModelRenderer backRightLeg;
|
||||
private ModelRenderer backRightShin;
|
||||
private ModelRenderer backRightHoof;
|
||||
private ModelRenderer frontLeftLeg;
|
||||
private ModelRenderer frontLeftShin;
|
||||
private ModelRenderer frontLeftHoof;
|
||||
private ModelRenderer frontRightLeg;
|
||||
private ModelRenderer frontRightShin;
|
||||
private ModelRenderer frontRightHoof;
|
||||
private ModelRenderer muleLeftChest;
|
||||
private ModelRenderer muleRightChest;
|
||||
private ModelRenderer horseSaddleBottom;
|
||||
private ModelRenderer horseSaddleFront;
|
||||
private ModelRenderer horseSaddleBack;
|
||||
private ModelRenderer horseLeftSaddleRope;
|
||||
private ModelRenderer horseLeftSaddleMetal;
|
||||
private ModelRenderer horseRightSaddleRope;
|
||||
private ModelRenderer horseRightSaddleMetal;
|
||||
private ModelRenderer horseLeftFaceMetal;
|
||||
private ModelRenderer horseRightFaceMetal;
|
||||
private ModelRenderer horseLeftRein;
|
||||
private ModelRenderer horseRightRein;
|
||||
|
||||
public ModelHorse() {
|
||||
this.textureWidth = 128;
|
||||
this.textureHeight = 128;
|
||||
this.body = new ModelRenderer(this, 0, 34);
|
||||
this.body.addBox(-5.0F, -8.0F, -19.0F, 10, 10, 24);
|
||||
this.body.setRotationPoint(0.0F, 11.0F, 9.0F);
|
||||
this.tailBase = new ModelRenderer(this, 44, 0);
|
||||
this.tailBase.addBox(-1.0F, -1.0F, 0.0F, 2, 2, 3);
|
||||
this.tailBase.setRotationPoint(0.0F, 3.0F, 14.0F);
|
||||
this.setBoxRotation(this.tailBase, -1.134464F, 0.0F, 0.0F);
|
||||
this.tailMiddle = new ModelRenderer(this, 38, 7);
|
||||
this.tailMiddle.addBox(-1.5F, -2.0F, 3.0F, 3, 4, 7);
|
||||
this.tailMiddle.setRotationPoint(0.0F, 3.0F, 14.0F);
|
||||
this.setBoxRotation(this.tailMiddle, -1.134464F, 0.0F, 0.0F);
|
||||
this.tailTip = new ModelRenderer(this, 24, 3);
|
||||
this.tailTip.addBox(-1.5F, -4.5F, 9.0F, 3, 4, 7);
|
||||
this.tailTip.setRotationPoint(0.0F, 3.0F, 14.0F);
|
||||
this.setBoxRotation(this.tailTip, -1.40215F, 0.0F, 0.0F);
|
||||
this.backLeftLeg = new ModelRenderer(this, 78, 29);
|
||||
this.backLeftLeg.addBox(-2.5F, -2.0F, -2.5F, 4, 9, 5);
|
||||
this.backLeftLeg.setRotationPoint(4.0F, 9.0F, 11.0F);
|
||||
this.backLeftShin = new ModelRenderer(this, 78, 43);
|
||||
this.backLeftShin.addBox(-2.0F, 0.0F, -1.5F, 3, 5, 3);
|
||||
this.backLeftShin.setRotationPoint(4.0F, 16.0F, 11.0F);
|
||||
this.backLeftHoof = new ModelRenderer(this, 78, 51);
|
||||
this.backLeftHoof.addBox(-2.5F, 5.1F, -2.0F, 4, 3, 4);
|
||||
this.backLeftHoof.setRotationPoint(4.0F, 16.0F, 11.0F);
|
||||
this.backRightLeg = new ModelRenderer(this, 96, 29);
|
||||
this.backRightLeg.addBox(-1.5F, -2.0F, -2.5F, 4, 9, 5);
|
||||
this.backRightLeg.setRotationPoint(-4.0F, 9.0F, 11.0F);
|
||||
this.backRightShin = new ModelRenderer(this, 96, 43);
|
||||
this.backRightShin.addBox(-1.0F, 0.0F, -1.5F, 3, 5, 3);
|
||||
this.backRightShin.setRotationPoint(-4.0F, 16.0F, 11.0F);
|
||||
this.backRightHoof = new ModelRenderer(this, 96, 51);
|
||||
this.backRightHoof.addBox(-1.5F, 5.1F, -2.0F, 4, 3, 4);
|
||||
this.backRightHoof.setRotationPoint(-4.0F, 16.0F, 11.0F);
|
||||
this.frontLeftLeg = new ModelRenderer(this, 44, 29);
|
||||
this.frontLeftLeg.addBox(-1.9F, -1.0F, -2.1F, 3, 8, 4);
|
||||
this.frontLeftLeg.setRotationPoint(4.0F, 9.0F, -8.0F);
|
||||
this.frontLeftShin = new ModelRenderer(this, 44, 41);
|
||||
this.frontLeftShin.addBox(-1.9F, 0.0F, -1.6F, 3, 5, 3);
|
||||
this.frontLeftShin.setRotationPoint(4.0F, 16.0F, -8.0F);
|
||||
this.frontLeftHoof = new ModelRenderer(this, 44, 51);
|
||||
this.frontLeftHoof.addBox(-2.4F, 5.1F, -2.1F, 4, 3, 4);
|
||||
this.frontLeftHoof.setRotationPoint(4.0F, 16.0F, -8.0F);
|
||||
this.frontRightLeg = new ModelRenderer(this, 60, 29);
|
||||
this.frontRightLeg.addBox(-1.1F, -1.0F, -2.1F, 3, 8, 4);
|
||||
this.frontRightLeg.setRotationPoint(-4.0F, 9.0F, -8.0F);
|
||||
this.frontRightShin = new ModelRenderer(this, 60, 41);
|
||||
this.frontRightShin.addBox(-1.1F, 0.0F, -1.6F, 3, 5, 3);
|
||||
this.frontRightShin.setRotationPoint(-4.0F, 16.0F, -8.0F);
|
||||
this.frontRightHoof = new ModelRenderer(this, 60, 51);
|
||||
this.frontRightHoof.addBox(-1.6F, 5.1F, -2.1F, 4, 3, 4);
|
||||
this.frontRightHoof.setRotationPoint(-4.0F, 16.0F, -8.0F);
|
||||
this.head = new ModelRenderer(this, 0, 0);
|
||||
this.head.addBox(-2.5F, -10.0F, -1.5F, 5, 5, 7);
|
||||
this.head.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.setBoxRotation(this.head, 0.5235988F, 0.0F, 0.0F);
|
||||
this.field_178711_b = new ModelRenderer(this, 24, 18);
|
||||
this.field_178711_b.addBox(-2.0F, -10.0F, -7.0F, 4, 3, 6);
|
||||
this.field_178711_b.setRotationPoint(0.0F, 3.95F, -10.0F);
|
||||
this.setBoxRotation(this.field_178711_b, 0.5235988F, 0.0F, 0.0F);
|
||||
this.field_178712_c = new ModelRenderer(this, 24, 27);
|
||||
this.field_178712_c.addBox(-2.0F, -7.0F, -6.5F, 4, 2, 5);
|
||||
this.field_178712_c.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.setBoxRotation(this.field_178712_c, 0.5235988F, 0.0F, 0.0F);
|
||||
this.head.addChild(this.field_178711_b);
|
||||
this.head.addChild(this.field_178712_c);
|
||||
this.horseLeftEar = new ModelRenderer(this, 0, 0);
|
||||
this.horseLeftEar.addBox(0.45F, -12.0F, 4.0F, 2, 3, 1);
|
||||
this.horseLeftEar.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.setBoxRotation(this.horseLeftEar, 0.5235988F, 0.0F, 0.0F);
|
||||
this.horseRightEar = new ModelRenderer(this, 0, 0);
|
||||
this.horseRightEar.addBox(-2.45F, -12.0F, 4.0F, 2, 3, 1);
|
||||
this.horseRightEar.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.setBoxRotation(this.horseRightEar, 0.5235988F, 0.0F, 0.0F);
|
||||
this.muleLeftEar = new ModelRenderer(this, 0, 12);
|
||||
this.muleLeftEar.addBox(-2.0F, -16.0F, 4.0F, 2, 7, 1);
|
||||
this.muleLeftEar.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.setBoxRotation(this.muleLeftEar, 0.5235988F, 0.0F, 0.2617994F);
|
||||
this.muleRightEar = new ModelRenderer(this, 0, 12);
|
||||
this.muleRightEar.addBox(0.0F, -16.0F, 4.0F, 2, 7, 1);
|
||||
this.muleRightEar.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.setBoxRotation(this.muleRightEar, 0.5235988F, 0.0F, -0.2617994F);
|
||||
this.neck = new ModelRenderer(this, 0, 12);
|
||||
this.neck.addBox(-2.05F, -9.8F, -2.0F, 4, 14, 8);
|
||||
this.neck.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.setBoxRotation(this.neck, 0.5235988F, 0.0F, 0.0F);
|
||||
this.muleLeftChest = new ModelRenderer(this, 0, 34);
|
||||
this.muleLeftChest.addBox(-3.0F, 0.0F, 0.0F, 8, 8, 3);
|
||||
this.muleLeftChest.setRotationPoint(-7.5F, 3.0F, 10.0F);
|
||||
this.setBoxRotation(this.muleLeftChest, 0.0F, 1.5707964F, 0.0F);
|
||||
this.muleRightChest = new ModelRenderer(this, 0, 47);
|
||||
this.muleRightChest.addBox(-3.0F, 0.0F, 0.0F, 8, 8, 3);
|
||||
this.muleRightChest.setRotationPoint(4.5F, 3.0F, 10.0F);
|
||||
this.setBoxRotation(this.muleRightChest, 0.0F, 1.5707964F, 0.0F);
|
||||
this.horseSaddleBottom = new ModelRenderer(this, 80, 0);
|
||||
this.horseSaddleBottom.addBox(-5.0F, 0.0F, -3.0F, 10, 1, 8);
|
||||
this.horseSaddleBottom.setRotationPoint(0.0F, 2.0F, 2.0F);
|
||||
this.horseSaddleFront = new ModelRenderer(this, 106, 9);
|
||||
this.horseSaddleFront.addBox(-1.5F, -1.0F, -3.0F, 3, 1, 2);
|
||||
this.horseSaddleFront.setRotationPoint(0.0F, 2.0F, 2.0F);
|
||||
this.horseSaddleBack = new ModelRenderer(this, 80, 9);
|
||||
this.horseSaddleBack.addBox(-4.0F, -1.0F, 3.0F, 8, 1, 2);
|
||||
this.horseSaddleBack.setRotationPoint(0.0F, 2.0F, 2.0F);
|
||||
this.horseLeftSaddleMetal = new ModelRenderer(this, 74, 0);
|
||||
this.horseLeftSaddleMetal.addBox(-0.5F, 6.0F, -1.0F, 1, 2, 2);
|
||||
this.horseLeftSaddleMetal.setRotationPoint(5.0F, 3.0F, 2.0F);
|
||||
this.horseLeftSaddleRope = new ModelRenderer(this, 70, 0);
|
||||
this.horseLeftSaddleRope.addBox(-0.5F, 0.0F, -0.5F, 1, 6, 1);
|
||||
this.horseLeftSaddleRope.setRotationPoint(5.0F, 3.0F, 2.0F);
|
||||
this.horseRightSaddleMetal = new ModelRenderer(this, 74, 4);
|
||||
this.horseRightSaddleMetal.addBox(-0.5F, 6.0F, -1.0F, 1, 2, 2);
|
||||
this.horseRightSaddleMetal.setRotationPoint(-5.0F, 3.0F, 2.0F);
|
||||
this.horseRightSaddleRope = new ModelRenderer(this, 80, 0);
|
||||
this.horseRightSaddleRope.addBox(-0.5F, 0.0F, -0.5F, 1, 6, 1);
|
||||
this.horseRightSaddleRope.setRotationPoint(-5.0F, 3.0F, 2.0F);
|
||||
this.horseLeftFaceMetal = new ModelRenderer(this, 74, 13);
|
||||
this.horseLeftFaceMetal.addBox(1.5F, -8.0F, -4.0F, 1, 2, 2);
|
||||
this.horseLeftFaceMetal.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.setBoxRotation(this.horseLeftFaceMetal, 0.5235988F, 0.0F, 0.0F);
|
||||
this.horseRightFaceMetal = new ModelRenderer(this, 74, 13);
|
||||
this.horseRightFaceMetal.addBox(-2.5F, -8.0F, -4.0F, 1, 2, 2);
|
||||
this.horseRightFaceMetal.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.setBoxRotation(this.horseRightFaceMetal, 0.5235988F, 0.0F, 0.0F);
|
||||
this.horseLeftRein = new ModelRenderer(this, 44, 10);
|
||||
this.horseLeftRein.addBox(2.6F, -6.0F, -6.0F, 0, 3, 16);
|
||||
this.horseLeftRein.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.horseRightRein = new ModelRenderer(this, 44, 5);
|
||||
this.horseRightRein.addBox(-2.6F, -6.0F, -6.0F, 0, 3, 16);
|
||||
this.horseRightRein.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.mane = new ModelRenderer(this, 58, 0);
|
||||
this.mane.addBox(-1.0F, -11.5F, 5.0F, 2, 16, 4);
|
||||
this.mane.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.setBoxRotation(this.mane, 0.5235988F, 0.0F, 0.0F);
|
||||
this.horseFaceRopes = new ModelRenderer(this, 80, 12);
|
||||
this.horseFaceRopes.addBox(-2.5F, -10.1F, -7.0F, 5, 5, 12, 0.2F);
|
||||
this.horseFaceRopes.setRotationPoint(0.0F, 4.0F, -10.0F);
|
||||
this.setBoxRotation(this.horseFaceRopes, 0.5235988F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float var2, float var3, float var4, float var5, float var6, float f) {
|
||||
EntityHorse entityhorse = (EntityHorse) entity;
|
||||
int i = entityhorse.getHorseType();
|
||||
float f1 = entityhorse.getGrassEatingAmount(0.0F);
|
||||
boolean flag = entityhorse.isAdultHorse();
|
||||
boolean flag1 = flag && entityhorse.isHorseSaddled();
|
||||
boolean flag2 = flag && entityhorse.isChested();
|
||||
boolean flag3 = i == 1 || i == 2;
|
||||
float f2 = entityhorse.getHorseSize();
|
||||
boolean flag4 = entityhorse.riddenByEntity != null;
|
||||
if (flag1) {
|
||||
this.horseFaceRopes.render(f);
|
||||
this.horseSaddleBottom.render(f);
|
||||
this.horseSaddleFront.render(f);
|
||||
this.horseSaddleBack.render(f);
|
||||
this.horseLeftSaddleRope.render(f);
|
||||
this.horseLeftSaddleMetal.render(f);
|
||||
this.horseRightSaddleRope.render(f);
|
||||
this.horseRightSaddleMetal.render(f);
|
||||
this.horseLeftFaceMetal.render(f);
|
||||
this.horseRightFaceMetal.render(f);
|
||||
if (flag4) {
|
||||
this.horseLeftRein.render(f);
|
||||
this.horseRightRein.render(f);
|
||||
}
|
||||
}
|
||||
|
||||
if (!flag) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(f2, 0.5F + f2 * 0.5F, f2);
|
||||
GlStateManager.translate(0.0F, 0.95F * (1.0F - f2), 0.0F);
|
||||
}
|
||||
|
||||
this.backLeftLeg.render(f);
|
||||
this.backLeftShin.render(f);
|
||||
this.backLeftHoof.render(f);
|
||||
this.backRightLeg.render(f);
|
||||
this.backRightShin.render(f);
|
||||
this.backRightHoof.render(f);
|
||||
this.frontLeftLeg.render(f);
|
||||
this.frontLeftShin.render(f);
|
||||
this.frontLeftHoof.render(f);
|
||||
this.frontRightLeg.render(f);
|
||||
this.frontRightShin.render(f);
|
||||
this.frontRightHoof.render(f);
|
||||
if (!flag) {
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(f2, f2, f2);
|
||||
GlStateManager.translate(0.0F, 1.35F * (1.0F - f2), 0.0F);
|
||||
}
|
||||
|
||||
this.body.render(f);
|
||||
this.tailBase.render(f);
|
||||
this.tailMiddle.render(f);
|
||||
this.tailTip.render(f);
|
||||
this.neck.render(f);
|
||||
this.mane.render(f);
|
||||
if (!flag) {
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
float f3 = 0.5F + f2 * f2 * 0.5F;
|
||||
GlStateManager.scale(f3, f3, f3);
|
||||
if (f1 <= 0.0F) {
|
||||
GlStateManager.translate(0.0F, 1.35F * (1.0F - f2), 0.0F);
|
||||
} else {
|
||||
GlStateManager.translate(0.0F, 0.9F * (1.0F - f2) * f1 + 1.35F * (1.0F - f2) * (1.0F - f1),
|
||||
0.15F * (1.0F - f2) * f1);
|
||||
}
|
||||
}
|
||||
|
||||
if (flag3) {
|
||||
this.muleLeftEar.render(f);
|
||||
this.muleRightEar.render(f);
|
||||
} else {
|
||||
this.horseLeftEar.render(f);
|
||||
this.horseRightEar.render(f);
|
||||
}
|
||||
|
||||
this.head.render(f);
|
||||
if (!flag) {
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if (flag2) {
|
||||
this.muleLeftChest.render(f);
|
||||
this.muleRightChest.render(f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the rotations for a ModelRenderer in the ModelHorse
|
||||
* class.
|
||||
*/
|
||||
private void setBoxRotation(ModelRenderer parModelRenderer, float parFloat1, float parFloat2, float parFloat3) {
|
||||
parModelRenderer.rotateAngleX = parFloat1;
|
||||
parModelRenderer.rotateAngleY = parFloat2;
|
||||
parModelRenderer.rotateAngleZ = parFloat3;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Fixes and offsets a rotation in the ModelHorse class.
|
||||
*/
|
||||
private float updateHorseRotation(float parFloat1, float parFloat2, float parFloat3) {
|
||||
float f;
|
||||
for (f = parFloat2 - parFloat1; f < -180.0F; f += 360.0F) {
|
||||
;
|
||||
}
|
||||
|
||||
while (f >= 180.0F) {
|
||||
f -= 360.0F;
|
||||
}
|
||||
|
||||
return parFloat1 + parFloat3 * f;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float partialTickTime, float parFloat2,
|
||||
float parFloat3) {
|
||||
super.setLivingAnimations(entitylivingbaseIn, partialTickTime, parFloat2, parFloat3);
|
||||
float f = this.updateHorseRotation(entitylivingbaseIn.prevRenderYawOffset, entitylivingbaseIn.renderYawOffset,
|
||||
parFloat3);
|
||||
float f1 = this.updateHorseRotation(entitylivingbaseIn.prevRotationYawHead, entitylivingbaseIn.rotationYawHead,
|
||||
parFloat3);
|
||||
float f2 = entitylivingbaseIn.prevRotationPitch
|
||||
+ (entitylivingbaseIn.rotationPitch - entitylivingbaseIn.prevRotationPitch) * parFloat3;
|
||||
float f3 = f1 - f;
|
||||
float f4 = f2 / 57.295776F;
|
||||
if (f3 > 20.0F) {
|
||||
f3 = 20.0F;
|
||||
}
|
||||
|
||||
if (f3 < -20.0F) {
|
||||
f3 = -20.0F;
|
||||
}
|
||||
|
||||
if (parFloat2 > 0.2F) {
|
||||
f4 += MathHelper.cos(partialTickTime * 0.4F) * 0.15F * parFloat2;
|
||||
}
|
||||
|
||||
EntityHorse entityhorse = (EntityHorse) entitylivingbaseIn;
|
||||
float f5 = entityhorse.getGrassEatingAmount(parFloat3);
|
||||
float f6 = entityhorse.getRearingAmount(parFloat3);
|
||||
float f7 = 1.0F - f6;
|
||||
float f8 = entityhorse.getMouthOpennessAngle(parFloat3);
|
||||
boolean flag = entityhorse.field_110278_bp != 0;
|
||||
boolean flag1 = entityhorse.isHorseSaddled();
|
||||
boolean flag2 = entityhorse.riddenByEntity != null;
|
||||
float f9 = (float) entitylivingbaseIn.ticksExisted + parFloat3;
|
||||
float f10 = MathHelper.cos(partialTickTime * 0.6662F + 3.1415927F);
|
||||
float f11 = f10 * 0.8F * parFloat2;
|
||||
this.head.rotationPointY = 4.0F;
|
||||
this.head.rotationPointZ = -10.0F;
|
||||
this.tailBase.rotationPointY = 3.0F;
|
||||
this.tailMiddle.rotationPointZ = 14.0F;
|
||||
this.muleRightChest.rotationPointY = 3.0F;
|
||||
this.muleRightChest.rotationPointZ = 10.0F;
|
||||
this.body.rotateAngleX = 0.0F;
|
||||
this.head.rotateAngleX = 0.5235988F + f4;
|
||||
this.head.rotateAngleY = f3 / 57.295776F;
|
||||
this.head.rotateAngleX = f6 * (0.2617994F + f4) + f5 * 2.18166F
|
||||
+ (1.0F - Math.max(f6, f5)) * this.head.rotateAngleX;
|
||||
this.head.rotateAngleY = f6 * f3 / 57.295776F + (1.0F - Math.max(f6, f5)) * this.head.rotateAngleY;
|
||||
this.head.rotationPointY = f6 * -6.0F + f5 * 11.0F + (1.0F - Math.max(f6, f5)) * this.head.rotationPointY;
|
||||
this.head.rotationPointZ = f6 * -1.0F + f5 * -10.0F + (1.0F - Math.max(f6, f5)) * this.head.rotationPointZ;
|
||||
this.tailBase.rotationPointY = f6 * 9.0F + f7 * this.tailBase.rotationPointY;
|
||||
this.tailMiddle.rotationPointZ = f6 * 18.0F + f7 * this.tailMiddle.rotationPointZ;
|
||||
this.muleRightChest.rotationPointY = f6 * 5.5F + f7 * this.muleRightChest.rotationPointY;
|
||||
this.muleRightChest.rotationPointZ = f6 * 15.0F + f7 * this.muleRightChest.rotationPointZ;
|
||||
this.body.rotateAngleX = f6 * -45.0F / 57.295776F + f7 * this.body.rotateAngleX;
|
||||
this.horseLeftEar.rotationPointY = this.head.rotationPointY;
|
||||
this.horseRightEar.rotationPointY = this.head.rotationPointY;
|
||||
this.muleLeftEar.rotationPointY = this.head.rotationPointY;
|
||||
this.muleRightEar.rotationPointY = this.head.rotationPointY;
|
||||
this.neck.rotationPointY = this.head.rotationPointY;
|
||||
this.field_178711_b.rotationPointY = 0.02F;
|
||||
this.field_178712_c.rotationPointY = 0.0F;
|
||||
this.mane.rotationPointY = this.head.rotationPointY;
|
||||
this.horseLeftEar.rotationPointZ = this.head.rotationPointZ;
|
||||
this.horseRightEar.rotationPointZ = this.head.rotationPointZ;
|
||||
this.muleLeftEar.rotationPointZ = this.head.rotationPointZ;
|
||||
this.muleRightEar.rotationPointZ = this.head.rotationPointZ;
|
||||
this.neck.rotationPointZ = this.head.rotationPointZ;
|
||||
this.field_178711_b.rotationPointZ = 0.02F - f8 * 1.0F;
|
||||
this.field_178712_c.rotationPointZ = 0.0F + f8 * 1.0F;
|
||||
this.mane.rotationPointZ = this.head.rotationPointZ;
|
||||
this.horseLeftEar.rotateAngleX = this.head.rotateAngleX;
|
||||
this.horseRightEar.rotateAngleX = this.head.rotateAngleX;
|
||||
this.muleLeftEar.rotateAngleX = this.head.rotateAngleX;
|
||||
this.muleRightEar.rotateAngleX = this.head.rotateAngleX;
|
||||
this.neck.rotateAngleX = this.head.rotateAngleX;
|
||||
this.field_178711_b.rotateAngleX = 0.0F - 0.09424778F * f8;
|
||||
this.field_178712_c.rotateAngleX = 0.0F + 0.15707964F * f8;
|
||||
this.mane.rotateAngleX = this.head.rotateAngleX;
|
||||
this.horseLeftEar.rotateAngleY = this.head.rotateAngleY;
|
||||
this.horseRightEar.rotateAngleY = this.head.rotateAngleY;
|
||||
this.muleLeftEar.rotateAngleY = this.head.rotateAngleY;
|
||||
this.muleRightEar.rotateAngleY = this.head.rotateAngleY;
|
||||
this.neck.rotateAngleY = this.head.rotateAngleY;
|
||||
this.field_178711_b.rotateAngleY = 0.0F;
|
||||
this.field_178712_c.rotateAngleY = 0.0F;
|
||||
this.mane.rotateAngleY = this.head.rotateAngleY;
|
||||
this.muleLeftChest.rotateAngleX = f11 / 5.0F;
|
||||
this.muleRightChest.rotateAngleX = -f11 / 5.0F;
|
||||
float f12 = 1.5707964F;
|
||||
float f13 = 4.712389F;
|
||||
float f14 = -1.0471976F;
|
||||
float f15 = 0.2617994F * f6;
|
||||
float f16 = MathHelper.cos(f9 * 0.6F + 3.1415927F);
|
||||
this.frontLeftLeg.rotationPointY = -2.0F * f6 + 9.0F * f7;
|
||||
this.frontLeftLeg.rotationPointZ = -2.0F * f6 + -8.0F * f7;
|
||||
this.frontRightLeg.rotationPointY = this.frontLeftLeg.rotationPointY;
|
||||
this.frontRightLeg.rotationPointZ = this.frontLeftLeg.rotationPointZ;
|
||||
this.backLeftShin.rotationPointY = this.backLeftLeg.rotationPointY
|
||||
+ MathHelper.sin(1.5707964F + f15 + f7 * -f10 * 0.5F * parFloat2) * 7.0F;
|
||||
this.backLeftShin.rotationPointZ = this.backLeftLeg.rotationPointZ
|
||||
+ MathHelper.cos(4.712389F + f15 + f7 * -f10 * 0.5F * parFloat2) * 7.0F;
|
||||
this.backRightShin.rotationPointY = this.backRightLeg.rotationPointY
|
||||
+ MathHelper.sin(1.5707964F + f15 + f7 * f10 * 0.5F * parFloat2) * 7.0F;
|
||||
this.backRightShin.rotationPointZ = this.backRightLeg.rotationPointZ
|
||||
+ MathHelper.cos(4.712389F + f15 + f7 * f10 * 0.5F * parFloat2) * 7.0F;
|
||||
float f17 = (-1.0471976F + f16) * f6 + f11 * f7;
|
||||
float f18 = (-1.0471976F + -f16) * f6 + -f11 * f7;
|
||||
this.frontLeftShin.rotationPointY = this.frontLeftLeg.rotationPointY + MathHelper.sin(1.5707964F + f17) * 7.0F;
|
||||
this.frontLeftShin.rotationPointZ = this.frontLeftLeg.rotationPointZ + MathHelper.cos(4.712389F + f17) * 7.0F;
|
||||
this.frontRightShin.rotationPointY = this.frontRightLeg.rotationPointY
|
||||
+ MathHelper.sin(1.5707964F + f18) * 7.0F;
|
||||
this.frontRightShin.rotationPointZ = this.frontRightLeg.rotationPointZ + MathHelper.cos(4.712389F + f18) * 7.0F;
|
||||
this.backLeftLeg.rotateAngleX = f15 + -f10 * 0.5F * parFloat2 * f7;
|
||||
this.backLeftShin.rotateAngleX = -0.08726646F * f6
|
||||
+ (-f10 * 0.5F * parFloat2 - Math.max(0.0F, f10 * 0.5F * parFloat2)) * f7;
|
||||
this.backLeftHoof.rotateAngleX = this.backLeftShin.rotateAngleX;
|
||||
this.backRightLeg.rotateAngleX = f15 + f10 * 0.5F * parFloat2 * f7;
|
||||
this.backRightShin.rotateAngleX = -0.08726646F * f6
|
||||
+ (f10 * 0.5F * parFloat2 - Math.max(0.0F, -f10 * 0.5F * parFloat2)) * f7;
|
||||
this.backRightHoof.rotateAngleX = this.backRightShin.rotateAngleX;
|
||||
this.frontLeftLeg.rotateAngleX = f17;
|
||||
this.frontLeftShin.rotateAngleX = (this.frontLeftLeg.rotateAngleX
|
||||
+ 3.1415927F * Math.max(0.0F, 0.2F + f16 * 0.2F)) * f6
|
||||
+ (f11 + Math.max(0.0F, f10 * 0.5F * parFloat2)) * f7;
|
||||
this.frontLeftHoof.rotateAngleX = this.frontLeftShin.rotateAngleX;
|
||||
this.frontRightLeg.rotateAngleX = f18;
|
||||
this.frontRightShin.rotateAngleX = (this.frontRightLeg.rotateAngleX
|
||||
+ 3.1415927F * Math.max(0.0F, 0.2F - f16 * 0.2F)) * f6
|
||||
+ (-f11 + Math.max(0.0F, -f10 * 0.5F * parFloat2)) * f7;
|
||||
this.frontRightHoof.rotateAngleX = this.frontRightShin.rotateAngleX;
|
||||
this.backLeftHoof.rotationPointY = this.backLeftShin.rotationPointY;
|
||||
this.backLeftHoof.rotationPointZ = this.backLeftShin.rotationPointZ;
|
||||
this.backRightHoof.rotationPointY = this.backRightShin.rotationPointY;
|
||||
this.backRightHoof.rotationPointZ = this.backRightShin.rotationPointZ;
|
||||
this.frontLeftHoof.rotationPointY = this.frontLeftShin.rotationPointY;
|
||||
this.frontLeftHoof.rotationPointZ = this.frontLeftShin.rotationPointZ;
|
||||
this.frontRightHoof.rotationPointY = this.frontRightShin.rotationPointY;
|
||||
this.frontRightHoof.rotationPointZ = this.frontRightShin.rotationPointZ;
|
||||
if (flag1) {
|
||||
this.horseSaddleBottom.rotationPointY = f6 * 0.5F + f7 * 2.0F;
|
||||
this.horseSaddleBottom.rotationPointZ = f6 * 11.0F + f7 * 2.0F;
|
||||
this.horseSaddleFront.rotationPointY = this.horseSaddleBottom.rotationPointY;
|
||||
this.horseSaddleBack.rotationPointY = this.horseSaddleBottom.rotationPointY;
|
||||
this.horseLeftSaddleRope.rotationPointY = this.horseSaddleBottom.rotationPointY;
|
||||
this.horseRightSaddleRope.rotationPointY = this.horseSaddleBottom.rotationPointY;
|
||||
this.horseLeftSaddleMetal.rotationPointY = this.horseSaddleBottom.rotationPointY;
|
||||
this.horseRightSaddleMetal.rotationPointY = this.horseSaddleBottom.rotationPointY;
|
||||
this.muleLeftChest.rotationPointY = this.muleRightChest.rotationPointY;
|
||||
this.horseSaddleFront.rotationPointZ = this.horseSaddleBottom.rotationPointZ;
|
||||
this.horseSaddleBack.rotationPointZ = this.horseSaddleBottom.rotationPointZ;
|
||||
this.horseLeftSaddleRope.rotationPointZ = this.horseSaddleBottom.rotationPointZ;
|
||||
this.horseRightSaddleRope.rotationPointZ = this.horseSaddleBottom.rotationPointZ;
|
||||
this.horseLeftSaddleMetal.rotationPointZ = this.horseSaddleBottom.rotationPointZ;
|
||||
this.horseRightSaddleMetal.rotationPointZ = this.horseSaddleBottom.rotationPointZ;
|
||||
this.muleLeftChest.rotationPointZ = this.muleRightChest.rotationPointZ;
|
||||
this.horseSaddleBottom.rotateAngleX = this.body.rotateAngleX;
|
||||
this.horseSaddleFront.rotateAngleX = this.body.rotateAngleX;
|
||||
this.horseSaddleBack.rotateAngleX = this.body.rotateAngleX;
|
||||
this.horseLeftRein.rotationPointY = this.head.rotationPointY;
|
||||
this.horseRightRein.rotationPointY = this.head.rotationPointY;
|
||||
this.horseFaceRopes.rotationPointY = this.head.rotationPointY;
|
||||
this.horseLeftFaceMetal.rotationPointY = this.head.rotationPointY;
|
||||
this.horseRightFaceMetal.rotationPointY = this.head.rotationPointY;
|
||||
this.horseLeftRein.rotationPointZ = this.head.rotationPointZ;
|
||||
this.horseRightRein.rotationPointZ = this.head.rotationPointZ;
|
||||
this.horseFaceRopes.rotationPointZ = this.head.rotationPointZ;
|
||||
this.horseLeftFaceMetal.rotationPointZ = this.head.rotationPointZ;
|
||||
this.horseRightFaceMetal.rotationPointZ = this.head.rotationPointZ;
|
||||
this.horseLeftRein.rotateAngleX = f4;
|
||||
this.horseRightRein.rotateAngleX = f4;
|
||||
this.horseFaceRopes.rotateAngleX = this.head.rotateAngleX;
|
||||
this.horseLeftFaceMetal.rotateAngleX = this.head.rotateAngleX;
|
||||
this.horseRightFaceMetal.rotateAngleX = this.head.rotateAngleX;
|
||||
this.horseFaceRopes.rotateAngleY = this.head.rotateAngleY;
|
||||
this.horseLeftFaceMetal.rotateAngleY = this.head.rotateAngleY;
|
||||
this.horseLeftRein.rotateAngleY = this.head.rotateAngleY;
|
||||
this.horseRightFaceMetal.rotateAngleY = this.head.rotateAngleY;
|
||||
this.horseRightRein.rotateAngleY = this.head.rotateAngleY;
|
||||
if (flag2) {
|
||||
this.horseLeftSaddleRope.rotateAngleX = -1.0471976F;
|
||||
this.horseLeftSaddleMetal.rotateAngleX = -1.0471976F;
|
||||
this.horseRightSaddleRope.rotateAngleX = -1.0471976F;
|
||||
this.horseRightSaddleMetal.rotateAngleX = -1.0471976F;
|
||||
this.horseLeftSaddleRope.rotateAngleZ = 0.0F;
|
||||
this.horseLeftSaddleMetal.rotateAngleZ = 0.0F;
|
||||
this.horseRightSaddleRope.rotateAngleZ = 0.0F;
|
||||
this.horseRightSaddleMetal.rotateAngleZ = 0.0F;
|
||||
} else {
|
||||
this.horseLeftSaddleRope.rotateAngleX = f11 / 3.0F;
|
||||
this.horseLeftSaddleMetal.rotateAngleX = f11 / 3.0F;
|
||||
this.horseRightSaddleRope.rotateAngleX = f11 / 3.0F;
|
||||
this.horseRightSaddleMetal.rotateAngleX = f11 / 3.0F;
|
||||
this.horseLeftSaddleRope.rotateAngleZ = f11 / 5.0F;
|
||||
this.horseLeftSaddleMetal.rotateAngleZ = f11 / 5.0F;
|
||||
this.horseRightSaddleRope.rotateAngleZ = -f11 / 5.0F;
|
||||
this.horseRightSaddleMetal.rotateAngleZ = -f11 / 5.0F;
|
||||
}
|
||||
}
|
||||
|
||||
f12 = -1.3089F + parFloat2 * 1.5F;
|
||||
if (f12 > 0.0F) {
|
||||
f12 = 0.0F;
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
this.tailBase.rotateAngleY = MathHelper.cos(f9 * 0.7F);
|
||||
f12 = 0.0F;
|
||||
} else {
|
||||
this.tailBase.rotateAngleY = 0.0F;
|
||||
}
|
||||
|
||||
this.tailMiddle.rotateAngleY = this.tailBase.rotateAngleY;
|
||||
this.tailTip.rotateAngleY = this.tailBase.rotateAngleY;
|
||||
this.tailMiddle.rotationPointY = this.tailBase.rotationPointY;
|
||||
this.tailTip.rotationPointY = this.tailBase.rotationPointY;
|
||||
this.tailMiddle.rotationPointZ = this.tailBase.rotationPointZ;
|
||||
this.tailTip.rotationPointZ = this.tailBase.rotationPointZ;
|
||||
this.tailBase.rotateAngleX = f12;
|
||||
this.tailMiddle.rotateAngleX = f12;
|
||||
this.tailTip.rotateAngleX = -0.2618F + f12;
|
||||
}
|
||||
}
|
||||
55
src/main/java/net/minecraft/client/model/ModelHumanoidHead.java
Executable file
55
src/main/java/net/minecraft/client/model/ModelHumanoidHead.java
Executable file
@@ -0,0 +1,55 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelHumanoidHead extends ModelSkeletonHead {
|
||||
private final ModelRenderer head = new ModelRenderer(this, 32, 0);
|
||||
|
||||
public ModelHumanoidHead() {
|
||||
super(0, 0, 64, 64);
|
||||
this.head.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.25F);
|
||||
this.head.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
this.head.render(f5);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.head.rotateAngleY = this.skeletonHead.rotateAngleY;
|
||||
this.head.rotateAngleX = this.skeletonHead.rotateAngleX;
|
||||
}
|
||||
}
|
||||
126
src/main/java/net/minecraft/client/model/ModelIronGolem.java
Executable file
126
src/main/java/net/minecraft/client/model/ModelIronGolem.java
Executable file
@@ -0,0 +1,126 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntityIronGolem;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelIronGolem extends ModelBase {
|
||||
public ModelRenderer ironGolemHead;
|
||||
public ModelRenderer ironGolemBody;
|
||||
public ModelRenderer ironGolemRightArm;
|
||||
public ModelRenderer ironGolemLeftArm;
|
||||
public ModelRenderer ironGolemLeftLeg;
|
||||
public ModelRenderer ironGolemRightLeg;
|
||||
|
||||
public ModelIronGolem() {
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public ModelIronGolem(float parFloat1) {
|
||||
this(parFloat1, -7.0F);
|
||||
}
|
||||
|
||||
public ModelIronGolem(float parFloat1, float parFloat2) {
|
||||
short short1 = 128;
|
||||
short short2 = 128;
|
||||
this.ironGolemHead = (new ModelRenderer(this)).setTextureSize(short1, short2);
|
||||
this.ironGolemHead.setRotationPoint(0.0F, 0.0F + parFloat2, -2.0F);
|
||||
this.ironGolemHead.setTextureOffset(0, 0).addBox(-4.0F, -12.0F, -5.5F, 8, 10, 8, parFloat1);
|
||||
this.ironGolemHead.setTextureOffset(24, 0).addBox(-1.0F, -5.0F, -7.5F, 2, 4, 2, parFloat1);
|
||||
this.ironGolemBody = (new ModelRenderer(this)).setTextureSize(short1, short2);
|
||||
this.ironGolemBody.setRotationPoint(0.0F, 0.0F + parFloat2, 0.0F);
|
||||
this.ironGolemBody.setTextureOffset(0, 40).addBox(-9.0F, -2.0F, -6.0F, 18, 12, 11, parFloat1);
|
||||
this.ironGolemBody.setTextureOffset(0, 70).addBox(-4.5F, 10.0F, -3.0F, 9, 5, 6, parFloat1 + 0.5F);
|
||||
this.ironGolemRightArm = (new ModelRenderer(this)).setTextureSize(short1, short2);
|
||||
this.ironGolemRightArm.setRotationPoint(0.0F, -7.0F, 0.0F);
|
||||
this.ironGolemRightArm.setTextureOffset(60, 21).addBox(-13.0F, -2.5F, -3.0F, 4, 30, 6, parFloat1);
|
||||
this.ironGolemLeftArm = (new ModelRenderer(this)).setTextureSize(short1, short2);
|
||||
this.ironGolemLeftArm.setRotationPoint(0.0F, -7.0F, 0.0F);
|
||||
this.ironGolemLeftArm.setTextureOffset(60, 58).addBox(9.0F, -2.5F, -3.0F, 4, 30, 6, parFloat1);
|
||||
this.ironGolemLeftLeg = (new ModelRenderer(this, 0, 22)).setTextureSize(short1, short2);
|
||||
this.ironGolemLeftLeg.setRotationPoint(-4.0F, 18.0F + parFloat2, 0.0F);
|
||||
this.ironGolemLeftLeg.setTextureOffset(37, 0).addBox(-3.5F, -3.0F, -3.0F, 6, 16, 5, parFloat1);
|
||||
this.ironGolemRightLeg = (new ModelRenderer(this, 0, 22)).setTextureSize(short1, short2);
|
||||
this.ironGolemRightLeg.mirror = true;
|
||||
this.ironGolemRightLeg.setTextureOffset(60, 0).setRotationPoint(5.0F, 18.0F + parFloat2, 0.0F);
|
||||
this.ironGolemRightLeg.addBox(-3.5F, -3.0F, -3.0F, 6, 16, 5, parFloat1);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.ironGolemHead.render(f5);
|
||||
this.ironGolemBody.render(f5);
|
||||
this.ironGolemLeftLeg.render(f5);
|
||||
this.ironGolemRightLeg.render(f5);
|
||||
this.ironGolemRightArm.render(f5);
|
||||
this.ironGolemLeftArm.render(f5);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float var3, float f2, float f3, float var6, Entity var7) {
|
||||
this.ironGolemHead.rotateAngleY = f2 / 57.295776F;
|
||||
this.ironGolemHead.rotateAngleX = f3 / 57.295776F;
|
||||
this.ironGolemLeftLeg.rotateAngleX = -1.5F * this.func_78172_a(f, 13.0F) * f1;
|
||||
this.ironGolemRightLeg.rotateAngleX = 1.5F * this.func_78172_a(f, 13.0F) * f1;
|
||||
this.ironGolemLeftLeg.rotateAngleY = 0.0F;
|
||||
this.ironGolemRightLeg.rotateAngleY = 0.0F;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbase, float f, float f1, float f2) {
|
||||
EntityIronGolem entityirongolem = (EntityIronGolem) entitylivingbase;
|
||||
int i = entityirongolem.getAttackTimer();
|
||||
if (i > 0) {
|
||||
this.ironGolemRightArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float) i - f2, 10.0F);
|
||||
this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float) i - f2, 10.0F);
|
||||
} else {
|
||||
int j = entityirongolem.getHoldRoseTick();
|
||||
if (j > 0) {
|
||||
this.ironGolemRightArm.rotateAngleX = -0.8F + 0.025F * this.func_78172_a((float) j, 70.0F);
|
||||
this.ironGolemLeftArm.rotateAngleX = 0.0F;
|
||||
} else {
|
||||
this.ironGolemRightArm.rotateAngleX = (-0.2F + 1.5F * this.func_78172_a(f, 13.0F)) * f1;
|
||||
this.ironGolemLeftArm.rotateAngleX = (-0.2F - 1.5F * this.func_78172_a(f, 13.0F)) * f1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private float func_78172_a(float parFloat1, float parFloat2) {
|
||||
return (Math.abs(parFloat1 % parFloat2 - parFloat2 * 0.5F) - parFloat2 * 0.25F) / (parFloat2 * 0.25F);
|
||||
}
|
||||
}
|
||||
41
src/main/java/net/minecraft/client/model/ModelLargeChest.java
Executable file
41
src/main/java/net/minecraft/client/model/ModelLargeChest.java
Executable file
@@ -0,0 +1,41 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelLargeChest extends ModelChest {
|
||||
public ModelLargeChest() {
|
||||
this.chestLid = (new ModelRenderer(this, 0, 0)).setTextureSize(128, 64);
|
||||
this.chestLid.addBox(0.0F, -5.0F, -14.0F, 30, 5, 14, 0.0F);
|
||||
this.chestLid.rotationPointX = 1.0F;
|
||||
this.chestLid.rotationPointY = 7.0F;
|
||||
this.chestLid.rotationPointZ = 15.0F;
|
||||
this.chestKnob = (new ModelRenderer(this, 0, 0)).setTextureSize(128, 64);
|
||||
this.chestKnob.addBox(-1.0F, -2.0F, -15.0F, 2, 4, 1, 0.0F);
|
||||
this.chestKnob.rotationPointX = 16.0F;
|
||||
this.chestKnob.rotationPointY = 7.0F;
|
||||
this.chestKnob.rotationPointZ = 15.0F;
|
||||
this.chestBelow = (new ModelRenderer(this, 0, 19)).setTextureSize(128, 64);
|
||||
this.chestBelow.addBox(0.0F, 0.0F, 0.0F, 30, 10, 14, 0.0F);
|
||||
this.chestBelow.rotationPointX = 1.0F;
|
||||
this.chestBelow.rotationPointY = 6.0F;
|
||||
this.chestBelow.rotationPointZ = 1.0F;
|
||||
}
|
||||
}
|
||||
61
src/main/java/net/minecraft/client/model/ModelLeashKnot.java
Executable file
61
src/main/java/net/minecraft/client/model/ModelLeashKnot.java
Executable file
@@ -0,0 +1,61 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelLeashKnot extends ModelBase {
|
||||
public ModelRenderer field_110723_a;
|
||||
|
||||
public ModelLeashKnot() {
|
||||
this(0, 0, 32, 32);
|
||||
}
|
||||
|
||||
public ModelLeashKnot(int parInt1, int parInt2, int parInt3, int parInt4) {
|
||||
this.textureWidth = parInt3;
|
||||
this.textureHeight = parInt4;
|
||||
this.field_110723_a = new ModelRenderer(this, parInt1, parInt2);
|
||||
this.field_110723_a.addBox(-3.0F, -6.0F, -3.0F, 6, 8, 6, 0.0F);
|
||||
this.field_110723_a.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.field_110723_a.render(f5);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.field_110723_a.rotateAngleY = f3 / 57.295776F;
|
||||
this.field_110723_a.rotateAngleX = f4 / 57.295776F;
|
||||
}
|
||||
}
|
||||
83
src/main/java/net/minecraft/client/model/ModelMagmaCube.java
Executable file
83
src/main/java/net/minecraft/client/model/ModelMagmaCube.java
Executable file
@@ -0,0 +1,83 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntityMagmaCube;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelMagmaCube extends ModelBase {
|
||||
ModelRenderer[] segments = new ModelRenderer[8];
|
||||
ModelRenderer core;
|
||||
|
||||
public ModelMagmaCube() {
|
||||
for (int i = 0; i < this.segments.length; ++i) {
|
||||
byte b0 = 0;
|
||||
int j = i;
|
||||
if (i == 2) {
|
||||
b0 = 24;
|
||||
j = 10;
|
||||
} else if (i == 3) {
|
||||
b0 = 24;
|
||||
j = 19;
|
||||
}
|
||||
|
||||
this.segments[i] = new ModelRenderer(this, b0, j);
|
||||
this.segments[i].addBox(-4.0F, (float) (16 + i), -4.0F, 8, 1, 8);
|
||||
}
|
||||
|
||||
this.core = new ModelRenderer(this, 0, 16);
|
||||
this.core.addBox(-2.0F, 18.0F, -2.0F, 4, 4, 4);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbase, float var2, float var3, float f) {
|
||||
EntityMagmaCube entitymagmacube = (EntityMagmaCube) entitylivingbase;
|
||||
float f1 = entitymagmacube.prevSquishFactor
|
||||
+ (entitymagmacube.squishFactor - entitymagmacube.prevSquishFactor) * f;
|
||||
if (f1 < 0.0F) {
|
||||
f1 = 0.0F;
|
||||
}
|
||||
|
||||
for (int i = 0; i < this.segments.length; ++i) {
|
||||
this.segments[i].rotationPointY = (float) (-(4 - i)) * f1 * 1.7F;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.core.render(f5);
|
||||
|
||||
for (int i = 0; i < this.segments.length; ++i) {
|
||||
this.segments[i].render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
70
src/main/java/net/minecraft/client/model/ModelMinecart.java
Executable file
70
src/main/java/net/minecraft/client/model/ModelMinecart.java
Executable file
@@ -0,0 +1,70 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelMinecart extends ModelBase {
|
||||
public ModelRenderer[] sideModels = new ModelRenderer[7];
|
||||
|
||||
public ModelMinecart() {
|
||||
this.sideModels[0] = new ModelRenderer(this, 0, 10);
|
||||
this.sideModels[1] = new ModelRenderer(this, 0, 0);
|
||||
this.sideModels[2] = new ModelRenderer(this, 0, 0);
|
||||
this.sideModels[3] = new ModelRenderer(this, 0, 0);
|
||||
this.sideModels[4] = new ModelRenderer(this, 0, 0);
|
||||
this.sideModels[5] = new ModelRenderer(this, 44, 10);
|
||||
byte b0 = 20;
|
||||
byte b1 = 8;
|
||||
byte b2 = 16;
|
||||
byte b3 = 4;
|
||||
this.sideModels[0].addBox((float) (-b0 / 2), (float) (-b2 / 2), -1.0F, b0, b2, 2, 0.0F);
|
||||
this.sideModels[0].setRotationPoint(0.0F, (float) b3, 0.0F);
|
||||
this.sideModels[5].addBox((float) (-b0 / 2 + 1), (float) (-b2 / 2 + 1), -1.0F, b0 - 2, b2 - 2, 1, 0.0F);
|
||||
this.sideModels[5].setRotationPoint(0.0F, (float) b3, 0.0F);
|
||||
this.sideModels[1].addBox((float) (-b0 / 2 + 2), (float) (-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F);
|
||||
this.sideModels[1].setRotationPoint((float) (-b0 / 2 + 1), (float) b3, 0.0F);
|
||||
this.sideModels[2].addBox((float) (-b0 / 2 + 2), (float) (-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F);
|
||||
this.sideModels[2].setRotationPoint((float) (b0 / 2 - 1), (float) b3, 0.0F);
|
||||
this.sideModels[3].addBox((float) (-b0 / 2 + 2), (float) (-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F);
|
||||
this.sideModels[3].setRotationPoint(0.0F, (float) b3, (float) (-b2 / 2 + 1));
|
||||
this.sideModels[4].addBox((float) (-b0 / 2 + 2), (float) (-b1 - 1), -1.0F, b0 - 4, b1, 2, 0.0F);
|
||||
this.sideModels[4].setRotationPoint(0.0F, (float) b3, (float) (b2 / 2 - 1));
|
||||
this.sideModels[0].rotateAngleX = 1.5707964F;
|
||||
this.sideModels[1].rotateAngleY = 4.712389F;
|
||||
this.sideModels[2].rotateAngleY = 1.5707964F;
|
||||
this.sideModels[3].rotateAngleY = 3.1415927F;
|
||||
this.sideModels[5].rotateAngleX = -1.5707964F;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity var1, float var2, float var3, float f, float var5, float var6, float f1) {
|
||||
this.sideModels[5].rotationPointY = 4.0F - f;
|
||||
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
this.sideModels[i].render(f1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
204
src/main/java/net/minecraft/client/model/ModelOcelot.java
Executable file
204
src/main/java/net/minecraft/client/model/ModelOcelot.java
Executable file
@@ -0,0 +1,204 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelOcelot extends ModelBase {
|
||||
ModelRenderer ocelotBackLeftLeg;
|
||||
ModelRenderer ocelotBackRightLeg;
|
||||
ModelRenderer ocelotFrontLeftLeg;
|
||||
ModelRenderer ocelotFrontRightLeg;
|
||||
ModelRenderer ocelotTail;
|
||||
ModelRenderer ocelotTail2;
|
||||
ModelRenderer ocelotHead;
|
||||
ModelRenderer ocelotBody;
|
||||
int field_78163_i = 1;
|
||||
|
||||
public ModelOcelot() {
|
||||
this.setTextureOffset("head.main", 0, 0);
|
||||
this.setTextureOffset("head.nose", 0, 24);
|
||||
this.setTextureOffset("head.ear1", 0, 10);
|
||||
this.setTextureOffset("head.ear2", 6, 10);
|
||||
this.ocelotHead = new ModelRenderer(this, "head");
|
||||
this.ocelotHead.addBox("main", -2.5F, -2.0F, -3.0F, 5, 4, 5);
|
||||
this.ocelotHead.addBox("nose", -1.5F, 0.0F, -4.0F, 3, 2, 2);
|
||||
this.ocelotHead.addBox("ear1", -2.0F, -3.0F, 0.0F, 1, 1, 2);
|
||||
this.ocelotHead.addBox("ear2", 1.0F, -3.0F, 0.0F, 1, 1, 2);
|
||||
this.ocelotHead.setRotationPoint(0.0F, 15.0F, -9.0F);
|
||||
this.ocelotBody = new ModelRenderer(this, 20, 0);
|
||||
this.ocelotBody.addBox(-2.0F, 3.0F, -8.0F, 4, 16, 6, 0.0F);
|
||||
this.ocelotBody.setRotationPoint(0.0F, 12.0F, -10.0F);
|
||||
this.ocelotTail = new ModelRenderer(this, 0, 15);
|
||||
this.ocelotTail.addBox(-0.5F, 0.0F, 0.0F, 1, 8, 1);
|
||||
this.ocelotTail.rotateAngleX = 0.9F;
|
||||
this.ocelotTail.setRotationPoint(0.0F, 15.0F, 8.0F);
|
||||
this.ocelotTail2 = new ModelRenderer(this, 4, 15);
|
||||
this.ocelotTail2.addBox(-0.5F, 0.0F, 0.0F, 1, 8, 1);
|
||||
this.ocelotTail2.setRotationPoint(0.0F, 20.0F, 14.0F);
|
||||
this.ocelotBackLeftLeg = new ModelRenderer(this, 8, 13);
|
||||
this.ocelotBackLeftLeg.addBox(-1.0F, 0.0F, 1.0F, 2, 6, 2);
|
||||
this.ocelotBackLeftLeg.setRotationPoint(1.1F, 18.0F, 5.0F);
|
||||
this.ocelotBackRightLeg = new ModelRenderer(this, 8, 13);
|
||||
this.ocelotBackRightLeg.addBox(-1.0F, 0.0F, 1.0F, 2, 6, 2);
|
||||
this.ocelotBackRightLeg.setRotationPoint(-1.1F, 18.0F, 5.0F);
|
||||
this.ocelotFrontLeftLeg = new ModelRenderer(this, 40, 0);
|
||||
this.ocelotFrontLeftLeg.addBox(-1.0F, 0.0F, 0.0F, 2, 10, 2);
|
||||
this.ocelotFrontLeftLeg.setRotationPoint(1.2F, 13.8F, -5.0F);
|
||||
this.ocelotFrontRightLeg = new ModelRenderer(this, 40, 0);
|
||||
this.ocelotFrontRightLeg.addBox(-1.0F, 0.0F, 0.0F, 2, 10, 2);
|
||||
this.ocelotFrontRightLeg.setRotationPoint(-1.2F, 13.8F, -5.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
if (this.isChild) {
|
||||
float f6 = 2.0F;
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(1.5F / f6, 1.5F / f6, 1.5F / f6);
|
||||
GlStateManager.translate(0.0F, 10.0F * f5, 4.0F * f5);
|
||||
this.ocelotHead.render(f5);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(1.0F / f6, 1.0F / f6, 1.0F / f6);
|
||||
GlStateManager.translate(0.0F, 24.0F * f5, 0.0F);
|
||||
this.ocelotBody.render(f5);
|
||||
this.ocelotBackLeftLeg.render(f5);
|
||||
this.ocelotBackRightLeg.render(f5);
|
||||
this.ocelotFrontLeftLeg.render(f5);
|
||||
this.ocelotFrontRightLeg.render(f5);
|
||||
this.ocelotTail.render(f5);
|
||||
this.ocelotTail2.render(f5);
|
||||
GlStateManager.popMatrix();
|
||||
} else {
|
||||
this.ocelotHead.render(f5);
|
||||
this.ocelotBody.render(f5);
|
||||
this.ocelotTail.render(f5);
|
||||
this.ocelotTail2.render(f5);
|
||||
this.ocelotBackLeftLeg.render(f5);
|
||||
this.ocelotBackRightLeg.render(f5);
|
||||
this.ocelotFrontLeftLeg.render(f5);
|
||||
this.ocelotFrontRightLeg.render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float var3, float f2, float f3, float var6, Entity var7) {
|
||||
this.ocelotHead.rotateAngleX = f3 / 57.295776F;
|
||||
this.ocelotHead.rotateAngleY = f2 / 57.295776F;
|
||||
if (this.field_78163_i != 3) {
|
||||
this.ocelotBody.rotateAngleX = 1.5707964F;
|
||||
if (this.field_78163_i == 2) {
|
||||
this.ocelotBackLeftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.0F * f1;
|
||||
this.ocelotBackRightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + 0.3F) * 1.0F * f1;
|
||||
this.ocelotFrontLeftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F + 0.3F) * 1.0F * f1;
|
||||
this.ocelotFrontRightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.0F * f1;
|
||||
this.ocelotTail2.rotateAngleX = 1.7278761F + 0.31415927F * MathHelper.cos(f) * f1;
|
||||
} else {
|
||||
this.ocelotBackLeftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.0F * f1;
|
||||
this.ocelotBackRightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.0F * f1;
|
||||
this.ocelotFrontLeftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.0F * f1;
|
||||
this.ocelotFrontRightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.0F * f1;
|
||||
if (this.field_78163_i == 1) {
|
||||
this.ocelotTail2.rotateAngleX = 1.7278761F + 0.7853982F * MathHelper.cos(f) * f1;
|
||||
} else {
|
||||
this.ocelotTail2.rotateAngleX = 1.7278761F + 0.47123894F * MathHelper.cos(f) * f1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbase, float var2, float var3, float var4) {
|
||||
EntityOcelot entityocelot = (EntityOcelot) entitylivingbase;
|
||||
this.ocelotBody.rotationPointY = 12.0F;
|
||||
this.ocelotBody.rotationPointZ = -10.0F;
|
||||
this.ocelotHead.rotationPointY = 15.0F;
|
||||
this.ocelotHead.rotationPointZ = -9.0F;
|
||||
this.ocelotTail.rotationPointY = 15.0F;
|
||||
this.ocelotTail.rotationPointZ = 8.0F;
|
||||
this.ocelotTail2.rotationPointY = 20.0F;
|
||||
this.ocelotTail2.rotationPointZ = 14.0F;
|
||||
this.ocelotFrontLeftLeg.rotationPointY = this.ocelotFrontRightLeg.rotationPointY = 13.8F;
|
||||
this.ocelotFrontLeftLeg.rotationPointZ = this.ocelotFrontRightLeg.rotationPointZ = -5.0F;
|
||||
this.ocelotBackLeftLeg.rotationPointY = this.ocelotBackRightLeg.rotationPointY = 18.0F;
|
||||
this.ocelotBackLeftLeg.rotationPointZ = this.ocelotBackRightLeg.rotationPointZ = 5.0F;
|
||||
this.ocelotTail.rotateAngleX = 0.9F;
|
||||
if (entityocelot.isSneaking()) {
|
||||
++this.ocelotBody.rotationPointY;
|
||||
this.ocelotHead.rotationPointY += 2.0F;
|
||||
++this.ocelotTail.rotationPointY;
|
||||
this.ocelotTail2.rotationPointY += -4.0F;
|
||||
this.ocelotTail2.rotationPointZ += 2.0F;
|
||||
this.ocelotTail.rotateAngleX = 1.5707964F;
|
||||
this.ocelotTail2.rotateAngleX = 1.5707964F;
|
||||
this.field_78163_i = 0;
|
||||
} else if (entityocelot.isSprinting()) {
|
||||
this.ocelotTail2.rotationPointY = this.ocelotTail.rotationPointY;
|
||||
this.ocelotTail2.rotationPointZ += 2.0F;
|
||||
this.ocelotTail.rotateAngleX = 1.5707964F;
|
||||
this.ocelotTail2.rotateAngleX = 1.5707964F;
|
||||
this.field_78163_i = 2;
|
||||
} else if (entityocelot.isSitting()) {
|
||||
this.ocelotBody.rotateAngleX = 0.7853982F;
|
||||
this.ocelotBody.rotationPointY += -4.0F;
|
||||
this.ocelotBody.rotationPointZ += 5.0F;
|
||||
this.ocelotHead.rotationPointY += -3.3F;
|
||||
++this.ocelotHead.rotationPointZ;
|
||||
this.ocelotTail.rotationPointY += 8.0F;
|
||||
this.ocelotTail.rotationPointZ += -2.0F;
|
||||
this.ocelotTail2.rotationPointY += 2.0F;
|
||||
this.ocelotTail2.rotationPointZ += -0.8F;
|
||||
this.ocelotTail.rotateAngleX = 1.7278761F;
|
||||
this.ocelotTail2.rotateAngleX = 2.670354F;
|
||||
this.ocelotFrontLeftLeg.rotateAngleX = this.ocelotFrontRightLeg.rotateAngleX = -0.15707964F;
|
||||
this.ocelotFrontLeftLeg.rotationPointY = this.ocelotFrontRightLeg.rotationPointY = 15.8F;
|
||||
this.ocelotFrontLeftLeg.rotationPointZ = this.ocelotFrontRightLeg.rotationPointZ = -7.0F;
|
||||
this.ocelotBackLeftLeg.rotateAngleX = this.ocelotBackRightLeg.rotateAngleX = -1.5707964F;
|
||||
this.ocelotBackLeftLeg.rotationPointY = this.ocelotBackRightLeg.rotationPointY = 21.0F;
|
||||
this.ocelotBackLeftLeg.rotationPointZ = this.ocelotBackRightLeg.rotationPointZ = 1.0F;
|
||||
this.field_78163_i = 3;
|
||||
} else {
|
||||
this.field_78163_i = 1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
33
src/main/java/net/minecraft/client/model/ModelPig.java
Executable file
33
src/main/java/net/minecraft/client/model/ModelPig.java
Executable file
@@ -0,0 +1,33 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelPig extends ModelQuadruped {
|
||||
public ModelPig() {
|
||||
this(0.0F);
|
||||
}
|
||||
|
||||
public ModelPig(float parFloat1) {
|
||||
super(6, parFloat1);
|
||||
this.head.setTextureOffset(16, 16).addBox(-2.0F, 0.0F, -9.0F, 4, 3, 1, parFloat1);
|
||||
this.childYOffset = 4.0F;
|
||||
}
|
||||
}
|
||||
178
src/main/java/net/minecraft/client/model/ModelPlayer.java
Executable file
178
src/main/java/net/minecraft/client/model/ModelPlayer.java
Executable file
@@ -0,0 +1,178 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelPlayer extends ModelBiped {
|
||||
public ModelRenderer bipedLeftArmwear;
|
||||
public ModelRenderer bipedRightArmwear;
|
||||
public ModelRenderer bipedLeftLegwear;
|
||||
public ModelRenderer bipedRightLegwear;
|
||||
public ModelRenderer bipedBodyWear;
|
||||
private ModelRenderer bipedCape;
|
||||
private ModelRenderer bipedDeadmau5Head;
|
||||
private boolean smallArms;
|
||||
|
||||
public ModelPlayer(float parFloat1, boolean parFlag) {
|
||||
super(parFloat1, 0.0F, 64, 64);
|
||||
this.smallArms = parFlag;
|
||||
this.bipedDeadmau5Head = new ModelRenderer(this, 24, 0);
|
||||
this.bipedDeadmau5Head.addBox(-3.0F, -6.0F, -1.0F, 6, 6, 1, parFloat1);
|
||||
this.bipedCape = new ModelRenderer(this, 0, 0);
|
||||
this.bipedCape.setTextureSize(64, 32);
|
||||
this.bipedCape.addBox(-5.0F, 0.0F, -1.0F, 10, 16, 1, parFloat1);
|
||||
if (parFlag) {
|
||||
this.bipedLeftArm = new ModelRenderer(this, 32, 48);
|
||||
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, parFloat1);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.5F, 0.0F);
|
||||
this.bipedRightArm = new ModelRenderer(this, 40, 16);
|
||||
this.bipedRightArm.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, parFloat1);
|
||||
this.bipedRightArm.setRotationPoint(-5.0F, 2.5F, 0.0F);
|
||||
this.bipedLeftArmwear = new ModelRenderer(this, 48, 48);
|
||||
this.bipedLeftArmwear.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, parFloat1 + 0.25F);
|
||||
this.bipedLeftArmwear.setRotationPoint(5.0F, 2.5F, 0.0F);
|
||||
this.bipedRightArmwear = new ModelRenderer(this, 40, 32);
|
||||
this.bipedRightArmwear.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, parFloat1 + 0.25F);
|
||||
this.bipedRightArmwear.setRotationPoint(-5.0F, 2.5F, 10.0F);
|
||||
} else {
|
||||
this.bipedLeftArm = new ModelRenderer(this, 32, 48);
|
||||
this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, parFloat1);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.0F, 0.0F);
|
||||
this.bipedLeftArmwear = new ModelRenderer(this, 48, 48);
|
||||
this.bipedLeftArmwear.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, parFloat1 + 0.25F);
|
||||
this.bipedLeftArmwear.setRotationPoint(5.0F, 2.0F, 0.0F);
|
||||
this.bipedRightArmwear = new ModelRenderer(this, 40, 32);
|
||||
this.bipedRightArmwear.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, parFloat1 + 0.25F);
|
||||
this.bipedRightArmwear.setRotationPoint(-5.0F, 2.0F, 10.0F);
|
||||
}
|
||||
|
||||
this.bipedLeftLeg = new ModelRenderer(this, 16, 48);
|
||||
this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, parFloat1);
|
||||
this.bipedLeftLeg.setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.bipedLeftLegwear = new ModelRenderer(this, 0, 48);
|
||||
this.bipedLeftLegwear.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, parFloat1 + 0.25F);
|
||||
this.bipedLeftLegwear.setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.bipedRightLegwear = new ModelRenderer(this, 0, 32);
|
||||
this.bipedRightLegwear.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, parFloat1 + 0.25F);
|
||||
this.bipedRightLegwear.setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
this.bipedBodyWear = new ModelRenderer(this, 16, 32);
|
||||
this.bipedBodyWear.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, parFloat1 + 0.25F);
|
||||
this.bipedBodyWear.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
GlStateManager.pushMatrix();
|
||||
if (this.isChild) {
|
||||
float f6 = 2.0F;
|
||||
GlStateManager.scale(1.0F / f6, 1.0F / f6, 1.0F / f6);
|
||||
GlStateManager.translate(0.0F, 24.0F * f5, 0.0F);
|
||||
this.bipedLeftLegwear.render(f5);
|
||||
this.bipedRightLegwear.render(f5);
|
||||
this.bipedLeftArmwear.render(f5);
|
||||
this.bipedRightArmwear.render(f5);
|
||||
this.bipedBodyWear.render(f5);
|
||||
} else {
|
||||
if (entity != null && entity.isSneaking()) {
|
||||
GlStateManager.translate(0.0F, 0.2F, 0.0F);
|
||||
}
|
||||
|
||||
this.bipedLeftLegwear.render(f5);
|
||||
this.bipedRightLegwear.render(f5);
|
||||
this.bipedLeftArmwear.render(f5);
|
||||
this.bipedRightArmwear.render(f5);
|
||||
this.bipedBodyWear.render(f5);
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public void renderDeadmau5Head(float parFloat1) {
|
||||
copyModelAngles(this.bipedHead, this.bipedDeadmau5Head);
|
||||
this.bipedDeadmau5Head.rotationPointX = 0.0F;
|
||||
this.bipedDeadmau5Head.rotationPointY = 0.0F;
|
||||
this.bipedDeadmau5Head.render(parFloat1);
|
||||
}
|
||||
|
||||
public void renderCape(float parFloat1) {
|
||||
this.bipedCape.render(parFloat1);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
copyModelAngles(this.bipedLeftLeg, this.bipedLeftLegwear);
|
||||
copyModelAngles(this.bipedRightLeg, this.bipedRightLegwear);
|
||||
copyModelAngles(this.bipedLeftArm, this.bipedLeftArmwear);
|
||||
copyModelAngles(this.bipedRightArm, this.bipedRightArmwear);
|
||||
copyModelAngles(this.bipedBody, this.bipedBodyWear);
|
||||
if (entity != null && entity.isSneaking()) {
|
||||
this.bipedCape.rotationPointY = 2.0F;
|
||||
} else {
|
||||
this.bipedCape.rotationPointY = 0.0F;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void renderRightArm() {
|
||||
this.bipedRightArm.render(0.0625F);
|
||||
this.bipedRightArmwear.render(0.0625F);
|
||||
}
|
||||
|
||||
public void renderLeftArm() {
|
||||
this.bipedLeftArm.render(0.0625F);
|
||||
this.bipedLeftArmwear.render(0.0625F);
|
||||
}
|
||||
|
||||
public void setInvisible(boolean flag) {
|
||||
super.setInvisible(flag);
|
||||
this.bipedLeftArmwear.showModel = flag;
|
||||
this.bipedRightArmwear.showModel = flag;
|
||||
this.bipedLeftLegwear.showModel = flag;
|
||||
this.bipedRightLegwear.showModel = flag;
|
||||
this.bipedBodyWear.showModel = flag;
|
||||
this.bipedCape.showModel = flag;
|
||||
this.bipedDeadmau5Head.showModel = flag;
|
||||
}
|
||||
|
||||
public void postRenderArm(float f) {
|
||||
if (this.smallArms) {
|
||||
++this.bipedRightArm.rotationPointX;
|
||||
this.bipedRightArm.postRender(f);
|
||||
--this.bipedRightArm.rotationPointX;
|
||||
} else {
|
||||
this.bipedRightArm.postRender(f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
106
src/main/java/net/minecraft/client/model/ModelQuadruped.java
Executable file
106
src/main/java/net/minecraft/client/model/ModelQuadruped.java
Executable file
@@ -0,0 +1,106 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelQuadruped extends ModelBase {
|
||||
public ModelRenderer head = new ModelRenderer(this, 0, 0);
|
||||
public ModelRenderer body;
|
||||
public ModelRenderer leg1;
|
||||
public ModelRenderer leg2;
|
||||
public ModelRenderer leg3;
|
||||
public ModelRenderer leg4;
|
||||
protected float childYOffset = 8.0F;
|
||||
protected float childZOffset = 4.0F;
|
||||
|
||||
public ModelQuadruped(int parInt1, float parFloat1) {
|
||||
this.head.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 8, parFloat1);
|
||||
this.head.setRotationPoint(0.0F, (float) (18 - parInt1), -6.0F);
|
||||
this.body = new ModelRenderer(this, 28, 8);
|
||||
this.body.addBox(-5.0F, -10.0F, -7.0F, 10, 16, 8, parFloat1);
|
||||
this.body.setRotationPoint(0.0F, (float) (17 - parInt1), 2.0F);
|
||||
this.leg1 = new ModelRenderer(this, 0, 16);
|
||||
this.leg1.addBox(-2.0F, 0.0F, -2.0F, 4, parInt1, 4, parFloat1);
|
||||
this.leg1.setRotationPoint(-3.0F, (float) (24 - parInt1), 7.0F);
|
||||
this.leg2 = new ModelRenderer(this, 0, 16);
|
||||
this.leg2.addBox(-2.0F, 0.0F, -2.0F, 4, parInt1, 4, parFloat1);
|
||||
this.leg2.setRotationPoint(3.0F, (float) (24 - parInt1), 7.0F);
|
||||
this.leg3 = new ModelRenderer(this, 0, 16);
|
||||
this.leg3.addBox(-2.0F, 0.0F, -2.0F, 4, parInt1, 4, parFloat1);
|
||||
this.leg3.setRotationPoint(-3.0F, (float) (24 - parInt1), -5.0F);
|
||||
this.leg4 = new ModelRenderer(this, 0, 16);
|
||||
this.leg4.addBox(-2.0F, 0.0F, -2.0F, 4, parInt1, 4, parFloat1);
|
||||
this.leg4.setRotationPoint(3.0F, (float) (24 - parInt1), -5.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
if (this.isChild) {
|
||||
float f6 = 2.0F;
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.0F, this.childYOffset * f5, this.childZOffset * f5);
|
||||
this.head.render(f5);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(1.0F / f6, 1.0F / f6, 1.0F / f6);
|
||||
GlStateManager.translate(0.0F, 24.0F * f5, 0.0F);
|
||||
this.body.render(f5);
|
||||
this.leg1.render(f5);
|
||||
this.leg2.render(f5);
|
||||
this.leg3.render(f5);
|
||||
this.leg4.render(f5);
|
||||
GlStateManager.popMatrix();
|
||||
} else {
|
||||
this.head.render(f5);
|
||||
this.body.render(f5);
|
||||
this.leg1.render(f5);
|
||||
this.leg2.render(f5);
|
||||
this.leg3.render(f5);
|
||||
this.leg4.render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float var3, float f2, float f3, float var6, Entity var7) {
|
||||
float f4 = 57.295776F;
|
||||
this.head.rotateAngleX = f3 / 57.295776F;
|
||||
this.head.rotateAngleY = f2 / 57.295776F;
|
||||
this.body.rotateAngleX = 1.5707964F;
|
||||
this.leg1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.leg2.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.4F * f1;
|
||||
this.leg3.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.4F * f1;
|
||||
this.leg4.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
}
|
||||
}
|
||||
193
src/main/java/net/minecraft/client/model/ModelRabbit.java
Executable file
193
src/main/java/net/minecraft/client/model/ModelRabbit.java
Executable file
@@ -0,0 +1,193 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntityRabbit;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelRabbit extends ModelBase {
|
||||
ModelRenderer rabbitLeftFoot;
|
||||
ModelRenderer rabbitRightFoot;
|
||||
ModelRenderer rabbitLeftThigh;
|
||||
ModelRenderer rabbitRightThigh;
|
||||
ModelRenderer rabbitBody;
|
||||
ModelRenderer rabbitLeftArm;
|
||||
ModelRenderer rabbitRightArm;
|
||||
ModelRenderer rabbitHead;
|
||||
ModelRenderer rabbitRightEar;
|
||||
ModelRenderer rabbitLeftEar;
|
||||
ModelRenderer rabbitTail;
|
||||
ModelRenderer rabbitNose;
|
||||
private float field_178701_m = 0.0F;
|
||||
private float field_178699_n = 0.0F;
|
||||
|
||||
public ModelRabbit() {
|
||||
this.setTextureOffset("head.main", 0, 0);
|
||||
this.setTextureOffset("head.nose", 0, 24);
|
||||
this.setTextureOffset("head.ear1", 0, 10);
|
||||
this.setTextureOffset("head.ear2", 6, 10);
|
||||
this.rabbitLeftFoot = new ModelRenderer(this, 26, 24);
|
||||
this.rabbitLeftFoot.addBox(-1.0F, 5.5F, -3.7F, 2, 1, 7);
|
||||
this.rabbitLeftFoot.setRotationPoint(3.0F, 17.5F, 3.7F);
|
||||
this.rabbitLeftFoot.mirror = true;
|
||||
this.setRotationOffset(this.rabbitLeftFoot, 0.0F, 0.0F, 0.0F);
|
||||
this.rabbitRightFoot = new ModelRenderer(this, 8, 24);
|
||||
this.rabbitRightFoot.addBox(-1.0F, 5.5F, -3.7F, 2, 1, 7);
|
||||
this.rabbitRightFoot.setRotationPoint(-3.0F, 17.5F, 3.7F);
|
||||
this.rabbitRightFoot.mirror = true;
|
||||
this.setRotationOffset(this.rabbitRightFoot, 0.0F, 0.0F, 0.0F);
|
||||
this.rabbitLeftThigh = new ModelRenderer(this, 30, 15);
|
||||
this.rabbitLeftThigh.addBox(-1.0F, 0.0F, 0.0F, 2, 4, 5);
|
||||
this.rabbitLeftThigh.setRotationPoint(3.0F, 17.5F, 3.7F);
|
||||
this.rabbitLeftThigh.mirror = true;
|
||||
this.setRotationOffset(this.rabbitLeftThigh, -0.34906584F, 0.0F, 0.0F);
|
||||
this.rabbitRightThigh = new ModelRenderer(this, 16, 15);
|
||||
this.rabbitRightThigh.addBox(-1.0F, 0.0F, 0.0F, 2, 4, 5);
|
||||
this.rabbitRightThigh.setRotationPoint(-3.0F, 17.5F, 3.7F);
|
||||
this.rabbitRightThigh.mirror = true;
|
||||
this.setRotationOffset(this.rabbitRightThigh, -0.34906584F, 0.0F, 0.0F);
|
||||
this.rabbitBody = new ModelRenderer(this, 0, 0);
|
||||
this.rabbitBody.addBox(-3.0F, -2.0F, -10.0F, 6, 5, 10);
|
||||
this.rabbitBody.setRotationPoint(0.0F, 19.0F, 8.0F);
|
||||
this.rabbitBody.mirror = true;
|
||||
this.setRotationOffset(this.rabbitBody, -0.34906584F, 0.0F, 0.0F);
|
||||
this.rabbitLeftArm = new ModelRenderer(this, 8, 15);
|
||||
this.rabbitLeftArm.addBox(-1.0F, 0.0F, -1.0F, 2, 7, 2);
|
||||
this.rabbitLeftArm.setRotationPoint(3.0F, 17.0F, -1.0F);
|
||||
this.rabbitLeftArm.mirror = true;
|
||||
this.setRotationOffset(this.rabbitLeftArm, -0.17453292F, 0.0F, 0.0F);
|
||||
this.rabbitRightArm = new ModelRenderer(this, 0, 15);
|
||||
this.rabbitRightArm.addBox(-1.0F, 0.0F, -1.0F, 2, 7, 2);
|
||||
this.rabbitRightArm.setRotationPoint(-3.0F, 17.0F, -1.0F);
|
||||
this.rabbitRightArm.mirror = true;
|
||||
this.setRotationOffset(this.rabbitRightArm, -0.17453292F, 0.0F, 0.0F);
|
||||
this.rabbitHead = new ModelRenderer(this, 32, 0);
|
||||
this.rabbitHead.addBox(-2.5F, -4.0F, -5.0F, 5, 4, 5);
|
||||
this.rabbitHead.setRotationPoint(0.0F, 16.0F, -1.0F);
|
||||
this.rabbitHead.mirror = true;
|
||||
this.setRotationOffset(this.rabbitHead, 0.0F, 0.0F, 0.0F);
|
||||
this.rabbitRightEar = new ModelRenderer(this, 52, 0);
|
||||
this.rabbitRightEar.addBox(-2.5F, -9.0F, -1.0F, 2, 5, 1);
|
||||
this.rabbitRightEar.setRotationPoint(0.0F, 16.0F, -1.0F);
|
||||
this.rabbitRightEar.mirror = true;
|
||||
this.setRotationOffset(this.rabbitRightEar, 0.0F, -0.2617994F, 0.0F);
|
||||
this.rabbitLeftEar = new ModelRenderer(this, 58, 0);
|
||||
this.rabbitLeftEar.addBox(0.5F, -9.0F, -1.0F, 2, 5, 1);
|
||||
this.rabbitLeftEar.setRotationPoint(0.0F, 16.0F, -1.0F);
|
||||
this.rabbitLeftEar.mirror = true;
|
||||
this.setRotationOffset(this.rabbitLeftEar, 0.0F, 0.2617994F, 0.0F);
|
||||
this.rabbitTail = new ModelRenderer(this, 52, 6);
|
||||
this.rabbitTail.addBox(-1.5F, -1.5F, 0.0F, 3, 3, 2);
|
||||
this.rabbitTail.setRotationPoint(0.0F, 20.0F, 7.0F);
|
||||
this.rabbitTail.mirror = true;
|
||||
this.setRotationOffset(this.rabbitTail, -0.3490659F, 0.0F, 0.0F);
|
||||
this.rabbitNose = new ModelRenderer(this, 32, 9);
|
||||
this.rabbitNose.addBox(-0.5F, -2.5F, -5.5F, 1, 1, 1);
|
||||
this.rabbitNose.setRotationPoint(0.0F, 16.0F, -1.0F);
|
||||
this.rabbitNose.mirror = true;
|
||||
this.setRotationOffset(this.rabbitNose, 0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
private void setRotationOffset(ModelRenderer parModelRenderer, float parFloat1, float parFloat2, float parFloat3) {
|
||||
parModelRenderer.rotateAngleX = parFloat1;
|
||||
parModelRenderer.rotateAngleY = parFloat2;
|
||||
parModelRenderer.rotateAngleZ = parFloat3;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
if (this.isChild) {
|
||||
float f6 = 2.0F;
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.0F, 5.0F * f5, 2.0F * f5);
|
||||
this.rabbitHead.render(f5);
|
||||
this.rabbitLeftEar.render(f5);
|
||||
this.rabbitRightEar.render(f5);
|
||||
this.rabbitNose.render(f5);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(1.0F / f6, 1.0F / f6, 1.0F / f6);
|
||||
GlStateManager.translate(0.0F, 24.0F * f5, 0.0F);
|
||||
this.rabbitLeftFoot.render(f5);
|
||||
this.rabbitRightFoot.render(f5);
|
||||
this.rabbitLeftThigh.render(f5);
|
||||
this.rabbitRightThigh.render(f5);
|
||||
this.rabbitBody.render(f5);
|
||||
this.rabbitLeftArm.render(f5);
|
||||
this.rabbitRightArm.render(f5);
|
||||
this.rabbitTail.render(f5);
|
||||
GlStateManager.popMatrix();
|
||||
} else {
|
||||
this.rabbitLeftFoot.render(f5);
|
||||
this.rabbitRightFoot.render(f5);
|
||||
this.rabbitLeftThigh.render(f5);
|
||||
this.rabbitRightThigh.render(f5);
|
||||
this.rabbitBody.render(f5);
|
||||
this.rabbitLeftArm.render(f5);
|
||||
this.rabbitRightArm.render(f5);
|
||||
this.rabbitHead.render(f5);
|
||||
this.rabbitRightEar.render(f5);
|
||||
this.rabbitLeftEar.render(f5);
|
||||
this.rabbitTail.render(f5);
|
||||
this.rabbitNose.render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float var1, float var2, float f, float f1, float f2, float var6, Entity entity) {
|
||||
float f3 = f - (float) entity.ticksExisted;
|
||||
EntityRabbit entityrabbit = (EntityRabbit) entity;
|
||||
this.rabbitNose.rotateAngleX = this.rabbitHead.rotateAngleX = this.rabbitRightEar.rotateAngleX = this.rabbitLeftEar.rotateAngleX = f2
|
||||
* 0.017453292F;
|
||||
this.rabbitNose.rotateAngleY = this.rabbitHead.rotateAngleY = f1 * 0.017453292F;
|
||||
this.rabbitRightEar.rotateAngleY = this.rabbitNose.rotateAngleY - 0.2617994F;
|
||||
this.rabbitLeftEar.rotateAngleY = this.rabbitNose.rotateAngleY + 0.2617994F;
|
||||
this.field_178701_m = MathHelper.sin(entityrabbit.func_175521_o(f3) * 3.1415927F);
|
||||
this.rabbitLeftThigh.rotateAngleX = this.rabbitRightThigh.rotateAngleX = (this.field_178701_m * 50.0F - 21.0F)
|
||||
* 0.017453292F;
|
||||
this.rabbitLeftFoot.rotateAngleX = this.rabbitRightFoot.rotateAngleX = this.field_178701_m * 50.0F
|
||||
* 0.017453292F;
|
||||
this.rabbitLeftArm.rotateAngleX = this.rabbitRightArm.rotateAngleX = (this.field_178701_m * -40.0F - 11.0F)
|
||||
* 0.017453292F;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase var1, float var2, float var3, float var4) {
|
||||
}
|
||||
}
|
||||
294
src/main/java/net/minecraft/client/model/ModelRenderer.java
Executable file
294
src/main/java/net/minecraft/client/model/ModelRenderer.java
Executable file
@@ -0,0 +1,294 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelRenderer {
|
||||
public float textureWidth;
|
||||
public float textureHeight;
|
||||
private int textureOffsetX;
|
||||
private int textureOffsetY;
|
||||
public float rotationPointX;
|
||||
public float rotationPointY;
|
||||
public float rotationPointZ;
|
||||
public float rotateAngleX;
|
||||
public float rotateAngleY;
|
||||
public float rotateAngleZ;
|
||||
private boolean compiled;
|
||||
private int displayList;
|
||||
public boolean mirror;
|
||||
public boolean showModel;
|
||||
public boolean isHidden;
|
||||
public List<ModelBox> cubeList;
|
||||
public List<ModelRenderer> childModels;
|
||||
public final String boxName;
|
||||
private ModelBase baseModel;
|
||||
public float offsetX;
|
||||
public float offsetY;
|
||||
public float offsetZ;
|
||||
|
||||
public ModelRenderer(ModelBase model, String boxNameIn) {
|
||||
this.textureWidth = 64.0F;
|
||||
this.textureHeight = 32.0F;
|
||||
this.showModel = true;
|
||||
this.cubeList = Lists.newArrayList();
|
||||
this.baseModel = model;
|
||||
model.boxList.add(this);
|
||||
this.boxName = boxNameIn;
|
||||
this.setTextureSize(model.textureWidth, model.textureHeight);
|
||||
}
|
||||
|
||||
public ModelRenderer(ModelBase model) {
|
||||
this(model, (String) null);
|
||||
}
|
||||
|
||||
public ModelRenderer(ModelBase model, int texOffX, int texOffY) {
|
||||
this(model);
|
||||
this.setTextureOffset(texOffX, texOffY);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the current box's rotation points and rotation angles to
|
||||
* another box.
|
||||
*/
|
||||
public void addChild(ModelRenderer renderer) {
|
||||
if (this.childModels == null) {
|
||||
this.childModels = Lists.newArrayList();
|
||||
}
|
||||
|
||||
this.childModels.add(renderer);
|
||||
}
|
||||
|
||||
public ModelRenderer setTextureOffset(int x, int y) {
|
||||
this.textureOffsetX = x;
|
||||
this.textureOffsetY = y;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Creates a textured box. Args: originX, originY, originZ,
|
||||
* width, height, depth, scaleFactor.
|
||||
*/
|
||||
public ModelRenderer addBox(String partName, float offX, float offY, float offZ, int width, int height, int depth) {
|
||||
partName = this.boxName + "." + partName;
|
||||
TextureOffset textureoffset = this.baseModel.getTextureOffset(partName);
|
||||
this.setTextureOffset(textureoffset.textureOffsetX, textureoffset.textureOffsetY);
|
||||
this.cubeList.add((new ModelBox(this, this.textureOffsetX, this.textureOffsetY, offX, offY, offZ, width, height,
|
||||
depth, 0.0F)).setBoxName(partName));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Creates a textured box. Args: originX, originY, originZ,
|
||||
* width, height, depth, scaleFactor.
|
||||
*/
|
||||
public ModelRenderer addBox(float offX, float offY, float offZ, int width, int height, int depth) {
|
||||
this.cubeList.add(new ModelBox(this, this.textureOffsetX, this.textureOffsetY, offX, offY, offZ, width, height,
|
||||
depth, 0.0F));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Creates a textured box. Args: originX, originY, originZ,
|
||||
* width, height, depth, scaleFactor.
|
||||
*/
|
||||
public ModelRenderer addBox(float parFloat1, float parFloat2, float parFloat3, int parInt1, int parInt2,
|
||||
int parInt3, boolean parFlag) {
|
||||
this.cubeList.add(new ModelBox(this, this.textureOffsetX, this.textureOffsetY, parFloat1, parFloat2, parFloat3,
|
||||
parInt1, parInt2, parInt3, 0.0F, parFlag));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Creates a textured box. Args: originX, originY, originZ,
|
||||
* width, height, depth, scaleFactor.
|
||||
*/
|
||||
public void addBox(float width, float height, float depth, int scaleFactor, int parInt2, int parInt3,
|
||||
float parFloat4) {
|
||||
this.cubeList.add(new ModelBox(this, this.textureOffsetX, this.textureOffsetY, width, height, depth,
|
||||
scaleFactor, parInt2, parInt3, parFloat4));
|
||||
}
|
||||
|
||||
public void setRotationPoint(float rotationPointXIn, float rotationPointYIn, float rotationPointZIn) {
|
||||
this.rotationPointX = rotationPointXIn;
|
||||
this.rotationPointY = rotationPointYIn;
|
||||
this.rotationPointZ = rotationPointZIn;
|
||||
}
|
||||
|
||||
public void render(float parFloat1) {
|
||||
if (!this.isHidden) {
|
||||
if (this.showModel) {
|
||||
if (!this.compiled) {
|
||||
this.compileDisplayList(parFloat1);
|
||||
}
|
||||
|
||||
GlStateManager.translate(this.offsetX, this.offsetY, this.offsetZ);
|
||||
if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F) {
|
||||
if (this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F) {
|
||||
GlStateManager.callList(this.displayList);
|
||||
if (this.childModels != null) {
|
||||
for (int k = 0; k < this.childModels.size(); ++k) {
|
||||
((ModelRenderer) this.childModels.get(k)).render(parFloat1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
GlStateManager.translate(this.rotationPointX * parFloat1, this.rotationPointY * parFloat1,
|
||||
this.rotationPointZ * parFloat1);
|
||||
GlStateManager.callList(this.displayList);
|
||||
if (this.childModels != null) {
|
||||
for (int j = 0; j < this.childModels.size(); ++j) {
|
||||
((ModelRenderer) this.childModels.get(j)).render(parFloat1);
|
||||
}
|
||||
}
|
||||
|
||||
GlStateManager.translate(-this.rotationPointX * parFloat1, -this.rotationPointY * parFloat1,
|
||||
-this.rotationPointZ * parFloat1);
|
||||
}
|
||||
} else {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(this.rotationPointX * parFloat1, this.rotationPointY * parFloat1,
|
||||
this.rotationPointZ * parFloat1);
|
||||
if (this.rotateAngleZ != 0.0F) {
|
||||
GlStateManager.rotate(this.rotateAngleZ * 57.295776F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleY != 0.0F) {
|
||||
GlStateManager.rotate(this.rotateAngleY * 57.295776F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleX != 0.0F) {
|
||||
GlStateManager.rotate(this.rotateAngleX * 57.295776F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
GlStateManager.callList(this.displayList);
|
||||
if (this.childModels != null) {
|
||||
for (int i = 0; i < this.childModels.size(); ++i) {
|
||||
((ModelRenderer) this.childModels.get(i)).render(parFloat1);
|
||||
}
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
GlStateManager.translate(-this.offsetX, -this.offsetY, -this.offsetZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void renderWithRotation(float parFloat1) {
|
||||
if (!this.isHidden) {
|
||||
if (this.showModel) {
|
||||
if (!this.compiled) {
|
||||
this.compileDisplayList(parFloat1);
|
||||
}
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(this.rotationPointX * parFloat1, this.rotationPointY * parFloat1,
|
||||
this.rotationPointZ * parFloat1);
|
||||
if (this.rotateAngleY != 0.0F) {
|
||||
GlStateManager.rotate(this.rotateAngleY * 57.295776F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleX != 0.0F) {
|
||||
GlStateManager.rotate(this.rotateAngleX * 57.295776F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleZ != 0.0F) {
|
||||
GlStateManager.rotate(this.rotateAngleZ * 57.295776F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
GlStateManager.callList(this.displayList);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**+
|
||||
* Allows the changing of Angles after a box has been rendered
|
||||
*/
|
||||
public void postRender(float scale) {
|
||||
if (!this.isHidden) {
|
||||
if (this.showModel) {
|
||||
if (!this.compiled) {
|
||||
this.compileDisplayList(scale);
|
||||
}
|
||||
|
||||
if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F) {
|
||||
if (this.rotationPointX != 0.0F || this.rotationPointY != 0.0F || this.rotationPointZ != 0.0F) {
|
||||
GlStateManager.translate(this.rotationPointX * scale, this.rotationPointY * scale,
|
||||
this.rotationPointZ * scale);
|
||||
}
|
||||
} else {
|
||||
GlStateManager.translate(this.rotationPointX * scale, this.rotationPointY * scale,
|
||||
this.rotationPointZ * scale);
|
||||
if (this.rotateAngleZ != 0.0F) {
|
||||
GlStateManager.rotate(this.rotateAngleZ * 57.295776F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleY != 0.0F) {
|
||||
GlStateManager.rotate(this.rotateAngleY * 57.295776F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if (this.rotateAngleX != 0.0F) {
|
||||
GlStateManager.rotate(this.rotateAngleX * 57.295776F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**+
|
||||
* Compiles a GL display list for this model
|
||||
*/
|
||||
private void compileDisplayList(float scale) {
|
||||
this.displayList = GLAllocation.generateDisplayLists();
|
||||
EaglercraftGPU.glNewList(this.displayList, GL_COMPILE);
|
||||
WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();
|
||||
|
||||
for (int i = 0; i < this.cubeList.size(); ++i) {
|
||||
((ModelBox) this.cubeList.get(i)).render(worldrenderer, scale);
|
||||
}
|
||||
|
||||
EaglercraftGPU.glEndList();
|
||||
this.compiled = true;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Returns the model renderer with the new texture parameters.
|
||||
*/
|
||||
public ModelRenderer setTextureSize(int textureWidthIn, int textureHeightIn) {
|
||||
this.textureWidth = (float) textureWidthIn;
|
||||
this.textureHeight = (float) textureHeightIn;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
75
src/main/java/net/minecraft/client/model/ModelSheep1.java
Executable file
75
src/main/java/net/minecraft/client/model/ModelSheep1.java
Executable file
@@ -0,0 +1,75 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelSheep1 extends ModelQuadruped {
|
||||
private float headRotationAngleX;
|
||||
|
||||
public ModelSheep1() {
|
||||
super(12, 0.0F);
|
||||
this.head = new ModelRenderer(this, 0, 0);
|
||||
this.head.addBox(-3.0F, -4.0F, -4.0F, 6, 6, 6, 0.6F);
|
||||
this.head.setRotationPoint(0.0F, 6.0F, -8.0F);
|
||||
this.body = new ModelRenderer(this, 28, 8);
|
||||
this.body.addBox(-4.0F, -10.0F, -7.0F, 8, 16, 6, 1.75F);
|
||||
this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
|
||||
float f = 0.5F;
|
||||
this.leg1 = new ModelRenderer(this, 0, 16);
|
||||
this.leg1.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, f);
|
||||
this.leg1.setRotationPoint(-3.0F, 12.0F, 7.0F);
|
||||
this.leg2 = new ModelRenderer(this, 0, 16);
|
||||
this.leg2.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, f);
|
||||
this.leg2.setRotationPoint(3.0F, 12.0F, 7.0F);
|
||||
this.leg3 = new ModelRenderer(this, 0, 16);
|
||||
this.leg3.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, f);
|
||||
this.leg3.setRotationPoint(-3.0F, 12.0F, -5.0F);
|
||||
this.leg4 = new ModelRenderer(this, 0, 16);
|
||||
this.leg4.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, f);
|
||||
this.leg4.setRotationPoint(3.0F, 12.0F, -5.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbase, float f, float f1, float f2) {
|
||||
super.setLivingAnimations(entitylivingbase, f, f1, f2);
|
||||
this.head.rotationPointY = 6.0F + ((EntitySheep) entitylivingbase).getHeadRotationPointY(f2) * 9.0F;
|
||||
this.headRotationAngleX = ((EntitySheep) entitylivingbase).getHeadRotationAngleX(f2);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.head.rotateAngleX = this.headRotationAngleX;
|
||||
}
|
||||
}
|
||||
62
src/main/java/net/minecraft/client/model/ModelSheep2.java
Executable file
62
src/main/java/net/minecraft/client/model/ModelSheep2.java
Executable file
@@ -0,0 +1,62 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelSheep2 extends ModelQuadruped {
|
||||
private float headRotationAngleX;
|
||||
|
||||
public ModelSheep2() {
|
||||
super(12, 0.0F);
|
||||
this.head = new ModelRenderer(this, 0, 0);
|
||||
this.head.addBox(-3.0F, -4.0F, -6.0F, 6, 6, 8, 0.0F);
|
||||
this.head.setRotationPoint(0.0F, 6.0F, -8.0F);
|
||||
this.body = new ModelRenderer(this, 28, 8);
|
||||
this.body.addBox(-4.0F, -10.0F, -7.0F, 8, 16, 6, 0.0F);
|
||||
this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbase, float f, float f1, float f2) {
|
||||
super.setLivingAnimations(entitylivingbase, f, f1, f2);
|
||||
this.head.rotationPointY = 6.0F + ((EntitySheep) entitylivingbase).getHeadRotationPointY(f2) * 9.0F;
|
||||
this.headRotationAngleX = ((EntitySheep) entitylivingbase).getHeadRotationAngleX(f2);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.head.rotateAngleX = this.headRotationAngleX;
|
||||
}
|
||||
}
|
||||
43
src/main/java/net/minecraft/client/model/ModelSign.java
Executable file
43
src/main/java/net/minecraft/client/model/ModelSign.java
Executable file
@@ -0,0 +1,43 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelSign extends ModelBase {
|
||||
/**+
|
||||
* The board on a sign that has the writing on it.
|
||||
*/
|
||||
public ModelRenderer signBoard = new ModelRenderer(this, 0, 0);
|
||||
public ModelRenderer signStick;
|
||||
|
||||
public ModelSign() {
|
||||
this.signBoard.addBox(-12.0F, -14.0F, -1.0F, 24, 12, 2, 0.0F);
|
||||
this.signStick = new ModelRenderer(this, 0, 14);
|
||||
this.signStick.addBox(-1.0F, -2.0F, -1.0F, 2, 14, 2, 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Renders the sign model through TileEntitySignRenderer
|
||||
*/
|
||||
public void renderSign() {
|
||||
this.signBoard.render(0.0625F);
|
||||
this.signStick.render(0.0625F);
|
||||
}
|
||||
}
|
||||
114
src/main/java/net/minecraft/client/model/ModelSilverfish.java
Executable file
114
src/main/java/net/minecraft/client/model/ModelSilverfish.java
Executable file
@@ -0,0 +1,114 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelSilverfish extends ModelBase {
|
||||
/**+
|
||||
* The body parts of the silverfish's model.
|
||||
*/
|
||||
private ModelRenderer[] silverfishBodyParts = new ModelRenderer[7];
|
||||
private ModelRenderer[] silverfishWings;
|
||||
private float[] field_78170_c = new float[7];
|
||||
/**+
|
||||
* The widths, heights, and lengths for the silverfish model
|
||||
* boxes.
|
||||
*/
|
||||
private static final int[][] silverfishBoxLength = new int[][] { { 3, 2, 2 }, { 4, 3, 2 }, { 6, 4, 3 }, { 3, 3, 3 },
|
||||
{ 2, 2, 3 }, { 2, 1, 2 }, { 1, 1, 2 } };
|
||||
/**+
|
||||
* The texture positions for the silverfish's model's boxes.
|
||||
*/
|
||||
private static final int[][] silverfishTexturePositions = new int[][] { { 0, 0 }, { 0, 4 }, { 0, 9 }, { 0, 16 },
|
||||
{ 0, 22 }, { 11, 0 }, { 13, 4 } };
|
||||
|
||||
public ModelSilverfish() {
|
||||
float f = -3.5F;
|
||||
|
||||
for (int i = 0; i < this.silverfishBodyParts.length; ++i) {
|
||||
this.silverfishBodyParts[i] = new ModelRenderer(this, silverfishTexturePositions[i][0],
|
||||
silverfishTexturePositions[i][1]);
|
||||
this.silverfishBodyParts[i].addBox((float) silverfishBoxLength[i][0] * -0.5F, 0.0F,
|
||||
(float) silverfishBoxLength[i][2] * -0.5F, silverfishBoxLength[i][0], silverfishBoxLength[i][1],
|
||||
silverfishBoxLength[i][2]);
|
||||
this.silverfishBodyParts[i].setRotationPoint(0.0F, (float) (24 - silverfishBoxLength[i][1]), f);
|
||||
this.field_78170_c[i] = f;
|
||||
if (i < this.silverfishBodyParts.length - 1) {
|
||||
f += (float) (silverfishBoxLength[i][2] + silverfishBoxLength[i + 1][2]) * 0.5F;
|
||||
}
|
||||
}
|
||||
|
||||
this.silverfishWings = new ModelRenderer[3];
|
||||
this.silverfishWings[0] = new ModelRenderer(this, 20, 0);
|
||||
this.silverfishWings[0].addBox(-5.0F, 0.0F, (float) silverfishBoxLength[2][2] * -0.5F, 10, 8,
|
||||
silverfishBoxLength[2][2]);
|
||||
this.silverfishWings[0].setRotationPoint(0.0F, 16.0F, this.field_78170_c[2]);
|
||||
this.silverfishWings[1] = new ModelRenderer(this, 20, 11);
|
||||
this.silverfishWings[1].addBox(-3.0F, 0.0F, (float) silverfishBoxLength[4][2] * -0.5F, 6, 4,
|
||||
silverfishBoxLength[4][2]);
|
||||
this.silverfishWings[1].setRotationPoint(0.0F, 20.0F, this.field_78170_c[4]);
|
||||
this.silverfishWings[2] = new ModelRenderer(this, 20, 18);
|
||||
this.silverfishWings[2].addBox(-3.0F, 0.0F, (float) silverfishBoxLength[4][2] * -0.5F, 6, 5,
|
||||
silverfishBoxLength[1][2]);
|
||||
this.silverfishWings[2].setRotationPoint(0.0F, 19.0F, this.field_78170_c[1]);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
for (int i = 0; i < this.silverfishBodyParts.length; ++i) {
|
||||
this.silverfishBodyParts[i].render(f5);
|
||||
}
|
||||
|
||||
for (int j = 0; j < this.silverfishWings.length; ++j) {
|
||||
this.silverfishWings[j].render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float var1, float var2, float f, float var4, float var5, float var6, Entity var7) {
|
||||
for (int i = 0; i < this.silverfishBodyParts.length; ++i) {
|
||||
this.silverfishBodyParts[i].rotateAngleY = MathHelper.cos(f * 0.9F + (float) i * 0.15F * 3.1415927F)
|
||||
* 3.1415927F * 0.05F * (float) (1 + Math.abs(i - 2));
|
||||
this.silverfishBodyParts[i].rotationPointX = MathHelper.sin(f * 0.9F + (float) i * 0.15F * 3.1415927F)
|
||||
* 3.1415927F * 0.2F * (float) Math.abs(i - 2);
|
||||
}
|
||||
|
||||
this.silverfishWings[0].rotateAngleY = this.silverfishBodyParts[2].rotateAngleY;
|
||||
this.silverfishWings[1].rotateAngleY = this.silverfishBodyParts[4].rotateAngleY;
|
||||
this.silverfishWings[1].rotationPointX = this.silverfishBodyParts[4].rotationPointX;
|
||||
this.silverfishWings[2].rotateAngleY = this.silverfishBodyParts[1].rotateAngleY;
|
||||
this.silverfishWings[2].rotationPointX = this.silverfishBodyParts[1].rotationPointX;
|
||||
}
|
||||
}
|
||||
73
src/main/java/net/minecraft/client/model/ModelSkeleton.java
Executable file
73
src/main/java/net/minecraft/client/model/ModelSkeleton.java
Executable file
@@ -0,0 +1,73 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelSkeleton extends ModelZombie {
|
||||
public ModelSkeleton() {
|
||||
this(0.0F, false);
|
||||
}
|
||||
|
||||
public ModelSkeleton(float parFloat1, boolean parFlag) {
|
||||
super(parFloat1, 0.0F, 64, 32);
|
||||
if (!parFlag) {
|
||||
this.bipedRightArm = new ModelRenderer(this, 40, 16);
|
||||
this.bipedRightArm.addBox(-1.0F, -2.0F, -1.0F, 2, 12, 2, parFloat1);
|
||||
this.bipedRightArm.setRotationPoint(-5.0F, 2.0F, 0.0F);
|
||||
this.bipedLeftArm = new ModelRenderer(this, 40, 16);
|
||||
this.bipedLeftArm.mirror = true;
|
||||
this.bipedLeftArm.addBox(-1.0F, -2.0F, -1.0F, 2, 12, 2, parFloat1);
|
||||
this.bipedLeftArm.setRotationPoint(5.0F, 2.0F, 0.0F);
|
||||
this.bipedRightLeg = new ModelRenderer(this, 0, 16);
|
||||
this.bipedRightLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 12, 2, parFloat1);
|
||||
this.bipedRightLeg.setRotationPoint(-2.0F, 12.0F, 0.0F);
|
||||
this.bipedLeftLeg = new ModelRenderer(this, 0, 16);
|
||||
this.bipedLeftLeg.mirror = true;
|
||||
this.bipedLeftLeg.addBox(-1.0F, 0.0F, -1.0F, 2, 12, 2, parFloat1);
|
||||
this.bipedLeftLeg.setRotationPoint(2.0F, 12.0F, 0.0F);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbase, float f, float f1, float f2) {
|
||||
this.aimedBow = ((EntitySkeleton) entitylivingbase).getSkeletonType() == 1;
|
||||
super.setLivingAnimations(entitylivingbase, f, f1, f2);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
}
|
||||
61
src/main/java/net/minecraft/client/model/ModelSkeletonHead.java
Executable file
61
src/main/java/net/minecraft/client/model/ModelSkeletonHead.java
Executable file
@@ -0,0 +1,61 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelSkeletonHead extends ModelBase {
|
||||
public ModelRenderer skeletonHead;
|
||||
|
||||
public ModelSkeletonHead() {
|
||||
this(0, 35, 64, 64);
|
||||
}
|
||||
|
||||
public ModelSkeletonHead(int parInt1, int parInt2, int parInt3, int parInt4) {
|
||||
this.textureWidth = parInt3;
|
||||
this.textureHeight = parInt4;
|
||||
this.skeletonHead = new ModelRenderer(this, parInt1, parInt2);
|
||||
this.skeletonHead.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
this.skeletonHead.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.skeletonHead.render(f5);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.skeletonHead.rotateAngleY = f3 / 57.295776F;
|
||||
this.skeletonHead.rotateAngleX = f4 / 57.295776F;
|
||||
}
|
||||
}
|
||||
61
src/main/java/net/minecraft/client/model/ModelSlime.java
Executable file
61
src/main/java/net/minecraft/client/model/ModelSlime.java
Executable file
@@ -0,0 +1,61 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelSlime extends ModelBase {
|
||||
ModelRenderer slimeBodies;
|
||||
ModelRenderer slimeRightEye;
|
||||
ModelRenderer slimeLeftEye;
|
||||
ModelRenderer slimeMouth;
|
||||
|
||||
public ModelSlime(int parInt1) {
|
||||
this.slimeBodies = new ModelRenderer(this, 0, parInt1);
|
||||
this.slimeBodies.addBox(-4.0F, 16.0F, -4.0F, 8, 8, 8);
|
||||
if (parInt1 > 0) {
|
||||
this.slimeBodies = new ModelRenderer(this, 0, parInt1);
|
||||
this.slimeBodies.addBox(-3.0F, 17.0F, -3.0F, 6, 6, 6);
|
||||
this.slimeRightEye = new ModelRenderer(this, 32, 0);
|
||||
this.slimeRightEye.addBox(-3.25F, 18.0F, -3.5F, 2, 2, 2);
|
||||
this.slimeLeftEye = new ModelRenderer(this, 32, 4);
|
||||
this.slimeLeftEye.addBox(1.25F, 18.0F, -3.5F, 2, 2, 2);
|
||||
this.slimeMouth = new ModelRenderer(this, 32, 8);
|
||||
this.slimeMouth.addBox(0.0F, 21.0F, -3.5F, 1, 1, 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.slimeBodies.render(f5);
|
||||
if (this.slimeRightEye != null) {
|
||||
this.slimeRightEye.render(f5);
|
||||
this.slimeLeftEye.render(f5);
|
||||
this.slimeMouth.render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
89
src/main/java/net/minecraft/client/model/ModelSnowMan.java
Executable file
89
src/main/java/net/minecraft/client/model/ModelSnowMan.java
Executable file
@@ -0,0 +1,89 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelSnowMan extends ModelBase {
|
||||
public ModelRenderer body;
|
||||
public ModelRenderer bottomBody;
|
||||
public ModelRenderer head;
|
||||
public ModelRenderer rightHand;
|
||||
public ModelRenderer leftHand;
|
||||
|
||||
public ModelSnowMan() {
|
||||
float f = 4.0F;
|
||||
float f1 = 0.0F;
|
||||
this.head = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64);
|
||||
this.head.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, f1 - 0.5F);
|
||||
this.head.setRotationPoint(0.0F, 0.0F + f, 0.0F);
|
||||
this.rightHand = (new ModelRenderer(this, 32, 0)).setTextureSize(64, 64);
|
||||
this.rightHand.addBox(-1.0F, 0.0F, -1.0F, 12, 2, 2, f1 - 0.5F);
|
||||
this.rightHand.setRotationPoint(0.0F, 0.0F + f + 9.0F - 7.0F, 0.0F);
|
||||
this.leftHand = (new ModelRenderer(this, 32, 0)).setTextureSize(64, 64);
|
||||
this.leftHand.addBox(-1.0F, 0.0F, -1.0F, 12, 2, 2, f1 - 0.5F);
|
||||
this.leftHand.setRotationPoint(0.0F, 0.0F + f + 9.0F - 7.0F, 0.0F);
|
||||
this.body = (new ModelRenderer(this, 0, 16)).setTextureSize(64, 64);
|
||||
this.body.addBox(-5.0F, -10.0F, -5.0F, 10, 10, 10, f1 - 0.5F);
|
||||
this.body.setRotationPoint(0.0F, 0.0F + f + 9.0F, 0.0F);
|
||||
this.bottomBody = (new ModelRenderer(this, 0, 36)).setTextureSize(64, 64);
|
||||
this.bottomBody.addBox(-6.0F, -12.0F, -6.0F, 12, 12, 12, f1 - 0.5F);
|
||||
this.bottomBody.setRotationPoint(0.0F, 0.0F + f + 20.0F, 0.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.head.rotateAngleY = f3 / 57.295776F;
|
||||
this.head.rotateAngleX = f4 / 57.295776F;
|
||||
this.body.rotateAngleY = f3 / 57.295776F * 0.25F;
|
||||
float f6 = MathHelper.sin(this.body.rotateAngleY);
|
||||
float f7 = MathHelper.cos(this.body.rotateAngleY);
|
||||
this.rightHand.rotateAngleZ = 1.0F;
|
||||
this.leftHand.rotateAngleZ = -1.0F;
|
||||
this.rightHand.rotateAngleY = 0.0F + this.body.rotateAngleY;
|
||||
this.leftHand.rotateAngleY = 3.1415927F + this.body.rotateAngleY;
|
||||
this.rightHand.rotationPointX = f7 * 5.0F;
|
||||
this.rightHand.rotationPointZ = -f6 * 5.0F;
|
||||
this.leftHand.rotationPointX = -f7 * 5.0F;
|
||||
this.leftHand.rotationPointZ = f6 * 5.0F;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.body.render(f5);
|
||||
this.bottomBody.render(f5);
|
||||
this.head.render(f5);
|
||||
this.rightHand.render(f5);
|
||||
this.leftHand.render(f5);
|
||||
}
|
||||
}
|
||||
150
src/main/java/net/minecraft/client/model/ModelSpider.java
Executable file
150
src/main/java/net/minecraft/client/model/ModelSpider.java
Executable file
@@ -0,0 +1,150 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelSpider extends ModelBase {
|
||||
public ModelRenderer spiderHead;
|
||||
public ModelRenderer spiderNeck;
|
||||
public ModelRenderer spiderBody;
|
||||
public ModelRenderer spiderLeg1;
|
||||
public ModelRenderer spiderLeg2;
|
||||
public ModelRenderer spiderLeg3;
|
||||
public ModelRenderer spiderLeg4;
|
||||
public ModelRenderer spiderLeg5;
|
||||
public ModelRenderer spiderLeg6;
|
||||
public ModelRenderer spiderLeg7;
|
||||
public ModelRenderer spiderLeg8;
|
||||
|
||||
public ModelSpider() {
|
||||
float f = 0.0F;
|
||||
byte b0 = 15;
|
||||
this.spiderHead = new ModelRenderer(this, 32, 4);
|
||||
this.spiderHead.addBox(-4.0F, -4.0F, -8.0F, 8, 8, 8, f);
|
||||
this.spiderHead.setRotationPoint(0.0F, (float) b0, -3.0F);
|
||||
this.spiderNeck = new ModelRenderer(this, 0, 0);
|
||||
this.spiderNeck.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6, f);
|
||||
this.spiderNeck.setRotationPoint(0.0F, (float) b0, 0.0F);
|
||||
this.spiderBody = new ModelRenderer(this, 0, 12);
|
||||
this.spiderBody.addBox(-5.0F, -4.0F, -6.0F, 10, 8, 12, f);
|
||||
this.spiderBody.setRotationPoint(0.0F, (float) b0, 9.0F);
|
||||
this.spiderLeg1 = new ModelRenderer(this, 18, 0);
|
||||
this.spiderLeg1.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f);
|
||||
this.spiderLeg1.setRotationPoint(-4.0F, (float) b0, 2.0F);
|
||||
this.spiderLeg2 = new ModelRenderer(this, 18, 0);
|
||||
this.spiderLeg2.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f);
|
||||
this.spiderLeg2.setRotationPoint(4.0F, (float) b0, 2.0F);
|
||||
this.spiderLeg3 = new ModelRenderer(this, 18, 0);
|
||||
this.spiderLeg3.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f);
|
||||
this.spiderLeg3.setRotationPoint(-4.0F, (float) b0, 1.0F);
|
||||
this.spiderLeg4 = new ModelRenderer(this, 18, 0);
|
||||
this.spiderLeg4.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f);
|
||||
this.spiderLeg4.setRotationPoint(4.0F, (float) b0, 1.0F);
|
||||
this.spiderLeg5 = new ModelRenderer(this, 18, 0);
|
||||
this.spiderLeg5.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f);
|
||||
this.spiderLeg5.setRotationPoint(-4.0F, (float) b0, 0.0F);
|
||||
this.spiderLeg6 = new ModelRenderer(this, 18, 0);
|
||||
this.spiderLeg6.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f);
|
||||
this.spiderLeg6.setRotationPoint(4.0F, (float) b0, 0.0F);
|
||||
this.spiderLeg7 = new ModelRenderer(this, 18, 0);
|
||||
this.spiderLeg7.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, f);
|
||||
this.spiderLeg7.setRotationPoint(-4.0F, (float) b0, -1.0F);
|
||||
this.spiderLeg8 = new ModelRenderer(this, 18, 0);
|
||||
this.spiderLeg8.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, f);
|
||||
this.spiderLeg8.setRotationPoint(4.0F, (float) b0, -1.0F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.spiderHead.render(f5);
|
||||
this.spiderNeck.render(f5);
|
||||
this.spiderBody.render(f5);
|
||||
this.spiderLeg1.render(f5);
|
||||
this.spiderLeg2.render(f5);
|
||||
this.spiderLeg3.render(f5);
|
||||
this.spiderLeg4.render(f5);
|
||||
this.spiderLeg5.render(f5);
|
||||
this.spiderLeg6.render(f5);
|
||||
this.spiderLeg7.render(f5);
|
||||
this.spiderLeg8.render(f5);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float var3, float f2, float f3, float var6, Entity var7) {
|
||||
this.spiderHead.rotateAngleY = f2 / 57.295776F;
|
||||
this.spiderHead.rotateAngleX = f3 / 57.295776F;
|
||||
float f4 = 0.7853982F;
|
||||
this.spiderLeg1.rotateAngleZ = -f4;
|
||||
this.spiderLeg2.rotateAngleZ = f4;
|
||||
this.spiderLeg3.rotateAngleZ = -f4 * 0.74F;
|
||||
this.spiderLeg4.rotateAngleZ = f4 * 0.74F;
|
||||
this.spiderLeg5.rotateAngleZ = -f4 * 0.74F;
|
||||
this.spiderLeg6.rotateAngleZ = f4 * 0.74F;
|
||||
this.spiderLeg7.rotateAngleZ = -f4;
|
||||
this.spiderLeg8.rotateAngleZ = f4;
|
||||
float f5 = 0.0F;
|
||||
float f6 = 0.3926991F;
|
||||
this.spiderLeg1.rotateAngleY = f6 * 2.0F + f5;
|
||||
this.spiderLeg2.rotateAngleY = -f6 * 2.0F - f5;
|
||||
this.spiderLeg3.rotateAngleY = f6 * 1.0F + f5;
|
||||
this.spiderLeg4.rotateAngleY = -f6 * 1.0F - f5;
|
||||
this.spiderLeg5.rotateAngleY = -f6 * 1.0F + f5;
|
||||
this.spiderLeg6.rotateAngleY = f6 * 1.0F - f5;
|
||||
this.spiderLeg7.rotateAngleY = -f6 * 2.0F + f5;
|
||||
this.spiderLeg8.rotateAngleY = f6 * 2.0F - f5;
|
||||
float f7 = -(MathHelper.cos(f * 0.6662F * 2.0F + 0.0F) * 0.4F) * f1;
|
||||
float f8 = -(MathHelper.cos(f * 0.6662F * 2.0F + 3.1415927F) * 0.4F) * f1;
|
||||
float f9 = -(MathHelper.cos(f * 0.6662F * 2.0F + 1.5707964F) * 0.4F) * f1;
|
||||
float f10 = -(MathHelper.cos(f * 0.6662F * 2.0F + 4.712389F) * 0.4F) * f1;
|
||||
float f11 = Math.abs(MathHelper.sin(f * 0.6662F + 0.0F) * 0.4F) * f1;
|
||||
float f12 = Math.abs(MathHelper.sin(f * 0.6662F + 3.1415927F) * 0.4F) * f1;
|
||||
float f13 = Math.abs(MathHelper.sin(f * 0.6662F + 1.5707964F) * 0.4F) * f1;
|
||||
float f14 = Math.abs(MathHelper.sin(f * 0.6662F + 4.712389F) * 0.4F) * f1;
|
||||
this.spiderLeg1.rotateAngleY += f7;
|
||||
this.spiderLeg2.rotateAngleY += -f7;
|
||||
this.spiderLeg3.rotateAngleY += f8;
|
||||
this.spiderLeg4.rotateAngleY += -f8;
|
||||
this.spiderLeg5.rotateAngleY += f9;
|
||||
this.spiderLeg6.rotateAngleY += -f9;
|
||||
this.spiderLeg7.rotateAngleY += f10;
|
||||
this.spiderLeg8.rotateAngleY += -f10;
|
||||
this.spiderLeg1.rotateAngleZ += f11;
|
||||
this.spiderLeg2.rotateAngleZ += -f11;
|
||||
this.spiderLeg3.rotateAngleZ += f12;
|
||||
this.spiderLeg4.rotateAngleZ += -f12;
|
||||
this.spiderLeg5.rotateAngleZ += f13;
|
||||
this.spiderLeg6.rotateAngleZ += -f13;
|
||||
this.spiderLeg7.rotateAngleZ += f14;
|
||||
this.spiderLeg8.rotateAngleZ += -f14;
|
||||
}
|
||||
}
|
||||
77
src/main/java/net/minecraft/client/model/ModelSquid.java
Executable file
77
src/main/java/net/minecraft/client/model/ModelSquid.java
Executable file
@@ -0,0 +1,77 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelSquid extends ModelBase {
|
||||
ModelRenderer squidBody;
|
||||
ModelRenderer[] squidTentacles = new ModelRenderer[8];
|
||||
|
||||
public ModelSquid() {
|
||||
byte b0 = -16;
|
||||
this.squidBody = new ModelRenderer(this, 0, 0);
|
||||
this.squidBody.addBox(-6.0F, -8.0F, -6.0F, 12, 16, 12);
|
||||
this.squidBody.rotationPointY += (float) (24 + b0);
|
||||
|
||||
for (int i = 0; i < this.squidTentacles.length; ++i) {
|
||||
this.squidTentacles[i] = new ModelRenderer(this, 48, 0);
|
||||
double d0 = (double) i * 3.141592653589793D * 2.0D / (double) this.squidTentacles.length;
|
||||
float f = (float) Math.cos(d0) * 5.0F;
|
||||
float f1 = (float) Math.sin(d0) * 5.0F;
|
||||
this.squidTentacles[i].addBox(-1.0F, 0.0F, -1.0F, 2, 18, 2);
|
||||
this.squidTentacles[i].rotationPointX = f;
|
||||
this.squidTentacles[i].rotationPointZ = f1;
|
||||
this.squidTentacles[i].rotationPointY = (float) (31 + b0);
|
||||
d0 = (double) i * 3.141592653589793D * -2.0D / (double) this.squidTentacles.length + 1.5707963267948966D;
|
||||
this.squidTentacles[i].rotateAngleY = (float) d0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float var1, float var2, float f, float var4, float var5, float var6, Entity var7) {
|
||||
for (ModelRenderer modelrenderer : this.squidTentacles) {
|
||||
modelrenderer.rotateAngleX = f;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.squidBody.render(f5);
|
||||
|
||||
for (int i = 0; i < this.squidTentacles.length; ++i) {
|
||||
this.squidTentacles[i].render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
95
src/main/java/net/minecraft/client/model/ModelVillager.java
Executable file
95
src/main/java/net/minecraft/client/model/ModelVillager.java
Executable file
@@ -0,0 +1,95 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelVillager extends ModelBase {
|
||||
public ModelRenderer villagerHead;
|
||||
public ModelRenderer villagerBody;
|
||||
public ModelRenderer villagerArms;
|
||||
public ModelRenderer rightVillagerLeg;
|
||||
public ModelRenderer leftVillagerLeg;
|
||||
public ModelRenderer villagerNose;
|
||||
|
||||
public ModelVillager(float parFloat1) {
|
||||
this(parFloat1, 0.0F, 64, 64);
|
||||
}
|
||||
|
||||
public ModelVillager(float parFloat1, float parFloat2, int parInt1, int parInt2) {
|
||||
this.villagerHead = (new ModelRenderer(this)).setTextureSize(parInt1, parInt2);
|
||||
this.villagerHead.setRotationPoint(0.0F, 0.0F + parFloat2, 0.0F);
|
||||
this.villagerHead.setTextureOffset(0, 0).addBox(-4.0F, -10.0F, -4.0F, 8, 10, 8, parFloat1);
|
||||
this.villagerNose = (new ModelRenderer(this)).setTextureSize(parInt1, parInt2);
|
||||
this.villagerNose.setRotationPoint(0.0F, parFloat2 - 2.0F, 0.0F);
|
||||
this.villagerNose.setTextureOffset(24, 0).addBox(-1.0F, -1.0F, -6.0F, 2, 4, 2, parFloat1);
|
||||
this.villagerHead.addChild(this.villagerNose);
|
||||
this.villagerBody = (new ModelRenderer(this)).setTextureSize(parInt1, parInt2);
|
||||
this.villagerBody.setRotationPoint(0.0F, 0.0F + parFloat2, 0.0F);
|
||||
this.villagerBody.setTextureOffset(16, 20).addBox(-4.0F, 0.0F, -3.0F, 8, 12, 6, parFloat1);
|
||||
this.villagerBody.setTextureOffset(0, 38).addBox(-4.0F, 0.0F, -3.0F, 8, 18, 6, parFloat1 + 0.5F);
|
||||
this.villagerArms = (new ModelRenderer(this)).setTextureSize(parInt1, parInt2);
|
||||
this.villagerArms.setRotationPoint(0.0F, 0.0F + parFloat2 + 2.0F, 0.0F);
|
||||
this.villagerArms.setTextureOffset(44, 22).addBox(-8.0F, -2.0F, -2.0F, 4, 8, 4, parFloat1);
|
||||
this.villagerArms.setTextureOffset(44, 22).addBox(4.0F, -2.0F, -2.0F, 4, 8, 4, parFloat1);
|
||||
this.villagerArms.setTextureOffset(40, 38).addBox(-4.0F, 2.0F, -2.0F, 8, 4, 4, parFloat1);
|
||||
this.rightVillagerLeg = (new ModelRenderer(this, 0, 22)).setTextureSize(parInt1, parInt2);
|
||||
this.rightVillagerLeg.setRotationPoint(-2.0F, 12.0F + parFloat2, 0.0F);
|
||||
this.rightVillagerLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, parFloat1);
|
||||
this.leftVillagerLeg = (new ModelRenderer(this, 0, 22)).setTextureSize(parInt1, parInt2);
|
||||
this.leftVillagerLeg.mirror = true;
|
||||
this.leftVillagerLeg.setRotationPoint(2.0F, 12.0F + parFloat2, 0.0F);
|
||||
this.leftVillagerLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, parFloat1);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.villagerHead.render(f5);
|
||||
this.villagerBody.render(f5);
|
||||
this.rightVillagerLeg.render(f5);
|
||||
this.leftVillagerLeg.render(f5);
|
||||
this.villagerArms.render(f5);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float var3, float f2, float f3, float var6, Entity var7) {
|
||||
this.villagerHead.rotateAngleY = f2 / 57.295776F;
|
||||
this.villagerHead.rotateAngleX = f3 / 57.295776F;
|
||||
this.villagerArms.rotationPointY = 3.0F;
|
||||
this.villagerArms.rotationPointZ = -1.0F;
|
||||
this.villagerArms.rotateAngleX = -0.75F;
|
||||
this.rightVillagerLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1 * 0.5F;
|
||||
this.leftVillagerLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.4F * f1 * 0.5F;
|
||||
this.rightVillagerLeg.rotateAngleY = 0.0F;
|
||||
this.leftVillagerLeg.rotateAngleY = 0.0F;
|
||||
}
|
||||
}
|
||||
81
src/main/java/net/minecraft/client/model/ModelWitch.java
Executable file
81
src/main/java/net/minecraft/client/model/ModelWitch.java
Executable file
@@ -0,0 +1,81 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelWitch extends ModelVillager {
|
||||
public boolean field_82900_g;
|
||||
private ModelRenderer field_82901_h = (new ModelRenderer(this)).setTextureSize(64, 128);
|
||||
private ModelRenderer witchHat;
|
||||
|
||||
public ModelWitch(float parFloat1) {
|
||||
super(parFloat1, 0.0F, 64, 128);
|
||||
this.field_82901_h.setRotationPoint(0.0F, -2.0F, 0.0F);
|
||||
this.field_82901_h.setTextureOffset(0, 0).addBox(0.0F, 3.0F, -6.75F, 1, 1, 1, -0.25F);
|
||||
this.villagerNose.addChild(this.field_82901_h);
|
||||
this.witchHat = (new ModelRenderer(this)).setTextureSize(64, 128);
|
||||
this.witchHat.setRotationPoint(-5.0F, -10.03125F, -5.0F);
|
||||
this.witchHat.setTextureOffset(0, 64).addBox(0.0F, 0.0F, 0.0F, 10, 2, 10);
|
||||
this.villagerHead.addChild(this.witchHat);
|
||||
ModelRenderer modelrenderer = (new ModelRenderer(this)).setTextureSize(64, 128);
|
||||
modelrenderer.setRotationPoint(1.75F, -4.0F, 2.0F);
|
||||
modelrenderer.setTextureOffset(0, 76).addBox(0.0F, 0.0F, 0.0F, 7, 4, 7);
|
||||
modelrenderer.rotateAngleX = -0.05235988F;
|
||||
modelrenderer.rotateAngleZ = 0.02617994F;
|
||||
this.witchHat.addChild(modelrenderer);
|
||||
ModelRenderer modelrenderer1 = (new ModelRenderer(this)).setTextureSize(64, 128);
|
||||
modelrenderer1.setRotationPoint(1.75F, -4.0F, 2.0F);
|
||||
modelrenderer1.setTextureOffset(0, 87).addBox(0.0F, 0.0F, 0.0F, 4, 4, 4);
|
||||
modelrenderer1.rotateAngleX = -0.10471976F;
|
||||
modelrenderer1.rotateAngleZ = 0.05235988F;
|
||||
modelrenderer.addChild(modelrenderer1);
|
||||
ModelRenderer modelrenderer2 = (new ModelRenderer(this)).setTextureSize(64, 128);
|
||||
modelrenderer2.setRotationPoint(1.75F, -2.0F, 2.0F);
|
||||
modelrenderer2.setTextureOffset(0, 95).addBox(0.0F, 0.0F, 0.0F, 1, 2, 1, 0.25F);
|
||||
modelrenderer2.rotateAngleX = -0.20943952F;
|
||||
modelrenderer2.rotateAngleZ = 0.10471976F;
|
||||
modelrenderer1.addChild(modelrenderer2);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.villagerNose.offsetX = this.villagerNose.offsetY = this.villagerNose.offsetZ = 0.0F;
|
||||
float f6 = 0.01F * (float) (entity.getEntityId() % 10);
|
||||
this.villagerNose.rotateAngleX = MathHelper.sin((float) entity.ticksExisted * f6) * 4.5F * 3.1415927F / 180.0F;
|
||||
this.villagerNose.rotateAngleY = 0.0F;
|
||||
this.villagerNose.rotateAngleZ = MathHelper.cos((float) entity.ticksExisted * f6) * 2.5F * 3.1415927F / 180.0F;
|
||||
if (this.field_82900_g) {
|
||||
this.villagerNose.rotateAngleX = -0.9F;
|
||||
this.villagerNose.offsetZ = -0.09375F;
|
||||
this.villagerNose.offsetY = 0.1875F;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
108
src/main/java/net/minecraft/client/model/ModelWither.java
Executable file
108
src/main/java/net/minecraft/client/model/ModelWither.java
Executable file
@@ -0,0 +1,108 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.boss.EntityWither;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelWither extends ModelBase {
|
||||
private ModelRenderer[] field_82905_a;
|
||||
private ModelRenderer[] field_82904_b;
|
||||
|
||||
public ModelWither(float parFloat1) {
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 64;
|
||||
this.field_82905_a = new ModelRenderer[3];
|
||||
this.field_82905_a[0] = new ModelRenderer(this, 0, 16);
|
||||
this.field_82905_a[0].addBox(-10.0F, 3.9F, -0.5F, 20, 3, 3, parFloat1);
|
||||
this.field_82905_a[1] = (new ModelRenderer(this)).setTextureSize(this.textureWidth, this.textureHeight);
|
||||
this.field_82905_a[1].setRotationPoint(-2.0F, 6.9F, -0.5F);
|
||||
this.field_82905_a[1].setTextureOffset(0, 22).addBox(0.0F, 0.0F, 0.0F, 3, 10, 3, parFloat1);
|
||||
this.field_82905_a[1].setTextureOffset(24, 22).addBox(-4.0F, 1.5F, 0.5F, 11, 2, 2, parFloat1);
|
||||
this.field_82905_a[1].setTextureOffset(24, 22).addBox(-4.0F, 4.0F, 0.5F, 11, 2, 2, parFloat1);
|
||||
this.field_82905_a[1].setTextureOffset(24, 22).addBox(-4.0F, 6.5F, 0.5F, 11, 2, 2, parFloat1);
|
||||
this.field_82905_a[2] = new ModelRenderer(this, 12, 22);
|
||||
this.field_82905_a[2].addBox(0.0F, 0.0F, 0.0F, 3, 6, 3, parFloat1);
|
||||
this.field_82904_b = new ModelRenderer[3];
|
||||
this.field_82904_b[0] = new ModelRenderer(this, 0, 0);
|
||||
this.field_82904_b[0].addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8, parFloat1);
|
||||
this.field_82904_b[1] = new ModelRenderer(this, 32, 0);
|
||||
this.field_82904_b[1].addBox(-4.0F, -4.0F, -4.0F, 6, 6, 6, parFloat1);
|
||||
this.field_82904_b[1].rotationPointX = -8.0F;
|
||||
this.field_82904_b[1].rotationPointY = 4.0F;
|
||||
this.field_82904_b[2] = new ModelRenderer(this, 32, 0);
|
||||
this.field_82904_b[2].addBox(-4.0F, -4.0F, -4.0F, 6, 6, 6, parFloat1);
|
||||
this.field_82904_b[2].rotationPointX = 10.0F;
|
||||
this.field_82904_b[2].rotationPointY = 4.0F;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
for (ModelRenderer modelrenderer : this.field_82904_b) {
|
||||
modelrenderer.render(f5);
|
||||
}
|
||||
|
||||
for (ModelRenderer modelrenderer1 : this.field_82905_a) {
|
||||
modelrenderer1.render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float var1, float var2, float f, float f1, float f2, float var6, Entity var7) {
|
||||
float f3 = MathHelper.cos(f * 0.1F);
|
||||
this.field_82905_a[1].rotateAngleX = (0.065F + 0.05F * f3) * 3.1415927F;
|
||||
this.field_82905_a[2].setRotationPoint(-2.0F, 6.9F + MathHelper.cos(this.field_82905_a[1].rotateAngleX) * 10.0F,
|
||||
-0.5F + MathHelper.sin(this.field_82905_a[1].rotateAngleX) * 10.0F);
|
||||
this.field_82905_a[2].rotateAngleX = (0.265F + 0.1F * f3) * 3.1415927F;
|
||||
this.field_82904_b[0].rotateAngleY = f1 / 57.295776F;
|
||||
this.field_82904_b[0].rotateAngleX = f2 / 57.295776F;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbase, float var2, float var3, float var4) {
|
||||
EntityWither entitywither = (EntityWither) entitylivingbase;
|
||||
|
||||
for (int i = 1; i < 3; ++i) {
|
||||
this.field_82904_b[i].rotateAngleY = (entitywither.func_82207_a(i - 1) - entitylivingbase.renderYawOffset)
|
||||
/ 57.295776F;
|
||||
this.field_82904_b[i].rotateAngleX = entitywither.func_82210_r(i - 1) / 57.295776F;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
171
src/main/java/net/minecraft/client/model/ModelWolf.java
Executable file
171
src/main/java/net/minecraft/client/model/ModelWolf.java
Executable file
@@ -0,0 +1,171 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelWolf extends ModelBase {
|
||||
public ModelRenderer wolfHeadMain;
|
||||
public ModelRenderer wolfBody;
|
||||
public ModelRenderer wolfLeg1;
|
||||
public ModelRenderer wolfLeg2;
|
||||
public ModelRenderer wolfLeg3;
|
||||
public ModelRenderer wolfLeg4;
|
||||
ModelRenderer wolfTail;
|
||||
ModelRenderer wolfMane;
|
||||
|
||||
public ModelWolf() {
|
||||
float f = 0.0F;
|
||||
float f1 = 13.5F;
|
||||
this.wolfHeadMain = new ModelRenderer(this, 0, 0);
|
||||
this.wolfHeadMain.addBox(-3.0F, -3.0F, -2.0F, 6, 6, 4, f);
|
||||
this.wolfHeadMain.setRotationPoint(-1.0F, f1, -7.0F);
|
||||
this.wolfBody = new ModelRenderer(this, 18, 14);
|
||||
this.wolfBody.addBox(-4.0F, -2.0F, -3.0F, 6, 9, 6, f);
|
||||
this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
|
||||
this.wolfMane = new ModelRenderer(this, 21, 0);
|
||||
this.wolfMane.addBox(-4.0F, -3.0F, -3.0F, 8, 6, 7, f);
|
||||
this.wolfMane.setRotationPoint(-1.0F, 14.0F, 2.0F);
|
||||
this.wolfLeg1 = new ModelRenderer(this, 0, 18);
|
||||
this.wolfLeg1.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f);
|
||||
this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
|
||||
this.wolfLeg2 = new ModelRenderer(this, 0, 18);
|
||||
this.wolfLeg2.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f);
|
||||
this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
|
||||
this.wolfLeg3 = new ModelRenderer(this, 0, 18);
|
||||
this.wolfLeg3.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f);
|
||||
this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
|
||||
this.wolfLeg4 = new ModelRenderer(this, 0, 18);
|
||||
this.wolfLeg4.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f);
|
||||
this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
|
||||
this.wolfTail = new ModelRenderer(this, 9, 18);
|
||||
this.wolfTail.addBox(-1.0F, 0.0F, -1.0F, 2, 8, 2, f);
|
||||
this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
|
||||
this.wolfHeadMain.setTextureOffset(16, 14).addBox(-3.0F, -5.0F, 0.0F, 2, 2, 1, f);
|
||||
this.wolfHeadMain.setTextureOffset(16, 14).addBox(1.0F, -5.0F, 0.0F, 2, 2, 1, f);
|
||||
this.wolfHeadMain.setTextureOffset(0, 10).addBox(-1.5F, 0.0F, -5.0F, 3, 3, 4, f);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the models various rotation angles then renders the
|
||||
* model.
|
||||
*/
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
if (this.isChild) {
|
||||
float f6 = 2.0F;
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.0F, 5.0F * f5, 2.0F * f5);
|
||||
this.wolfHeadMain.renderWithRotation(f5);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(1.0F / f6, 1.0F / f6, 1.0F / f6);
|
||||
GlStateManager.translate(0.0F, 24.0F * f5, 0.0F);
|
||||
this.wolfBody.render(f5);
|
||||
this.wolfLeg1.render(f5);
|
||||
this.wolfLeg2.render(f5);
|
||||
this.wolfLeg3.render(f5);
|
||||
this.wolfLeg4.render(f5);
|
||||
this.wolfTail.renderWithRotation(f5);
|
||||
this.wolfMane.render(f5);
|
||||
GlStateManager.popMatrix();
|
||||
} else {
|
||||
this.wolfHeadMain.renderWithRotation(f5);
|
||||
this.wolfBody.render(f5);
|
||||
this.wolfLeg1.render(f5);
|
||||
this.wolfLeg2.render(f5);
|
||||
this.wolfLeg3.render(f5);
|
||||
this.wolfLeg4.render(f5);
|
||||
this.wolfTail.renderWithRotation(f5);
|
||||
this.wolfMane.render(f5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Used for easily adding entity-dependent animations. The
|
||||
* second and third float params here are the same second and
|
||||
* third as in the setRotationAngles method.
|
||||
*/
|
||||
public void setLivingAnimations(EntityLivingBase entitylivingbase, float f, float f1, float f2) {
|
||||
EntityWolf entitywolf = (EntityWolf) entitylivingbase;
|
||||
if (entitywolf.isAngry()) {
|
||||
this.wolfTail.rotateAngleY = 0.0F;
|
||||
} else {
|
||||
this.wolfTail.rotateAngleY = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
}
|
||||
|
||||
if (entitywolf.isSitting()) {
|
||||
this.wolfMane.setRotationPoint(-1.0F, 16.0F, -3.0F);
|
||||
this.wolfMane.rotateAngleX = 1.2566371F;
|
||||
this.wolfMane.rotateAngleY = 0.0F;
|
||||
this.wolfBody.setRotationPoint(0.0F, 18.0F, 0.0F);
|
||||
this.wolfBody.rotateAngleX = 0.7853982F;
|
||||
this.wolfTail.setRotationPoint(-1.0F, 21.0F, 6.0F);
|
||||
this.wolfLeg1.setRotationPoint(-2.5F, 22.0F, 2.0F);
|
||||
this.wolfLeg1.rotateAngleX = 4.712389F;
|
||||
this.wolfLeg2.setRotationPoint(0.5F, 22.0F, 2.0F);
|
||||
this.wolfLeg2.rotateAngleX = 4.712389F;
|
||||
this.wolfLeg3.rotateAngleX = 5.811947F;
|
||||
this.wolfLeg3.setRotationPoint(-2.49F, 17.0F, -4.0F);
|
||||
this.wolfLeg4.rotateAngleX = 5.811947F;
|
||||
this.wolfLeg4.setRotationPoint(0.51F, 17.0F, -4.0F);
|
||||
} else {
|
||||
this.wolfBody.setRotationPoint(0.0F, 14.0F, 2.0F);
|
||||
this.wolfBody.rotateAngleX = 1.5707964F;
|
||||
this.wolfMane.setRotationPoint(-1.0F, 14.0F, -3.0F);
|
||||
this.wolfMane.rotateAngleX = this.wolfBody.rotateAngleX;
|
||||
this.wolfTail.setRotationPoint(-1.0F, 12.0F, 8.0F);
|
||||
this.wolfLeg1.setRotationPoint(-2.5F, 16.0F, 7.0F);
|
||||
this.wolfLeg2.setRotationPoint(0.5F, 16.0F, 7.0F);
|
||||
this.wolfLeg3.setRotationPoint(-2.5F, 16.0F, -4.0F);
|
||||
this.wolfLeg4.setRotationPoint(0.5F, 16.0F, -4.0F);
|
||||
this.wolfLeg1.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.wolfLeg2.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.4F * f1;
|
||||
this.wolfLeg3.rotateAngleX = MathHelper.cos(f * 0.6662F + 3.1415927F) * 1.4F * f1;
|
||||
this.wolfLeg4.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
}
|
||||
|
||||
this.wolfHeadMain.rotateAngleZ = entitywolf.getInterestedAngle(f2) + entitywolf.getShakeAngle(f2, 0.0F);
|
||||
this.wolfMane.rotateAngleZ = entitywolf.getShakeAngle(f2, -0.08F);
|
||||
this.wolfBody.rotateAngleZ = entitywolf.getShakeAngle(f2, -0.16F);
|
||||
this.wolfTail.rotateAngleZ = entitywolf.getShakeAngle(f2, -0.2F);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.wolfHeadMain.rotateAngleX = f4 / 57.295776F;
|
||||
this.wolfHeadMain.rotateAngleY = f3 / 57.295776F;
|
||||
this.wolfTail.rotateAngleX = f2;
|
||||
}
|
||||
}
|
||||
63
src/main/java/net/minecraft/client/model/ModelZombie.java
Executable file
63
src/main/java/net/minecraft/client/model/ModelZombie.java
Executable file
@@ -0,0 +1,63 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelZombie extends ModelBiped {
|
||||
public ModelZombie() {
|
||||
this(0.0F, true);
|
||||
}
|
||||
|
||||
protected ModelZombie(float modelSize, float parFloat1, int textureWidthIn, int textureHeightIn) {
|
||||
super(modelSize, parFloat1, textureWidthIn, textureHeightIn);
|
||||
}
|
||||
|
||||
public ModelZombie(float modelSize, boolean parFlag) {
|
||||
super(modelSize, 0.0F, 64, parFlag ? 64 : 32);
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
float f6 = MathHelper.sin(this.swingProgress * 3.1415927F);
|
||||
float f7 = MathHelper.sin((1.0F - (1.0F - this.swingProgress) * (1.0F - this.swingProgress)) * 3.1415927F);
|
||||
this.bipedRightArm.rotateAngleZ = 0.0F;
|
||||
this.bipedLeftArm.rotateAngleZ = 0.0F;
|
||||
this.bipedRightArm.rotateAngleY = -(0.1F - f6 * 0.6F);
|
||||
this.bipedLeftArm.rotateAngleY = 0.1F - f6 * 0.6F;
|
||||
this.bipedRightArm.rotateAngleX = -1.5707964F;
|
||||
this.bipedLeftArm.rotateAngleX = -1.5707964F;
|
||||
this.bipedRightArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;
|
||||
this.bipedLeftArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;
|
||||
this.bipedRightArm.rotateAngleZ += MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedRightArm.rotateAngleX += MathHelper.sin(f2 * 0.067F) * 0.05F;
|
||||
this.bipedLeftArm.rotateAngleX -= MathHelper.sin(f2 * 0.067F) * 0.05F;
|
||||
}
|
||||
}
|
||||
70
src/main/java/net/minecraft/client/model/ModelZombieVillager.java
Executable file
70
src/main/java/net/minecraft/client/model/ModelZombieVillager.java
Executable file
@@ -0,0 +1,70 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class ModelZombieVillager extends ModelBiped {
|
||||
public ModelZombieVillager() {
|
||||
this(0.0F, 0.0F, false);
|
||||
}
|
||||
|
||||
public ModelZombieVillager(float parFloat1, float parFloat2, boolean parFlag) {
|
||||
super(parFloat1, 0.0F, 64, parFlag ? 32 : 64);
|
||||
if (parFlag) {
|
||||
this.bipedHead = new ModelRenderer(this, 0, 0);
|
||||
this.bipedHead.addBox(-4.0F, -10.0F, -4.0F, 8, 8, 8, parFloat1);
|
||||
this.bipedHead.setRotationPoint(0.0F, 0.0F + parFloat2, 0.0F);
|
||||
} else {
|
||||
this.bipedHead = new ModelRenderer(this);
|
||||
this.bipedHead.setRotationPoint(0.0F, 0.0F + parFloat2, 0.0F);
|
||||
this.bipedHead.setTextureOffset(0, 32).addBox(-4.0F, -10.0F, -4.0F, 8, 10, 8, parFloat1);
|
||||
this.bipedHead.setTextureOffset(24, 32).addBox(-1.0F, -3.0F, -6.0F, 2, 4, 2, parFloat1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
* Sets the model's various rotation angles. For bipeds, par1
|
||||
* and par2 are used for animating the movement of arms and
|
||||
* legs, where par1 represents the time(so that arms and legs
|
||||
* swing back and forth) and par2 represents how "far" arms and
|
||||
* legs can swing at most.
|
||||
*/
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
float f6 = MathHelper.sin(this.swingProgress * 3.1415927F);
|
||||
float f7 = MathHelper.sin((1.0F - (1.0F - this.swingProgress) * (1.0F - this.swingProgress)) * 3.1415927F);
|
||||
this.bipedRightArm.rotateAngleZ = 0.0F;
|
||||
this.bipedLeftArm.rotateAngleZ = 0.0F;
|
||||
this.bipedRightArm.rotateAngleY = -(0.1F - f6 * 0.6F);
|
||||
this.bipedLeftArm.rotateAngleY = 0.1F - f6 * 0.6F;
|
||||
this.bipedRightArm.rotateAngleX = -1.5707964F;
|
||||
this.bipedLeftArm.rotateAngleX = -1.5707964F;
|
||||
this.bipedRightArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;
|
||||
this.bipedLeftArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;
|
||||
this.bipedRightArm.rotateAngleZ += MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F;
|
||||
this.bipedRightArm.rotateAngleX += MathHelper.sin(f2 * 0.067F) * 0.05F;
|
||||
this.bipedLeftArm.rotateAngleX -= MathHelper.sin(f2 * 0.067F) * 0.05F;
|
||||
}
|
||||
}
|
||||
50
src/main/java/net/minecraft/client/model/PositionTextureVertex.java
Executable file
50
src/main/java/net/minecraft/client/model/PositionTextureVertex.java
Executable file
@@ -0,0 +1,50 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class PositionTextureVertex {
|
||||
public Vec3 vector3D;
|
||||
public float texturePositionX;
|
||||
public float texturePositionY;
|
||||
|
||||
public PositionTextureVertex(float parFloat1, float parFloat2, float parFloat3, float parFloat4, float parFloat5) {
|
||||
this(new Vec3((double) parFloat1, (double) parFloat2, (double) parFloat3), parFloat4, parFloat5);
|
||||
}
|
||||
|
||||
public PositionTextureVertex setTexturePosition(float parFloat1, float parFloat2) {
|
||||
return new PositionTextureVertex(this, parFloat1, parFloat2);
|
||||
}
|
||||
|
||||
public PositionTextureVertex(PositionTextureVertex textureVertex, float texturePositionXIn,
|
||||
float texturePositionYIn) {
|
||||
this.vector3D = textureVertex.vector3D;
|
||||
this.texturePositionX = texturePositionXIn;
|
||||
this.texturePositionY = texturePositionYIn;
|
||||
}
|
||||
|
||||
public PositionTextureVertex(Vec3 vector3DIn, float texturePositionXIn, float texturePositionYIn) {
|
||||
this.vector3D = vector3DIn;
|
||||
this.texturePositionX = texturePositionXIn;
|
||||
this.texturePositionY = texturePositionYIn;
|
||||
}
|
||||
}
|
||||
31
src/main/java/net/minecraft/client/model/TextureOffset.java
Executable file
31
src/main/java/net/minecraft/client/model/TextureOffset.java
Executable file
@@ -0,0 +1,31 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class TextureOffset {
|
||||
public final int textureOffsetX;
|
||||
public final int textureOffsetY;
|
||||
|
||||
public TextureOffset(int textureOffsetXIn, int textureOffsetYIn) {
|
||||
this.textureOffsetX = textureOffsetXIn;
|
||||
this.textureOffsetY = textureOffsetYIn;
|
||||
}
|
||||
}
|
||||
95
src/main/java/net/minecraft/client/model/TexturedQuad.java
Executable file
95
src/main/java/net/minecraft/client/model/TexturedQuad.java
Executable file
@@ -0,0 +1,95 @@
|
||||
package net.minecraft.client.model;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
/**+
|
||||
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
|
||||
*
|
||||
* Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!"
|
||||
* Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team
|
||||
*
|
||||
* EaglercraftX 1.8 patch files (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
public class TexturedQuad {
|
||||
public PositionTextureVertex[] vertexPositions;
|
||||
public int nVertices;
|
||||
private boolean invertNormal;
|
||||
|
||||
public TexturedQuad(PositionTextureVertex[] vertices) {
|
||||
this.vertexPositions = vertices;
|
||||
this.nVertices = vertices.length;
|
||||
}
|
||||
|
||||
public TexturedQuad(PositionTextureVertex[] vertices, int texcoordU1, int texcoordV1, int texcoordU2,
|
||||
int texcoordV2, float textureWidth, float textureHeight) {
|
||||
this(vertices);
|
||||
float f = 0.0F / textureWidth;
|
||||
float f1 = 0.0F / textureHeight;
|
||||
vertices[0] = vertices[0].setTexturePosition((float) texcoordU2 / textureWidth - f,
|
||||
(float) texcoordV1 / textureHeight + f1);
|
||||
vertices[1] = vertices[1].setTexturePosition((float) texcoordU1 / textureWidth + f,
|
||||
(float) texcoordV1 / textureHeight + f1);
|
||||
vertices[2] = vertices[2].setTexturePosition((float) texcoordU1 / textureWidth + f,
|
||||
(float) texcoordV2 / textureHeight - f1);
|
||||
vertices[3] = vertices[3].setTexturePosition((float) texcoordU2 / textureWidth - f,
|
||||
(float) texcoordV2 / textureHeight - f1);
|
||||
}
|
||||
|
||||
public void flipFace() {
|
||||
PositionTextureVertex[] apositiontexturevertex = new PositionTextureVertex[this.vertexPositions.length];
|
||||
|
||||
for (int i = 0; i < this.vertexPositions.length; ++i) {
|
||||
apositiontexturevertex[i] = this.vertexPositions[this.vertexPositions.length - i - 1];
|
||||
}
|
||||
|
||||
this.vertexPositions = apositiontexturevertex;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Draw this primitve. This is typically called only once as the
|
||||
* generated drawing instructions are saved by the renderer and
|
||||
* reused later.
|
||||
*/
|
||||
public void draw(WorldRenderer renderer, float scale) {
|
||||
Vec3 vec3 = this.vertexPositions[1].vector3D.subtractReverse(this.vertexPositions[0].vector3D);
|
||||
Vec3 vec31 = this.vertexPositions[1].vector3D.subtractReverse(this.vertexPositions[2].vector3D);
|
||||
Vec3 vec32 = vec31.crossProduct(vec3).normalize();
|
||||
float f = (float) vec32.xCoord;
|
||||
float f1 = (float) vec32.yCoord;
|
||||
float f2 = (float) vec32.zCoord;
|
||||
if (this.invertNormal) {
|
||||
f = -f;
|
||||
f1 = -f1;
|
||||
f2 = -f2;
|
||||
}
|
||||
|
||||
renderer.begin(7, DefaultVertexFormats.OLDMODEL_POSITION_TEX_NORMAL);
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
PositionTextureVertex positiontexturevertex = this.vertexPositions[i];
|
||||
renderer.pos(positiontexturevertex.vector3D.xCoord * (double) scale,
|
||||
positiontexturevertex.vector3D.yCoord * (double) scale,
|
||||
positiontexturevertex.vector3D.zCoord * (double) scale)
|
||||
.tex((double) positiontexturevertex.texturePositionX,
|
||||
(double) positiontexturevertex.texturePositionY)
|
||||
.normal(f, f1, f2).endVertex();
|
||||
}
|
||||
|
||||
Tessellator.getInstance().draw();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user