mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 19:39:37 +00:00
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:
1 parent
6b4f3eb1c7
commit
f0f14bb278
325 files changed
+1205
-1868
No files matched your search
@@ -90,7 +90,7 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack itemStack, List<String> tooltip) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
getType(meta).addTooltip(tooltip);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List itemList) {
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> itemList) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
BlockType type = new BlockType(c, c, TileType.Tile);
|
||||
itemList.add(TileEntityMetadata.getItemStack(this, type.ordinal()));
|
||||
@@ -205,9 +205,9 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
VerticalStripeBrick("verticalbrickstripe", "verticalStripedCeramicBricks"),
|
||||
VerticalLargeBrick("verticalbricklarge", "largeVerticalCeramicBricks");
|
||||
|
||||
protected String id;
|
||||
protected String name;
|
||||
protected IIcon[] icons;
|
||||
private final String id;
|
||||
private final String name;
|
||||
private final IIcon[] icons;
|
||||
|
||||
TileType(String id, String name) {
|
||||
icons = new IIcon[3];
|
||||
@@ -224,32 +224,15 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
}
|
||||
|
||||
public ItemStack getRecipe(List<ItemStack> stacks) {
|
||||
switch (this) {
|
||||
case Tile:
|
||||
return getTileRecipe(stacks);
|
||||
|
||||
case Split:
|
||||
return getSplitRecipe(stacks);
|
||||
|
||||
case Chequered:
|
||||
return getChequeredRecipe(stacks);
|
||||
|
||||
case Mixed:
|
||||
return getMixedRecipe(stacks);
|
||||
|
||||
case LargeBrick:
|
||||
return getLargeBrickRecipe(stacks);
|
||||
|
||||
case Brick:
|
||||
case StripeBrick:
|
||||
return getBrickRecipe(stacks);
|
||||
|
||||
case VerticalLargeBrick:
|
||||
case VerticalBrick:
|
||||
case VerticalStripeBrick:
|
||||
return getVerticalBrickRecipe(stacks);
|
||||
}
|
||||
return null;
|
||||
return switch (this) {
|
||||
case Tile -> getTileRecipe(stacks);
|
||||
case Split -> getSplitRecipe(stacks);
|
||||
case Chequered -> getChequeredRecipe(stacks);
|
||||
case Mixed -> getMixedRecipe(stacks);
|
||||
case LargeBrick -> getLargeBrickRecipe(stacks);
|
||||
case Brick, StripeBrick -> getBrickRecipe(stacks);
|
||||
case VerticalLargeBrick, VerticalBrick, VerticalStripeBrick -> getVerticalBrickRecipe(stacks);
|
||||
};
|
||||
}
|
||||
|
||||
private ItemStack getTileRecipe(List<ItemStack> stacks) {
|
||||
@@ -541,7 +524,7 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
return I18N.localise("botany." + type.name);
|
||||
}
|
||||
|
||||
public void addTooltip(List tooltip) {
|
||||
public void addTooltip(List<String> tooltip) {
|
||||
String name = color1.getName();
|
||||
if (type.canDouble() && color2 != color1) {
|
||||
name = I18N.localise("botany.colour.double", name, color2.getName());
|
||||
|
||||
Reference in new issue
Block a user