Jump to content

shieldbug1

Forge Modder
  • Posts

    404
  • Joined

  • Last visited

Everything posted by shieldbug1

  1. Have you tried just lowering the percentage chance of each spawn?
  2. Sorry, I misread. Blocks shouldn't get replaced when you ADD blocks to an existing world, only when creating a new world. Are there any messages when you run it with the new blocks in console?
  3. You need to register during the pre-initialisation stage.
  4. The search never really worked here anyway. It shows you posts from super long ago when someone posted something with exactly what you typed a few days ago.
  5. First of all, don't ever use @SideOnly. Secondly, there is a method to play sounds at a radius in the world class. I don't have my IDE open right now, but I'm sure you can find it with some looking.
  6. Yes. You would create your own entity, with it's own inventory, AI, etc.
  7. That's definitely not what the fake player class is for. Fake players can't move at all. Think of them as 'player accessors'.
  8. It's not that bad if you have some time on your hands, honestly. I've been doing it to test and it's not that bad, especially if you call setPrettyPrinting for the serialiser.
  9. The reason I'm using Json is because it's supposed to also be easily modified by an average user outside of the game. I'll go give what you suggested a go and see what I can manage, and post here again if I need any help. Thanks.
  10. I have a Schematic class that allows me to have easier generation of things, that gets serialised using Json. I'm using GameData.getBlockRegistry().getNameForObject(block); to get the names ("minecraft:grass" for example), and Block.getBlockFromName(name); to get the block back. Is this the suggested way to save blocks (to allow for transfer between worlds)? Also, as a side note, is there any way to set multiple blocks at once? Because otherwise, setting blocks in a 3d plane takes O(n^3) time at best, and Minecraft doesn't support multithreaded world 'block setting' (or multithreaded anything, to be honest).
  11. You can try the WorldEvent.Unload maybe. When a player 'exits' the world also unloads.
  12. You have to use the srg name. You can find them in the gradle cache. Also, you should the ReflectionHelper class, it makes code a lot cleaner. For example: try { Field field = SomeClass.class.getDeclaredField("someField"); field.setAccessible(true); Object value = field.get(someClassInstance); } catch (ReflectiveOperationException e) { //Repeat with srg name } Turns to: Object value = ReflectionHelper.getPrivateValue(SomClass.class, someClassInstance, "someField", "srgName");
  13. Looking at the the entities code, it seems like you should be able to simple call Entity#travelToDimension(int dimensionID).
  14. Don't subclass the events. @SubscribeEvent public void onPlayerTick(TickEvent.PlayerTickEvent event) { if(event.side.isServer() && event.phase.equals(TickEvent.Phase.START)) { //DO STUFF } }
  15. Some mods are server-only, but most mods require being installed on the client too. It's different for each mod.
  16. I don't think there is an event for that. Block updates are handled inside the relevant block classes themselves.
  17. I think getOres returns a list. You'll have to iterate through it and add a recipe for each ore.
  18. I haven't looked at it, but I'd assume that's just the way of differentiating between the values and the recipe itself (probably with instanceof checks against char and String respectively). If you mean what the difference between double and single quotes is, that is a Java question.
  19. Try adding the spaces to the last "s" " s " "sss" " s " //INSTEAD OF " s " "sss" "s"
  20. I'm afraid the images aren't loading for me. Could you describe the problem?
  21. Use the LivingUpdateEvent. If the entity is a zombie, then check Entity#isBurning() and use Entity#extinguish(). That should work.
  22. Where do you register your packets?
  23. Are you sending any packets by chance? If so, show us your packet (IMessage) code, please.
  24. Java 8 is supported and has been for at least a month. Update your forge.
×
×
  • Create New...

Important Information

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