Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by DavidM

  1. I can't figure out how to quote on mobile so this post may be a formatting mess. Tile entities do create a bigger performance impact than regular blocks, but not significant enough to worry about. Yes, ticking the TEs every tick will lag a bit if you have tenth of thousands of it, but a roomful probably won't cause problems. As for checking for blocks above the block, your way of using a for loop to check should be the best way. Ray tracing is way more expensive than a for loop.
  2. Check out what property vanilla Minecraft passed in and alter the values to your need.
  3. IIRC LivingDeathEvent do trigger on the client side (unless you are using 1.14, in which case the client trigger of some events are not added yet).
  4. Use packets to sync tile entity’s data from server to client. I would suggest making a TileEntityRenderer and do the rendering of cables there. Each tile entity would only renders its cables, therefore making another storage of cables unnecessary.
  5. You can simulate what ray tracing does on the server side. You can also obtain the position of the two players and the pitch and yaw of the defending player, then do some trigonometry to figure out if the defending player is looking in the direction of the attacker.
  6. Most Java IDEs that support gradle should work.
  7. For future reference, an instance of Event will have all the relevant information stored in it. You can use your IDE to look at all the information stored in it.
  8. Or your could create a tile entity that pushes living entities above it every tick.
  9. Unless the mod is very large and has complicated structure, rewriting is probably better than porting from 1.7.10. IIRC Superhero Unlimited only adds a few armors and tools, so I would really suggest just start the mod over instead of porting it to 1.14.
  10. 1. A variable and a field aren’t really the same thing. 2. You have to override Item#onItemRightClick and do your ray tracing and summon the lightning there. Although at this point I would suggest to stop modding and learn Java first. Modding is programming in Java. Your current problems will be easily solved if you learn Java first, and continuing to mod without learning Java will just make you more confused.
  11. You can’t just create a new player. The player in your code refers to the player who is right clicking with your item. I am very doubtful that tutorials did that, as creating a new instance of EntityPlayer will not work. You cannot just create a new instance of EntityPlayer and expect it to refer to the player you want.
  12. All those code are not necessary. Just use ray tracing normally.
  13. This would cause all sorts of problems like integration with other mods. The register method is not meant to be used like this. The one and only proper method of registering stuff is via the registry events.
  14. You are not using 2838. From your log:
  15. In 1.7.10 you need to craft an iron-capped wand with iron caps and a stick; I suppose that is what you meant by “apprentice wand”. In 1.12.2 wands are replaced by casting gauntlets. Start the mod by crafting salis mundane and applying it on a bookshelf. As for Flan not showing up, I suspect that the mod isn’t installed properly. Please provide your debug.log as instructed in the EAQ.
  16. You are not. You are not using the Forge version specified by your version of Pixelmon. Pixelmon only works on specific Forge versions. Pixelmon Reforged 7.0.7 requires Forge 2838.
  17. You can look up how threading works in Java and the common design pattern when using threading.
  18. Hey you are back. IIRC knockback is applied in LivingHurtEvent.
  19. It may be added by an addon mod. I’m pretty sure there is no such thing called “apprentice wand” in vanilla thaumcraft.
  20. World#getTotalWorldTime (or something similar; can’t remember the spelling) returns the current world time. Modulo the total world time by 2 (or more if you would like the delay between triggers to be longer) and check if the result is equal to 0. Use packets to send data from server to client.
  21. Are you trying to register registries or blocks and items? For registering registries, on calling RegistryBuilder#create, the registry is automatically built and registered by Forge. For registering blocks and items, subscribe to the according RegistryEvent.Register and register your stuff with Register#register.
  22. Do not hijack other’s thread. Please make your own thread.
  23. In order to load mods in a deobf environment, you need to use the deobf version of mods. I’m not sure whether Optifine has a deobfuscated version though.
  24. Thaumcraft disables the player’s ability of looking up certain recipes via JEI until the player unlock such recipes via thaumcraft’s custom progression line.
×
×
  • Create New...

Important Information

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