mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 11:19:28 +00:00
minor cleanup
This commit is contained in:
1 parent
db5daf9e3d
commit
b4c0777f1c
15 files changed
+40
-44
No files matched your search
@@ -145,10 +145,10 @@ public class Forestry {
|
||||
Log.warning("Remapping block " + mapping.name + " to " + StringUtil.cleanBlockName(block));
|
||||
}
|
||||
} else {
|
||||
Block block = GameRegistry.findBlock(Constants.MOD, StringUtil.cleanTags(mapping.name));
|
||||
if (block != null) {
|
||||
mapping.remap(Item.getItemFromBlock(block));
|
||||
Log.warning("Remapping item " + mapping.name + " to " + StringUtil.cleanBlockName(block));
|
||||
Item item = GameRegistry.findItem(Constants.MOD, StringUtil.cleanTags(mapping.name));
|
||||
if (item != null) {
|
||||
mapping.remap(item);
|
||||
Log.warning("Remapping item " + mapping.name + " to " + StringUtil.cleanItemName(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ public class InventoryBeeHousing extends InventoryAdapterRestricted implements I
|
||||
public static final int SLOT_PRODUCT_1 = 2;
|
||||
public static final int SLOT_PRODUCT_COUNT = 7;
|
||||
|
||||
public InventoryBeeHousing(int size, String name, IAccessHandler accessHandler) {
|
||||
super(size, name, accessHandler);
|
||||
public InventoryBeeHousing(int size, IAccessHandler accessHandler) {
|
||||
super(size, "Items", accessHandler);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -54,7 +54,7 @@ public class VillageHandlerApiculture implements IVillageCreationHandler, IVilla
|
||||
ItemStack randomComb = PluginApiculture.items.beeComb.getRandomComb(1, random, false);
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(Items.wheat, 2), randomComb));
|
||||
|
||||
ItemStack apiary = PluginApiculture.blocks.apiculture.get(BlockApicultureType.APIARY, 1);
|
||||
ItemStack apiary = PluginApiculture.blocks.apiculture.get(BlockApicultureType.APIARY);
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(Blocks.log, 24, OreDictionary.WILDCARD_VALUE), apiary));
|
||||
|
||||
ItemStack provenFrames = PluginApiculture.items.frameProven.getItemStack(6);
|
||||
|
||||
@@ -285,7 +285,7 @@ public class BlockAlveary extends BlockStructure {
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack get(Type type, int amount) {
|
||||
return new ItemStack(this, amount, type.ordinal());
|
||||
public ItemStack get(Type type) {
|
||||
return new ItemStack(this, 1, type.ordinal());
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ import forestry.plugins.PluginApiculture;
|
||||
public class EntityMinecartBeehouse extends EntityMinecartBeeHousingBase {
|
||||
private static final IBeeModifier beeModifier = new BeehouseBeeModifier();
|
||||
private static final IBeeListener beeListener = new DefaultBeeListener();
|
||||
private final InventoryBeeHousing beeInventory = new InventoryBeeHousing(9, "Items", getAccessHandler());
|
||||
private final InventoryBeeHousing beeInventory = new InventoryBeeHousing(9, getAccessHandler());
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public EntityMinecartBeehouse(World world) {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class InventoryApiary extends InventoryBeeHousing implements IApiaryInven
|
||||
public static final int SLOT_FRAMES_COUNT = 3;
|
||||
|
||||
public InventoryApiary(IAccessHandler accessHandler) {
|
||||
super(12, "Items", accessHandler);
|
||||
super(12, accessHandler);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -68,7 +68,7 @@ public class AlvearyController extends RectangularMultiblockControllerBase imple
|
||||
|
||||
public AlvearyController(World world) {
|
||||
super(world, AlvearyMultiblockSizeLimits.instance);
|
||||
this.inventory = new InventoryBeeHousing(9, "Items", getAccessHandler());
|
||||
this.inventory = new InventoryBeeHousing(9, getAccessHandler());
|
||||
this.beekeepingLogic = BeeManager.beeRoot.createBeekeepingLogic(this);
|
||||
|
||||
this.beeModifiers.add(new AlvearyBeeModifier());
|
||||
|
||||
@@ -34,7 +34,7 @@ public class TileBeehouse extends TileBeeHousingBase {
|
||||
super("bee.house");
|
||||
this.beeListener = new DefaultBeeListener();
|
||||
|
||||
beeInventory = new InventoryBeeHousing(12, "Items", getAccessHandler());
|
||||
beeInventory = new InventoryBeeHousing(12, getAccessHandler());
|
||||
beeInventory.disableAutomation();
|
||||
setInternalInventory(beeInventory);
|
||||
}
|
||||
|
||||
@@ -291,10 +291,6 @@ public class BlockBase<T extends IMachineProperties> extends BlockForestry {
|
||||
}
|
||||
|
||||
public final ItemStack get(T type) {
|
||||
return get(type, 1);
|
||||
}
|
||||
|
||||
public final ItemStack get(T type, int amount) {
|
||||
return new ItemStack(this, amount, type.getMeta());
|
||||
return new ItemStack(this, 1, type.getMeta());
|
||||
}
|
||||
}
|
||||
@@ -38,10 +38,10 @@ public class BlockRegistryCore extends BlockRegistry {
|
||||
|
||||
resourceStorage = registerBlock(new BlockResourceStorage(), ItemBlockForestry.class, "resourceStorage");
|
||||
resourceStorage.setHarvestLevel("pickaxe", 0);
|
||||
OreDictionary.registerOre("blockApatite", resourceStorage.get(BlockResourceStorage.ResourceType.APATITE, 1));
|
||||
OreDictionary.registerOre("blockCopper", resourceStorage.get(BlockResourceStorage.ResourceType.COPPER, 1));
|
||||
OreDictionary.registerOre("blockTin", resourceStorage.get(BlockResourceStorage.ResourceType.TIN, 1));
|
||||
OreDictionary.registerOre("blockBronze", resourceStorage.get(BlockResourceStorage.ResourceType.BRONZE, 1));
|
||||
OreDictionary.registerOre("blockApatite", resourceStorage.get(BlockResourceStorage.ResourceType.APATITE));
|
||||
OreDictionary.registerOre("blockCopper", resourceStorage.get(BlockResourceStorage.ResourceType.COPPER));
|
||||
OreDictionary.registerOre("blockTin", resourceStorage.get(BlockResourceStorage.ResourceType.TIN));
|
||||
OreDictionary.registerOre("blockBronze", resourceStorage.get(BlockResourceStorage.ResourceType.BRONZE));
|
||||
|
||||
// register some common oreDict names for our recipes
|
||||
OreDictionary.registerOre("chestWood", Blocks.chest);
|
||||
|
||||
@@ -40,7 +40,7 @@ public class BlockResourceStorage extends Block {
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List itemList) {
|
||||
for (ResourceType resourceType : ResourceType.values()) {
|
||||
ItemStack stack = get(resourceType, 1);
|
||||
ItemStack stack = get(resourceType);
|
||||
itemList.add(stack);
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public class BlockResourceStorage extends Block {
|
||||
return ResourceType.VALUES[meta].icon;
|
||||
}
|
||||
|
||||
public ItemStack get(ResourceType type, int amount) {
|
||||
return new ItemStack(this, amount, type.ordinal());
|
||||
public ItemStack get(ResourceType type) {
|
||||
return new ItemStack(this, 1, type.ordinal());
|
||||
}
|
||||
}
|
||||
@@ -465,12 +465,12 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
RecipeUtil.addRecipe(items.minecartBeehouse.getBeeHouseMinecart(),
|
||||
"B",
|
||||
"C",
|
||||
'B', blocks.apiculture.get(BlockApicultureType.BEEHOUSE, 1),
|
||||
'B', blocks.apiculture.get(BlockApicultureType.BEEHOUSE),
|
||||
'C', Items.minecart);
|
||||
RecipeUtil.addRecipe(items.minecartBeehouse.getApiaryMinecart(),
|
||||
"B",
|
||||
"C",
|
||||
'B', blocks.apiculture.get(BlockApicultureType.APIARY, 1),
|
||||
'B', blocks.apiculture.get(BlockApicultureType.APIARY),
|
||||
'C', Items.minecart);
|
||||
|
||||
// FOOD STUFF
|
||||
@@ -521,14 +521,14 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
'#', PluginCore.items.beeswax);
|
||||
|
||||
// / ALVEARY
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.PLAIN, 1),
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.PLAIN),
|
||||
"###",
|
||||
"#X#",
|
||||
"###",
|
||||
'X', PluginCore.items.impregnatedCasing,
|
||||
'#', PluginCore.items.craftingMaterial.getScentedPaneling());
|
||||
// SWARMER
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.SWARMER, 1),
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.SWARMER),
|
||||
"#G#",
|
||||
" X ",
|
||||
"#G#",
|
||||
@@ -536,7 +536,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
'X', blocks.alveary,
|
||||
'G', "ingotGold");
|
||||
// FAN
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.FAN, 1),
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.FAN),
|
||||
"I I",
|
||||
" X ",
|
||||
"I#I",
|
||||
@@ -544,7 +544,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
'X', blocks.alveary,
|
||||
'I', "ingotIron");
|
||||
// HEATER
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.HEATER, 1),
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.HEATER),
|
||||
"#I#",
|
||||
" X ",
|
||||
"YYY",
|
||||
@@ -552,7 +552,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
'X', blocks.alveary,
|
||||
'I', "ingotIron", 'Y', "stone");
|
||||
// HYGROREGULATOR
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.HYGRO, 1),
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.HYGRO),
|
||||
"GIG",
|
||||
"GXG",
|
||||
"GIG",
|
||||
@@ -560,14 +560,14 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
'I', "ingotIron",
|
||||
'G', "blockGlass");
|
||||
// STABILISER
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.STABILIZER, 1),
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.STABILIZER),
|
||||
"G G",
|
||||
"GXG",
|
||||
"G G",
|
||||
'X', blocks.alveary,
|
||||
'G', "gemQuartz");
|
||||
// SIEVE
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.SIEVE, 1),
|
||||
RecipeUtil.addRecipe(blocks.alveary.get(BlockAlveary.Type.SIEVE),
|
||||
"III",
|
||||
" X ",
|
||||
"WWW",
|
||||
@@ -712,7 +712,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
}
|
||||
|
||||
// ANALYZER
|
||||
RecipeUtil.addRecipe(PluginCore.blocks.core.get(BlockCoreType.ANALYZER, 1),
|
||||
RecipeUtil.addRecipe(PluginCore.blocks.core.get(BlockCoreType.ANALYZER),
|
||||
"XTX",
|
||||
" Y ",
|
||||
"X X",
|
||||
@@ -720,7 +720,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
'T', items.beealyzer,
|
||||
'X', "ingotBronze");
|
||||
|
||||
RecipeUtil.addRecipe(blocks.apiculture.get(BlockApicultureType.APIARY, 1),
|
||||
RecipeUtil.addRecipe(blocks.apiculture.get(BlockApicultureType.APIARY),
|
||||
"XXX",
|
||||
"#C#",
|
||||
"###",
|
||||
@@ -736,7 +736,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
'X', "beeComb",
|
||||
'Y', "chestWood");
|
||||
|
||||
RecipeUtil.addRecipe(blocks.apiculture.get(BlockApicultureType.BEEHOUSE, 1),
|
||||
RecipeUtil.addRecipe(blocks.apiculture.get(BlockApicultureType.BEEHOUSE),
|
||||
"XXX",
|
||||
"#C#",
|
||||
"###",
|
||||
|
||||
@@ -316,7 +316,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
'#', "stickWood");
|
||||
|
||||
// ANALYZER
|
||||
RecipeUtil.addRecipe(PluginCore.blocks.core.get(BlockCoreType.ANALYZER, 1),
|
||||
RecipeUtil.addRecipe(PluginCore.blocks.core.get(BlockCoreType.ANALYZER),
|
||||
"XTX",
|
||||
" Y ",
|
||||
"X X",
|
||||
@@ -324,7 +324,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
'T', items.treealyzer,
|
||||
'X', "ingotBronze");
|
||||
|
||||
RecipeUtil.addRecipe(blocks.arboriculture.get(BlockArboricultureType.ARBCHEST, 1),
|
||||
RecipeUtil.addRecipe(blocks.arboriculture.get(BlockArboricultureType.ARBCHEST),
|
||||
" # ",
|
||||
"XYX",
|
||||
"XXX",
|
||||
|
||||
@@ -277,16 +277,16 @@ public class PluginCore extends ForestryPlugin {
|
||||
RecipeUtil.addRecipe(items.pipette, " #", " X ", "X ", 'X', "paneGlass", '#', new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE));
|
||||
|
||||
// Storage Blocks
|
||||
RecipeUtil.addRecipe(blocks.resourceStorage.get(BlockResourceStorage.ResourceType.APATITE, 1), "###", "###", "###", '#', "gemApatite");
|
||||
RecipeUtil.addRecipe(blocks.resourceStorage.get(BlockResourceStorage.ResourceType.APATITE), "###", "###", "###", '#', "gemApatite");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.apatite, 9), "blockApatite");
|
||||
|
||||
RecipeUtil.addRecipe(blocks.resourceStorage.get(BlockResourceStorage.ResourceType.COPPER, 1), "###", "###", "###", '#', "ingotCopper");
|
||||
RecipeUtil.addRecipe(blocks.resourceStorage.get(BlockResourceStorage.ResourceType.COPPER), "###", "###", "###", '#', "ingotCopper");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.ingotCopper, 9), "blockCopper");
|
||||
|
||||
RecipeUtil.addRecipe(blocks.resourceStorage.get(BlockResourceStorage.ResourceType.TIN, 1), "###", "###", "###", '#', "ingotTin");
|
||||
RecipeUtil.addRecipe(blocks.resourceStorage.get(BlockResourceStorage.ResourceType.TIN), "###", "###", "###", '#', "ingotTin");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.ingotTin, 9), "blockTin");
|
||||
|
||||
RecipeUtil.addRecipe(blocks.resourceStorage.get(BlockResourceStorage.ResourceType.BRONZE, 1), "###", "###", "###", '#', "ingotBronze");
|
||||
RecipeUtil.addRecipe(blocks.resourceStorage.get(BlockResourceStorage.ResourceType.BRONZE), "###", "###", "###", '#', "ingotBronze");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.ingotBronze, 9), "blockBronze");
|
||||
}
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ public class PluginFactory extends ForestryPlugin {
|
||||
"###",
|
||||
'#', "logWood");
|
||||
RecipeManagers.carpenterManager.addRecipe(50, Fluids.SEEDOIL.getFluid(500), null,
|
||||
PluginCore.blocks.core.get(BlockCoreType.ESCRITOIRE, 1),
|
||||
PluginCore.blocks.core.get(BlockCoreType.ESCRITOIRE),
|
||||
"# ",
|
||||
"###",
|
||||
"# #",
|
||||
|
||||
Reference in new issue
Block a user