sawthewhat Posted August 17, 2016 Share Posted August 17, 2016 my english is poor.(i'm a chinese) so I can't express it very well.sorry. i can sure the texture was found by game. but it not rendered on the item at all i asked other forge developers for help. but they don't konw how to do either. i tried to sovle it in all ways i can do. but it still show me a black-purple block Forge version: 1.10.2-12.18.1.2065 (mc 1.10.2) please help me to check my code: sawthewhat.keystand.KeyStandMod package sawthewhat.keystand; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; @Mod(name = KeyStandMod.MODNAME, version = KeyStandMod.MODVER, modid = KeyStandMod.MODID) public class KeyStandMod { public final static String MODID = "keystand"; public final static String MODNAME = "KeyStand"; public final static String MODVER = "1.0"; @SidedProxy(clientSide = "sawthewhat.keystand.ClientProxy", serverSide = "sawthewhat.keystand.ServerProxy") public static ServerProxy proxy; @EventHandler public void init(FMLInitializationEvent e) { proxy.init(); } } sawthewhat.keystand.ServerProxy package sawthewhat.keystand; import net.minecraft.client.renderer.ItemMeshDefinition; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.registry.GameRegistry; import sawthewhat.keystand.item.ItemKeyStand; public class ServerProxy { protected ItemKeyStand ks; public void init() { ks = new ItemKeyStand(); ks.setRegistryName("keystand"); ks.setUnlocalizedName("keystand.keystand"); GameRegistry.register(ks); } } sawthewhat.keystand.ClientProxy package sawthewhat.keystand; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraftforge.client.model.ModelLoader; public class ClientProxy extends ServerProxy { public void init() { super.init(); ModelLoader.setCustomModelResourceLocation(super.ks, 0, new ModelResourceLocation("keystand:keystand", "inventory")); } } ItemKeyStand is almost empty package sawthewhat.keystand.item; import net.minecraft.item.Item; public class ItemKeyStand extends Item { } assets/keystand/models/item/keystand.json { "parent":"builtin/generated", "textures": { "layer0": "keystand:keystand" } } texture is in assets/keystand/textures. help me to find where is the wrong.thx. Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 17, 2016 Share Posted August 17, 2016 Don't add your modid to the resource location aka ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation("keystand", "inventory")); Also you need to have more than 1 JSON for blocks just so you know. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 17, 2016 Share Posted August 17, 2016 Also you should be doing all Item/Block stuff in FMLPreInitializationEvent not FMLInitializationEvent. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
sawthewhat Posted August 17, 2016 Author Share Posted August 17, 2016 not work yet. Link to comment Share on other sites More sharing options...
AshIndigo Posted August 17, 2016 Share Posted August 17, 2016 Can you post your new code and json files? Link to comment Share on other sites More sharing options...
sawthewhat Posted August 18, 2016 Author Share Posted August 18, 2016 problem solved by myself. but i still don't know where the wrong is. lock topic. Link to comment Share on other sites More sharing options...
Recommended Posts