diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-08-14 20:04:13 +0100 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-08-14 20:04:13 +0100 |
commit | ede55e818ba0312f061e154402cd82ec4603480d (patch) | |
tree | c5cb3074cc45f9bc36b2e2a891dd00da87498c12 /src/Java/gtPlusPlus/core/common | |
parent | 800119d6a1e75ffd0201a9dfc44c53a7604a9f37 (diff) | |
download | GT5-Unofficial-ede55e818ba0312f061e154402cd82ec4603480d.tar.gz GT5-Unofficial-ede55e818ba0312f061e154402cd82ec4603480d.tar.bz2 GT5-Unofficial-ede55e818ba0312f061e154402cd82ec4603480d.zip |
+ Attempted to add custom covers for Ztones blocks. Should close #521.
Diffstat (limited to 'src/Java/gtPlusPlus/core/common')
-rw-r--r-- | src/Java/gtPlusPlus/core/common/CommonProxy.java | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/core/common/CommonProxy.java b/src/Java/gtPlusPlus/core/common/CommonProxy.java index 03b0f944b7..23bd46d5b0 100644 --- a/src/Java/gtPlusPlus/core/common/CommonProxy.java +++ b/src/Java/gtPlusPlus/core/common/CommonProxy.java @@ -12,6 +12,8 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.OrePrefixes; import gtPlusPlus.GTplusplus; import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.api.objects.data.Pair; import gtPlusPlus.api.objects.minecraft.ChunkManager; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.creative.AddToCreativeTab; @@ -51,12 +53,13 @@ import gtPlusPlus.plugin.villagers.block.BlockGenericSpawner; import gtPlusPlus.xmod.eio.handler.HandlerTooltip_EIO; import gtPlusPlus.xmod.galacticraft.handler.HandlerTooltip_GC; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import gtPlusPlus.xmod.thermalfoundation.item.TF_Items; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; import net.minecraft.entity.monster.EntityBlaze; import net.minecraft.entity.monster.EntityZombie; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.common.ForgeChunkManager; public class CommonProxy { @@ -258,7 +261,7 @@ public class CommonProxy { //Special mobs Support if (ReflectionUtils.doesClassExist("toast.specialMobs.entity.zombie.EntityBrutishZombie")) { - Class aBrutishZombie = ReflectionUtils.getClass("toast.specialMobs.entity.zombie.EntityBrutishZombie"); + Class<?> aBrutishZombie = ReflectionUtils.getClass("toast.specialMobs.entity.zombie.EntityBrutishZombie"); ItemStack aFortune1 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1); ItemStack aFortune2 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1); ItemStack aFortune3 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1); @@ -271,5 +274,21 @@ public class CommonProxy { } + + protected final AutoMap<Pair<Item, IItemRenderer>> mItemRenderMappings = new AutoMap<Pair<Item, IItemRenderer>>(); + + + public static void registerItemRendererGlobal(Item aItem, IItemRenderer aRenderer) { + GTplusplus.proxy.registerItemRenderer(aItem, aRenderer); + } + + public void registerItemRenderer(Item aItem, IItemRenderer aRenderer) { + if (Utils.isServer()) { + return; + } + else { + mItemRenderMappings.add(new Pair<Item, IItemRenderer>(aItem, aRenderer)); + } + } } |