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

@@ -9,71 +9,62 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.*;
import tconstruct.blocks.TConstructBlock;
public class GlassBlock extends TConstructBlock
{
static String blockTextures[] = { "glass_clear", "soulglass", "soulglass_clear" };
public class GlassBlock extends TConstructBlock {
static String blockTextures[] = {"glass_clear", "soulglass", "soulglass_clear"};
public GlassBlock()
{
public GlassBlock() {
super(Material.glass, 3f, blockTextures);
}
@Override
public boolean isOpaqueCube ()
{
public boolean isOpaqueCube() {
return false;
}
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
Block i1 = par1IBlockAccess.getBlock(par2, par3, par4);
return i1 == (Block) this ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5);
}
@Override
public float getBlockHardness (World world, int x, int y, int z)
{
public float getBlockHardness(World world, int x, int y, int z) {
int meta = world.getBlockMetadata(x, y, z);
switch (meta)
{
case 0:
return 0.3F;
case 1:
return 50.0F;
case 2:
return 50.0F;
default:
return blockHardness;
switch (meta) {
case 0:
return 0.3F;
case 1:
return 50.0F;
case 2:
return 50.0F;
default:
return blockHardness;
}
}
@Override
public float getExplosionResistance (Entity entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ)
{
public float getExplosionResistance(
Entity entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) {
int meta = world.getBlockMetadata(x, y, z);
switch (meta)
{
case 0:
return 1.5F;
case 1:
return 2000F;
case 2:
return 2000F;
default:
return getExplosionResistance(entity);
switch (meta) {
case 0:
return 1.5F;
case 1:
return 2000F;
case 2:
return 2000F;
default:
return getExplosionResistance(entity);
}
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons (IIconRegister iconRegister)
{
public void registerBlockIcons(IIconRegister iconRegister) {
this.icons = new IIcon[textureNames.length];
for (int i = 0; i < this.icons.length; ++i)
{
for (int i = 0; i < this.icons.length; ++i) {
this.icons[i] = iconRegister.registerIcon("tinker:glass/" + textureNames[i]);
}
}