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:
Raven Szewczyk authored and GitHub committed 2022-09-22 20:51:23 +02:00
1 parent 18bfeaff32
commit 39be06c23b
571 files changed
+25959 -28223

No files matched your search

@@ -12,19 +12,16 @@ import org.lwjgl.opengl.*;
import tconstruct.tools.entity.LaunchedPotion;
@SideOnly(Side.CLIENT)
public class LaunchedItemRender extends Render
{
public class LaunchedItemRender extends Render {
private Item field_94151_a;
private int field_94150_f;
public LaunchedItemRender(Item par1Item, int par2)
{
public LaunchedItemRender(Item par1Item, int par2) {
this.field_94151_a = par1Item;
this.field_94150_f = par2;
}
public LaunchedItemRender(Item par1Item)
{
public LaunchedItemRender(Item par1Item) {
this(par1Item, 0);
}
@@ -37,12 +34,10 @@ public class LaunchedItemRender extends Render
* f1). But JAD is pre 1.5 so doesn't do that.
*/
@Override
public void doRender (Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) {
IIcon icon = this.field_94151_a.getIconFromDamage(this.field_94150_f);
if (icon != null)
{
if (icon != null) {
GL11.glPushMatrix();
GL11.glTranslatef((float) par2, (float) par4, (float) par6);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
@@ -50,8 +45,7 @@ public class LaunchedItemRender extends Render
this.bindEntityTexture(par1Entity);
Tessellator tessellator = Tessellator.instance;
if (icon == ItemPotion.func_94589_d("bottle_splash"))
{
if (icon == ItemPotion.func_94589_d("bottle_splash")) {
int i = PotionHelper.func_77915_a(((LaunchedPotion) par1Entity).getPotionDamage(), false);
float f2 = (float) (i >> 16 & 255) / 255.0F;
float f3 = (float) (i >> 8 & 255) / 255.0F;
@@ -70,13 +64,11 @@ public class LaunchedItemRender extends Render
}
@Override
protected ResourceLocation getEntityTexture (Entity par1Entity)
{
protected ResourceLocation getEntityTexture(Entity par1Entity) {
return TextureMap.locationItemsTexture;
}
private void func_77026_a (Tessellator par1Tessellator, IIcon par2Icon)
{
private void func_77026_a(Tessellator par1Tessellator, IIcon par2Icon) {
float f = par2Icon.getMinU();
float f1 = par2Icon.getMaxU();
float f2 = par2Icon.getMinV();
@@ -94,5 +86,4 @@ public class LaunchedItemRender extends Render
par1Tessellator.addVertexWithUV((double) (0.0F - f5), (double) (f4 - f6), 0.0D, (double) f, (double) f2);
par1Tessellator.draw();
}
}