Started by
ScrubDragon
on
Topic category: Help with Minecraft modding (Java Edition)
So I've just recently got into modding, and I'm trying to make amethyst armor, but when I load up the test game the armor textures are black and purple squares. They look fine on my character, but the texture of it in my inventory is all messed up. I've looked all over the internet for a solution but none of them seem to work. Here's the code:
package mod.mcreator; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.common.util.EnumHelper; import net.minecraft.world.World; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemArmor; import net.minecraft.item.Item; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.Minecraft; import java.util.Random; public class mcreator_amethystArmor { public mcreator_amethystArmor() { } public static Item helmet; public static Item body; public static Item legs; public static Item boots; public static Object instance; public void load(FMLInitializationEvent event) { if (event.getSide() == Side.CLIENT) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher() .register(helmet, 0, new ModelResourceLocation("testenvironmentmod:amethyst helmet", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher() .register(body, 0, new ModelResourceLocation("testenvironmentmod:amethyst chestplate", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher() .register(legs, 0, new ModelResourceLocation("testenvironmentmod:amethyst leggings", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher() .register(boots, 0, new ModelResourceLocation("testenvironmentmod:amethyst boots", "inventory")); } GameRegistry.addRecipe(new ItemStack(helmet, 1), new Object[]{"012", "3X5", "XXX", Character.valueOf('0'), mcreator_amethyst.block, Character.valueOf('1'), mcreator_amethyst.block, Character.valueOf('2'), mcreator_amethyst.block, Character.valueOf('3'), mcreator_amethyst.block, Character.valueOf('5'), mcreator_amethyst.block,}); GameRegistry.addRecipe(new ItemStack(body, 1), new Object[]{"0X2", "345", "678", Character.valueOf('0'), mcreator_amethyst.block, Character.valueOf('2'), mcreator_amethyst.block, Character.valueOf('3'), mcreator_amethyst.block, Character.valueOf('4'), mcreator_amethyst.block, Character.valueOf('5'), mcreator_amethyst.block, Character.valueOf('6'), mcreator_amethyst.block, Character.valueOf('7'), mcreator_amethyst.block, Character.valueOf('8'), mcreator_amethyst.block,}); GameRegistry.addRecipe(new ItemStack(legs, 1), new Object[]{"012", "3X5", "6X8", Character.valueOf('0'), mcreator_amethyst.block, Character.valueOf('1'), mcreator_amethyst.block, Character.valueOf('2'), mcreator_amethyst.block, Character.valueOf('3'), mcreator_amethyst.block, Character.valueOf('5'), mcreator_amethyst.block, Character.valueOf('6'), mcreator_amethyst.block, Character.valueOf('8'), mcreator_amethyst.block,}); GameRegistry.addRecipe(new ItemStack(boots, 1), new Object[]{"XXX", "3X5", "6X8", Character.valueOf('3'), mcreator_amethyst.block, Character.valueOf('5'), mcreator_amethyst.block, Character.valueOf('6'), mcreator_amethyst.block, Character.valueOf('8'), mcreator_amethyst.block,}); helmet.setCreativeTab(CreativeTabs.COMBAT); body.setCreativeTab(CreativeTabs.COMBAT); legs.setCreativeTab(CreativeTabs.COMBAT); boots.setCreativeTab(CreativeTabs.COMBAT); } public void generateNether(World world, Random random, int chunkX, int chunkZ) { } public void generateSurface(World world, Random random, int chunkX, int chunkZ) { } public int addFuel(ItemStack fuel) { return 0; } public void serverLoad(FMLServerStartingEvent event) { } public void preInit(FMLPreInitializationEvent event) { } public void registerRenderers() { } static { ItemArmor.ArmorMaterial enuma = EnumHelper.addArmorMaterial("AMETHYSTARMOR", "armor 1.png", 35, new int[]{10, 15, 13, 11}, 10, null, 3.5f); int armorPreffix = 0; helmet = (new ItemArmor(enuma, armorPreffix, EntityEquipmentSlot.HEAD) { public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack) { int i = (int) entity.posX; int j = (int) entity.posY; int k = (int) entity.posZ; } }).setUnlocalizedName("amethystarmorhelmet"); helmet.setMaxStackSize(1); body = (new ItemArmor(enuma, armorPreffix, EntityEquipmentSlot.CHEST) { public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack) { int i = (int) entity.posX; int j = (int) entity.posY; int k = (int) entity.posZ; } }).setUnlocalizedName("amethystarmorbody"); body.setMaxStackSize(1); legs = (new ItemArmor(enuma, armorPreffix, EntityEquipmentSlot.LEGS) { public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack) { int i = (int) entity.posX; int j = (int) entity.posY; int k = (int) entity.posZ; } }).setUnlocalizedName("amethystarmorlegs"); legs.setMaxStackSize(1); boots = (new ItemArmor(enuma, armorPreffix, EntityEquipmentSlot.FEET) { public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack) { int i = (int) entity.posX; int j = (int) entity.posY; int k = (int) entity.posZ; } }).setUnlocalizedName("amethystarmorboots"); boots.setMaxStackSize(1); helmet.setRegistryName("amethystarmorhelmet"); GameRegistry.register(helmet); body.setRegistryName("amethystarmorbody"); GameRegistry.register(body); legs.setRegistryName("amethystarmorlegs"); GameRegistry.register(legs); boots.setRegistryName("amethystarmorboots"); GameRegistry.register(boots); } }Edited by ScrubDragon on Sat, 07/29/2017 - 21:17
Well black and pink squares means no texture or missing texture
@#1 But I added the textures
its a bug with the newest verison of mcreator were just gonna have to wait till next update
@#2 Okay. Thank you
@#4
Ah...okay...well...it does this to my blocks too. It shows up as a flat texture on the GUI but when placed it's fine...wtf?
Is there no way to edit or delete my own posts?! WTF?!
Either way that was replying to @Hey_Itz_Jim