Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Why did you create an ItemBlock map when you could just have a block map then when registering create the instance. Look at my block tutorial if you want i do something similar.
  2. There is no direct way of saving BlockEvents or any class like that, because it is not a base field like ints and doubles are. You will have to save the data yourself. Meaning you need the blocks registryName, any blockstate information ie metadata or its properties, the position, and the type of event. Use WorldSavedData to save it to the world or alternatively an event for when the world loads/saves or capabilites for players.
  3. Grab the blockstate and handle the data from that or in some cases where they override getStateFromMeta you could just write the meta then use that method to grab the correct blockstate.
  4. You only need to save the pertinent data(the block, the position and whether it is breaking or placing the block) which means you need to write that data to a text file or some other type of file then parse the fata when loading.
  5. Yes there is, but it will not work for the player inventory, or at least not how you expect. As far as the server is concerned you are always interacting with a Container, if it's not a chest or something you are interacting with the inventory container. The server does not actually have any idea whether you are currently actually looking at the inventory screen or not. That is actually good to know, thanks for the information.
  6. You would not override the EntityPlayer class you would need to use Capabilities and subscribe to the RenderPlayerEvent.Pre (i think it would be Pre) and override the rendering there.
  7. I believe there is a OpenContainerEvent or similar name same function. *Edit You can not use OpenContainerEvent as for why Diesieben explains just below this.
  8. You should post updated code and the log if there are any errors.
  9. First off wrong forum for this as it would not use forge and 1.7 is no longer supported on this forum.
  10. I always open the jar file to look at them and have extracted them from timw to time using winrar or 7-zip
  11. 1) I will look into removing the long decimals after I can 2 to stop happening. 2) Minecraft no longer loads, I should have been more clear sorry about that. 3) I will make the mod in 1.10 but I want to get the basic features of my down first before I start porting to new versions, this means play testing with other mods and the version that I play right now is 1.8.9 because haven't had the time to go though what mods I need to have and update. Minecraft no longer starts...how do we help if we do not have the crash report?
  12. Since I've tried setting the motion and all that in the constructor and it didn't work (or at least I don't know how to make it work), could you please explain to me how I would manually save and load the entity from NBT to and from the world (to achieve basically the same thing as the registration does, just without the whole 'setting up the motion and fixing the weird teleportation glitch' shenanigans). Also where and how would you set the basic motion to correct this? Because I've tried overriding the dropBlockAsItemWithChance and implementing my own version of spawnAsEntity where I only changed the entity construction invocation, and I also tried copying the motion formation code from several sources and placing it in createNewEntity in my custom item class and nothing worked. Does your EntityItem extend EntityItem?
  13. Did you override getUpdatePacket(...) and handleUpdatePacket(...) or something like that.
  14. You need to sync the inventory using markDirty() meaning call markDirty() after removing/adding the item.
  15. 1.7 is no longer supported here, once a moderator sees this thread it will be locked and you will be asked to update, so just update.
  16. I beleive you want to copy the motion of the entity aswell as the positions.
  17. You will have to render it yourself then using RenderPlayerEvent.Pre
  18. Do you want to replace all coal ore o just some coal ore?
  19. Look at what getting hit by a spectral arrow does then only do that client side on the client you want. Or you could just manually draw the same effect when your condition is met.
  20. You shoudl be using ModelLoader.setCustomModelResourceLocation(...) instead of the ItemModelMesher.register(...) and it belongs in preInit.
  21. Add an inventory tag ie "inventory": "modid:texture location"
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.