diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-03-08 03:14:13 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-03-08 03:14:13 +0000 |
commit | 064c0dc0cfab1cc677dfffc4b3b56642017e412b (patch) | |
tree | 4ca26291abe64632a63bc0d72a510079a1766d7f /src/Java/gtPlusPlus/plugin/fixes | |
parent | 5ec18de508e12da48c68ef679f6b8646f12cb0c2 (diff) | |
download | GT5-Unofficial-064c0dc0cfab1cc677dfffc4b3b56642017e412b.tar.gz GT5-Unofficial-064c0dc0cfab1cc677dfffc4b3b56642017e412b.tar.bz2 GT5-Unofficial-064c0dc0cfab1cc677dfffc4b3b56642017e412b.zip |
+ Added some AgriChem. (You can now use Raw waste as a fuel source)
+ Added OreDict names to vanilla items, as was done in Forge 1.8.9.
+ Added functions to allow other mods to add Semifluid Fuels.
+ Added functions to handle String data into StringUtils.java.
% Renamed getItemStack -> getItemStackFromFQRN.
$ Fixed handling of custom cells for fluids using '.' within their names.
$ Fixed HF exploit.
Diffstat (limited to 'src/Java/gtPlusPlus/plugin/fixes')
-rw-r--r-- | src/Java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java b/src/Java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java index f6af6e6e5f..cf9676635d 100644 --- a/src/Java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java +++ b/src/Java/gtPlusPlus/plugin/fixes/vanilla/Core_VanillaFixes.java @@ -1,7 +1,11 @@ package gtPlusPlus.plugin.fixes.vanilla; import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.plugin.manager.Core_Manager; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; public class Core_VanillaFixes implements IPlugin { @@ -19,18 +23,18 @@ public class Core_VanillaFixes implements IPlugin { } @Override - public boolean preInit() { - return false; + public boolean preInit() { + return fixVanillaOD(); } @Override public boolean init() { - return false; + return true; } @Override public boolean postInit() { - return false; + return true; } @Override @@ -42,5 +46,31 @@ public class Core_VanillaFixes implements IPlugin { public String getPluginAbbreviation() { return "VFIX"; } + + private boolean fixVanillaOD() { + registerToOreDict(ItemUtils.getSimpleStack(Items.nether_wart), "cropNetherWart"); + registerToOreDict(ItemUtils.getSimpleStack(Items.reeds), "sugarcane"); + registerToOreDict(ItemUtils.getSimpleStack(Items.paper), "paper"); + registerToOreDict(ItemUtils.getSimpleStack(Items.ender_pearl), "enderpearl"); + registerToOreDict(ItemUtils.getSimpleStack(Items.bone), "bone"); + registerToOreDict(ItemUtils.getSimpleStack(Items.gunpowder), "gunpowder"); + registerToOreDict(ItemUtils.getSimpleStack(Items.string), "string"); + registerToOreDict(ItemUtils.getSimpleStack(Items.nether_star), "netherStar"); + registerToOreDict(ItemUtils.getSimpleStack(Items.leather), "leather"); + registerToOreDict(ItemUtils.getSimpleStack(Items.feather), "feather"); + registerToOreDict(ItemUtils.getSimpleStack(Items.egg), "egg"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.end_stone), "endstone"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.vine), "vine"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.cactus), "blockCactus"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.grass), "grass"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.obsidian), "obsidian"); + registerToOreDict(ItemUtils.getSimpleStack(Blocks.crafting_table), "workbench"); + return true; + } + + private void registerToOreDict(ItemStack aStack, String aString) { + mInstance.log("Registering "+aStack.getDisplayName()+" to OreDictionary under the tag '"+aString+"'. (Added to Forge in 1.8.9)"); + ItemUtils.addItemToOreDictionary(aStack, aString); + } } |