mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 13:09:53 +00:00
Fix JABBA-related issues with crafting station slots (#54)
* Fix shift-merging tools voiding items fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392> * Change 0-sized ItemStacks into null stacks in crafting station attached slots Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425> * Update buildscript * spotlessApply
This commit is contained in:
1 parent
18bfeaff32
commit
39be06c23b
571 files changed
+25959
-28223
No files matched your search
@@ -4,8 +4,7 @@ import net.minecraft.client.model.*;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class WingModel extends ModelBiped
|
||||
{
|
||||
public class WingModel extends ModelBiped {
|
||||
ModelRenderer WingBaseRight;
|
||||
ModelRenderer WingEdgeRight;
|
||||
ModelRenderer WingInsetRight;
|
||||
@@ -19,22 +18,21 @@ public class WingModel extends ModelBiped
|
||||
ModelRenderer WingFlangeLeft;
|
||||
ModelRenderer WingAuxLeft;
|
||||
|
||||
public WingModel()
|
||||
{
|
||||
public WingModel() {
|
||||
super(0.25f, 0, 64, 64);
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
//Right Wing
|
||||
// Right Wing
|
||||
WingBaseRight = new ModelRenderer(this, 0, 9);
|
||||
WingBaseRight.addBox(-0.5F, -1F, 0F, 1, 2, 10);
|
||||
WingBaseRight.setRotationPoint(-1F, 1F, 0F);
|
||||
setRotation(WingBaseRight, 0.5235988F, -0.5235988F, 0F);
|
||||
|
||||
WingEdgeRight = new ModelRenderer(this, 0, 21); //Texture position
|
||||
WingEdgeRight.addBox(0F, 0F, -2F, 1, 9, 2); //Offset, Size
|
||||
WingEdgeRight.setRotationPoint(-0.502F, -1F, 10F); //Negative x, y - 1, Position
|
||||
setRotation(WingEdgeRight, 0.5235988F, 0F, 0F); //Angle in radians
|
||||
WingEdgeRight = new ModelRenderer(this, 0, 21); // Texture position
|
||||
WingEdgeRight.addBox(0F, 0F, -2F, 1, 9, 2); // Offset, Size
|
||||
WingEdgeRight.setRotationPoint(-0.502F, -1F, 10F); // Negative x, y - 1, Position
|
||||
setRotation(WingEdgeRight, 0.5235988F, 0F, 0F); // Angle in radians
|
||||
|
||||
WingInsetRight = new ModelRenderer(this, 6, 21);
|
||||
WingInsetRight.addBox(0F, 0F, -1F, 1, 9, 2);
|
||||
@@ -62,7 +60,7 @@ public class WingModel extends ModelBiped
|
||||
WingBaseRight.addChild(WingFlangeRight);
|
||||
WingBaseRight.addChild(WingAuxRight);
|
||||
|
||||
//Left Wing
|
||||
// Left Wing
|
||||
WingBaseLeft = new ModelRenderer(this, 42, 9);
|
||||
WingBaseLeft.addBox(-0.5F, -1F, 0F, 1, 2, 10);
|
||||
WingBaseLeft.setRotationPoint(1F, 1F, 0F);
|
||||
@@ -109,26 +107,22 @@ public class WingModel extends ModelBiped
|
||||
this.bipedLeftLeg.isHidden = true;
|
||||
}
|
||||
|
||||
public void render (Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
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);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
WingBaseRight.render(f5);
|
||||
WingBaseLeft.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation (ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles (float f, float f1, float partialTick, float f3, float f4, float f5, Entity player)
|
||||
{
|
||||
public void setRotationAngles(float f, float f1, float partialTick, float f3, float f4, float f5, Entity player) {
|
||||
super.setRotationAngles(f, f1, partialTick, f3, f4, f5, player);
|
||||
if (this.isRiding)
|
||||
{
|
||||
if (this.isRiding) {
|
||||
float slow = 17f;
|
||||
this.WingBaseRight.rotateAngleX = MathHelper.sin(partialTick / slow) / 10f + 0.9F;
|
||||
this.WingBaseRight.rotateAngleY = MathHelper.sin(partialTick / slow) / 5.0f - 0.7f;
|
||||
@@ -137,9 +131,7 @@ public class WingModel extends ModelBiped
|
||||
this.WingBaseLeft.rotateAngleX = MathHelper.sin(partialTick / slow) / 10 + 0.9F;
|
||||
this.WingBaseLeft.rotateAngleY = -MathHelper.sin(partialTick / slow) / 5.0f + 0.7f;
|
||||
this.WingBaseLeft.rotateAngleZ = -MathHelper.sin(partialTick / slow) / 2.5f + 0.3f;
|
||||
}
|
||||
else if (player.isInWater())
|
||||
{
|
||||
} else if (player.isInWater()) {
|
||||
float slow = 17f;
|
||||
this.WingBaseRight.rotateAngleX = MathHelper.sin(partialTick / slow) / 15f + 0.5235988F;
|
||||
this.WingBaseRight.rotateAngleY = MathHelper.sin(partialTick / slow) / 15f - 0.8f;
|
||||
@@ -148,9 +140,7 @@ public class WingModel extends ModelBiped
|
||||
this.WingBaseLeft.rotateAngleX = MathHelper.sin(partialTick / slow) / 15f + 0.5235988F;
|
||||
this.WingBaseLeft.rotateAngleY = -MathHelper.sin(partialTick / slow) / 15f + 0.8f;
|
||||
this.WingBaseLeft.rotateAngleZ = -MathHelper.sin(partialTick / slow) / 15f + 0.8f;
|
||||
}
|
||||
else if (player.posY - player.prevPosY < 0f && player.fallDistance > 2.3)
|
||||
{
|
||||
} else if (player.posY - player.prevPosY < 0f && player.fallDistance > 2.3) {
|
||||
float slow = 20f;
|
||||
this.WingBaseRight.rotateAngleX = MathHelper.sin(partialTick / slow) / 15f + 0.7F;
|
||||
this.WingBaseRight.rotateAngleY = MathHelper.sin(partialTick / slow) / 15f - 0.8f;
|
||||
@@ -159,9 +149,7 @@ public class WingModel extends ModelBiped
|
||||
this.WingBaseLeft.rotateAngleX = MathHelper.sin(partialTick / slow) / 15f + 0.7F;
|
||||
this.WingBaseLeft.rotateAngleY = -MathHelper.sin(partialTick / slow) / 15f + 0.8f;
|
||||
this.WingBaseLeft.rotateAngleZ = -MathHelper.sin(partialTick / slow) / 15f + 0.3f;
|
||||
}
|
||||
else if (player.isSprinting() || this.onGround > 0)
|
||||
{
|
||||
} else if (player.isSprinting() || this.onGround > 0) {
|
||||
float slow = 1.73f;
|
||||
this.WingBaseRight.rotateAngleX = MathHelper.sin(partialTick / slow) / 15f + 0.5235988F;
|
||||
this.WingBaseRight.rotateAngleY = MathHelper.sin(partialTick / slow) / 15f - 0.6f;
|
||||
@@ -170,12 +158,9 @@ public class WingModel extends ModelBiped
|
||||
this.WingBaseLeft.rotateAngleX = MathHelper.sin(partialTick / slow) / 15f + 0.5235988F;
|
||||
this.WingBaseLeft.rotateAngleY = -MathHelper.sin(partialTick / slow) / 15f + 0.6f;
|
||||
this.WingBaseLeft.rotateAngleZ = -MathHelper.sin(partialTick / slow) / 15f + 0.3f;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
float slow = 17f;
|
||||
if (player.motionX != 0 || player.motionZ != 0)
|
||||
slow = 6f;
|
||||
if (player.motionX != 0 || player.motionZ != 0) slow = 6f;
|
||||
this.WingBaseRight.rotateAngleX = MathHelper.sin(partialTick / slow) / 5f + 0.5235988F;
|
||||
this.WingBaseRight.rotateAngleY = MathHelper.sin(partialTick / slow) / 3.0f - 0.6f;
|
||||
this.WingBaseRight.rotateAngleZ = MathHelper.sin(partialTick / slow) / 1.5f - 0.3f;
|
||||
@@ -185,11 +170,9 @@ public class WingModel extends ModelBiped
|
||||
this.WingBaseLeft.rotateAngleZ = -MathHelper.sin(partialTick / slow) / 1.5f + 0.3f;
|
||||
}
|
||||
|
||||
if (this.isSneak)
|
||||
{
|
||||
if (this.isSneak) {
|
||||
this.WingBaseRight.rotateAngleX += 0.4f;
|
||||
this.WingBaseLeft.rotateAngleX += 0.4f;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user