mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-18 19:39:12 +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
@@ -11,46 +11,35 @@ import tconstruct.world.entity.KingBlueSlime;
|
||||
import tconstruct.world.entity.SlimeBase;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class SlimeRender extends RenderLiving
|
||||
{
|
||||
public class SlimeRender extends RenderLiving {
|
||||
static final ResourceLocation texture = new ResourceLocation("tinker", "textures/mob/slimeedible.png");
|
||||
private ModelBase scaleAmount;
|
||||
|
||||
public SlimeRender(ModelBase par1ModelBase, ModelBase par2ModelBase, float par3)
|
||||
{
|
||||
public SlimeRender(ModelBase par1ModelBase, ModelBase par2ModelBase, float par3) {
|
||||
super(par1ModelBase, par3);
|
||||
this.scaleAmount = par2ModelBase;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender (EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
|
||||
{
|
||||
public void doRender(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9) {
|
||||
super.doRender(par1EntityLiving, par2, par4, par6, par8, par9);
|
||||
if(par1EntityLiving instanceof KingBlueSlime)
|
||||
BossStatus.setBossStatus((KingBlueSlime) par1EntityLiving, true);
|
||||
if (par1EntityLiving instanceof KingBlueSlime) BossStatus.setBossStatus((KingBlueSlime) par1EntityLiving, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether Slime Render should pass or not.
|
||||
*/
|
||||
protected int shouldSlimeRenderPass (SlimeBase slime, int par2, float par3)
|
||||
{
|
||||
if (slime.isInvisible())
|
||||
{
|
||||
protected int shouldSlimeRenderPass(SlimeBase slime, int par2, float par3) {
|
||||
if (slime.isInvisible()) {
|
||||
return 0;
|
||||
}
|
||||
else if (par2 == 0)
|
||||
{
|
||||
} else if (par2 == 0) {
|
||||
this.setRenderPassModel(this.scaleAmount);
|
||||
GL11.glEnable(GL11.GL_NORMALIZE);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (par2 == 1)
|
||||
{
|
||||
} else {
|
||||
if (par2 == 1) {
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
@@ -62,10 +51,10 @@ public class SlimeRender extends RenderLiving
|
||||
/**
|
||||
* sets the scale for the slime based on getSlimeSize in EdibleSlime
|
||||
*/
|
||||
protected void scaleSlime (SlimeBase par1EdibleSlime, float par2)
|
||||
{
|
||||
protected void scaleSlime(SlimeBase par1EdibleSlime, float par2) {
|
||||
float f1 = (float) par1EdibleSlime.getSlimeSize();
|
||||
float f2 = (par1EdibleSlime.sizeHeight + (par1EdibleSlime.sizeFactor - par1EdibleSlime.sizeHeight) * par2) / (f1 * 0.5F + 1.0F);
|
||||
float f2 = (par1EdibleSlime.sizeHeight + (par1EdibleSlime.sizeFactor - par1EdibleSlime.sizeHeight) * par2)
|
||||
/ (f1 * 0.5F + 1.0F);
|
||||
float f3 = 1.0F / (f2 + 1.0F);
|
||||
GL11.glScalef(f3 * f1, 1.0F / f3 * f1, f3 * f1);
|
||||
}
|
||||
@@ -75,8 +64,7 @@ public class SlimeRender extends RenderLiving
|
||||
* the model is rendered. Args: entityLiving, partialTickTime
|
||||
*/
|
||||
@Override
|
||||
protected void preRenderCallback (EntityLivingBase par1EntityLiving, float par2)
|
||||
{
|
||||
protected void preRenderCallback(EntityLivingBase par1EntityLiving, float par2) {
|
||||
this.scaleSlime((SlimeBase) par1EntityLiving, par2);
|
||||
}
|
||||
|
||||
@@ -84,14 +72,12 @@ public class SlimeRender extends RenderLiving
|
||||
* Queries whether should render the specified pass or not.
|
||||
*/
|
||||
@Override
|
||||
protected int shouldRenderPass (EntityLivingBase par1EntityLiving, int par2, float par3)
|
||||
{
|
||||
protected int shouldRenderPass(EntityLivingBase par1EntityLiving, int par2, float par3) {
|
||||
return this.shouldSlimeRenderPass((SlimeBase) par1EntityLiving, par2, par3);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture (Entity par1Entity)
|
||||
{
|
||||
protected ResourceLocation getEntityTexture(Entity par1Entity) {
|
||||
return texture;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user