Minor cleanups (#50)

* Finalize, minor alloc reduction

Also enable Jabel and generic injection

* Update dependencies.gradle

* Clean up Machine a bit

* spotless

more enhanced instanceof

* Update ModuleMachine.java

* More clen

* WARN: Removed exception catching

* Many, many tiny patches + birthday fix

* Spotless

* Spotless again

* Fix getLow and clamp tolerance value

* Revert event -> ignored on unused event parameters

* Rename instanceof variables

* Update Machine.java

* Use StringBuilder

* Cache getStack()

* Oops, Jabel can't handle that

* Spotless

* Spotless again

My IDE was fighting with it

* Remove unused elements + scream test success
This commit is contained in:
ah-OOG-ah authored and GitHub committed 2024-09-26 16:59:20 +02:00
1 parent 6b4f3eb1c7
commit f0f14bb278
325 files changed
+1205 -1868

No files matched your search

@@ -36,7 +36,7 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
}
@Override
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
for (int i = 0; i < ILogType.ExtraTreeLog.values().length; ++i) {
list.add(TileEntityMetadata.getItemStack(this, i));
}
@@ -85,11 +85,6 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
ILogType.ExtraTreeLog.registerIcons(register);
}
@Override
public int getRenderType() {
return 31;
}
@Override
public void dropAsStack(World world, int x, int y, int z, ItemStack itemStack) {
dropBlockAsItem(world, x, y, z, itemStack);
@@ -138,15 +133,10 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
}
@Override
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
public void addBlockTooltip(ItemStack itemStack, List<String> tooltip) {
// ignored
}
@Override
public boolean canSustainLeaves(IBlockAccess world, int x, int y, int z) {
return true;
}
@Override
public int getPlacedMeta(ItemStack itemStack, World world, int x, int y, int z, ForgeDirection direction) {
return TileEntityMetadata.getItemDamage(itemStack);
@@ -154,24 +144,11 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
@Override
public int onBlockPlaced(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) {
byte b0 = 0;
switch (side) {
case 0:
case 1:
b0 = 0;
break;
case 2:
case 3:
b0 = 8;
break;
case 4:
case 5:
b0 = 4;
break;
}
return b0;
return switch (side) {
case 2, 3 -> 8;
case 4, 5 -> 4;
default -> 0;
};
}
@Override
@@ -180,11 +157,6 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
world.removeTileEntity(x, y, z);
}
@Override
public boolean isWood(IBlockAccess world, int x, int y, int z) {
return true;
}
@Override
public int getFlammability(IBlockAccess world, int x, int y, int z, ForgeDirection face) {
return 20;