Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Modding is not a good way to learn Java. The problem is that you used Minecraft.getMinecraft().player instead of using the EntityPlayer parameter you are given.
  2. Yes though unless the underline is red it doesn't matter. You only need to add the ObjectHolder/Field if you need to access the field.
  3. You should use ChunkEvent.Load/Unload. Save and load are meant to deal specifically with data.
  4. @EventBusSubscriber(bus=Bus.MOD, modid="modid") public class EntityTypes { @ObjectHolder("modid:red") public static final EntityType RED = null; @SubscribeEvent public static void registerEntities(Register<EntityType<?>> event) { event.getRegistry().registerAll( EntityType.Builder.create(RedEntity::new, EntityClassification.CREATURE).build(Reference.MOD_ID + ".red").setRegistryName("red") ); } } That's more or less what it should look like.
  5. It might be a little tricky. What you'll have to do is set a flag(probably an integer) store it somewhere like the player. Set it to 0 when the player enters the dimension and spawn entities in one of the chunk loading events.
  6. Your velocity is way to high. That's 10-20 blocks per tick.
  7. Uhh no, as it turns out recipes are no longer a forge registry or at least not yet, There are recipe conditions which should let you disable the recipe based on config options. Choonster explains how to something similar to this here.
  8. You can remove them from the forge registry it is one of the modifiable ones.
  9. Here is one. Items and Blocks are registered at the beginning of Minecraft/Forge launching. Now if you had that based off of config values certain items would register and certain items wouldn't. Now imagine a player trying to connect to a server who has a set up config file. One that is different from his. Disabling certain items. What do you think would happen. The player would not be able to connect because the Item/Block registries are different.
  10. Then you will also have to do something else like when a chunk is loaded and by extension TileEntities remove them from their exposed IItemHandler capability. You'll also want to insert in Item#inventoryTick them removing themselves from the players inventory.And if Item#inventoryTick doesn't work you'll have to use the PlayerTickEvent.
  11. Yeah there are now many methods with different parameters. Could have been that those methods hadn't been mapped.
  12. Yes, but it doesnt stop getting called until its let go. Or it's being "used" like a bow. @madmagic Take a look at ItemBow.
  13. Yes I understand that, my idea was maybe they added a Field to the LivingDamageEvent that contained the value or something related, its unlikely. Also do you know if this event is pushed before the EntityLiving#ticksSinceLastSwing is reset to 0. Because if it isnt then EntityPlayer#getCooledAttackStrength wont work.
  14. This is the way it was expected to be in older versions too, but you didnt have to use the method that required it to be 256x256. You'll notice that all Minecraft gui assets are 256x256.
  15. Sweeping edge happens earlier in the execution order. Now maybe you can use LivingDamageEvent(I think that is the name) which might be early enough in the execution, maybe it even has a field that tells you about the cool down I'm not sure, but worth a try.
  16. Can you explain more on what your exact problem is? I told you that entity gui/containers function the same as TileEntity ones. The only difference is you have an Entity instead of a TileEntity.
×
×
  • Create New...

Important Information

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