mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-20 12:19:47 +00:00
Update Forestry and Fix #143
This commit is contained in:
1 parent
d678903d68
commit
d0cb769a2b
5 files changed
+16
-32
No files matched your search
@@ -2,13 +2,7 @@ package binnie.extratrees.block;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
import forestry.api.arboriculture.IWoodType;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.api.arboriculture.WoodBlockKind;
|
||||
|
||||
import binnie.Constants;
|
||||
|
||||
@@ -95,24 +89,9 @@ public enum EnumETLog implements IWoodType {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void addRecipe() {
|
||||
if (this.plank == null) {
|
||||
return;
|
||||
}
|
||||
ItemStack log = TreeManager.woodAccess.getStack(this, WoodBlockKind.LOG, false);
|
||||
ItemStack result = plank.getStack(false);
|
||||
result.setCount(4);
|
||||
GameRegistry.addShapelessRecipe(result, log);
|
||||
|
||||
ItemStack logFireproof = TreeManager.woodAccess.getStack(this, WoodBlockKind.LOG, true);
|
||||
ItemStack resultFireproof = plank.getStack(true);
|
||||
resultFireproof.setCount(4);
|
||||
GameRegistry.addShapelessRecipe(resultFireproof, logFireproof);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getHardness() {
|
||||
return 5;
|
||||
return 2.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -321,9 +321,18 @@ public class ModuleBlocks implements IInitializable {
|
||||
|
||||
IWoodAccess woodAccess = TreeManager.woodAccess;
|
||||
for(EnumETLog log : EnumETLog.VALUES){
|
||||
ItemStack logs = woodAccess.getStack(log, WoodBlockKind.LOG, false);
|
||||
ItemStack planks = log.getPlank().getStack();
|
||||
ItemStack fireproofLogs = woodAccess.getStack(log, WoodBlockKind.LOG, true);
|
||||
ItemStack fireproofPlanks = log.getPlank().getStack(true);
|
||||
|
||||
planks.setCount(4);
|
||||
GameRegistry.addShapelessRecipe(planks.copy(), logs.copy());
|
||||
|
||||
fireproofPlanks.setCount(4);
|
||||
GameRegistry.addShapelessRecipe(fireproofPlanks.copy(), fireproofLogs);
|
||||
|
||||
if (ForestryAPI.enabledPlugins.containsAll(Arrays.asList(ForestryPluginUids.FACTORY, ForestryPluginUids.APICULTURE))) {
|
||||
ItemStack logs = woodAccess.getStack(log, WoodBlockKind.LOG, false);
|
||||
ItemStack fireproofLogs = woodAccess.getStack(log, WoodBlockKind.LOG, true);
|
||||
|
||||
logs.setCount(1);
|
||||
fireproofLogs.setCount(1);
|
||||
@@ -343,7 +352,7 @@ public class ModuleBlocks implements IInitializable {
|
||||
ItemStack fences = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.FENCE, fireproof);
|
||||
ItemStack fenceGates = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.FENCE_GATE, fireproof);
|
||||
ItemStack stairs = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.STAIRS, fireproof);
|
||||
|
||||
|
||||
stairs.setCount(4);
|
||||
RecipeUtil.addPriorityRecipe(stairs.copy(),
|
||||
"# ",
|
||||
|
||||
@@ -73,7 +73,7 @@ public class PlankType {
|
||||
Rosewood(7738624),
|
||||
Gingko(16050106),
|
||||
PinkIvory(15502496),
|
||||
Banana(0);
|
||||
Banana(9466691);
|
||||
|
||||
public static final ExtraTreePlanks[] VALUES = values();
|
||||
private final int color;
|
||||
|
||||
@@ -26,7 +26,6 @@ import binnie.core.Mods;
|
||||
import binnie.core.item.ItemMisc;
|
||||
import binnie.core.liquid.ManagerLiquid;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.block.EnumETLog;
|
||||
|
||||
public class ModuleItems implements IInitializable {
|
||||
|
||||
@@ -166,8 +165,5 @@ public class ModuleItems implements IInitializable {
|
||||
|
||||
FuelManager.bronzeEngineFuel.put(ExtraTreeLiquid.Sap.get(1).getFluid(), new EngineBronzeFuel(ExtraTreeLiquid.Sap.get(1).getFluid(), 20, 10000, 1));
|
||||
FuelManager.bronzeEngineFuel.put(ExtraTreeLiquid.Resin.get(1).getFluid(), new EngineBronzeFuel(ExtraTreeLiquid.Resin.get(1).getFluid(), 30, 10000, 1));
|
||||
for (EnumETLog log : EnumETLog.values()) {
|
||||
log.addRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user