Posted February 28, 20169 yr I made all types of spawners available as Items (placing the spawner with the rigth mob works YEAH!) in the creative tabs but the texture is still an ugly item texture so how can I make the Item an ItemBlock to render the item in the players inventory as vanilla spawner block? To make it more clear: For now all the different types of spawners are renderes as Item and also implemented as Item which are placing a vanilla Blocks.mob_spawner in the world and configuring it's held Entity and NBT data to spawn the wanted type of mob < working! But I want them to be rendered as Block in the players inventory and in the player's hand so I thougth I can simply change Item to ItemBlock and re-use the vanilla Spawner block so the ItemBlock looks exactly the same as the vanilla spawner. I have: public class MonsterSpawner extends ItemBlock { public MonsterSpawner() { super(Blocks.mob_spawner); setCreativeTab(CreativeTabs.tabMisc); } } which gives me: java.lang.IllegalStateException: Can't free registry slot 52 occupied by net.minecraft.item.ItemBlock@183e8023
February 29, 20169 yr Author I think this is simpler than I thought but I have no idea how I can achieve this? No one?
February 29, 20169 yr Author You will not be able to use ItemBlock, an ItemBlock must always be bound to a block and every block can have at most one ItemBlock. Best solution: Update to 1.8 and use this to set the NBT data directly on the normal spawner item. Then you can use the model system to provide an alternative model for those items. Okay thank you very much, it's now clear to me how ItemBlock works. But I need this for 1.7.10 so is there really no other way? Can I make a custom Block wich has the exact save behavior as the MobSpawner block? Can I just use something like CustomSpawner extends MobSpawner or so to make an exact copy as new block? In this case which Block have I use to?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.