Posted February 1, 201510 yr Is it possible to make all of a block/item in a world turn in to another when the world loads? If I helped please press the Thank You button. Check out my mods at http://www.curse.com/users/The_Fireplace/projects
February 1, 201510 yr Quite, yes. Two ways - load world data files and edit them on your own with NBT-reading (not necessarily Minecraft). OR much simplier: You would have to do ton of stuff in events. 1. EntityJoinedWorld - for world items if(event.entity instanceof someItem) change it another 2. For inventory items. Use item's onUpdate() or PlayerTickEvent (or even other event, depending on if item is custom or vanilla) to get item, if(item instanceof someItem) change it to other. 3. To manipulate any ItemStack you need it to be loaded by world, so in case item is in chest it will stay normal (old) until you pick it up, then it'll convert). There are few ways to do it, some more optimal, some faster, but probably all will require you to actually see/drop (load) itemStack to world. As to blocks - that one would be quite expensive. You would need to use ChunkEvent of some kind scan storage and replace blocks. That again - will only replace blocks that are loaded by world (player walks around). And also - VERY DAMN resource-eating. Unless ofc this is your custom block - then you could somehow use the id's in world to load other block. Probably possible. (I don't know much about ID/name relations when world saves to .dat) 1.7.10 is no longer supported by forge, you are on your own.
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.