Jump to content

Choonster

Moderators
  • Posts

    5160
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Choonster

  1. EntityEvent.EntityConstructing is fired from the Entity constructor, which is called before the EntityPlayer constructor sets the Entity#entityUniqueID field to the player's UUID .
  2. Both of the examples I provided use a single blockstates JSON for all the mod's fluids. Each variant is a single fluid.
  3. You also need to use the forge:fluid model in your blockstates file with the fluid name in the custom data section provided by the Forge blockstates format. You can see examples of this in Forge here (blockstates file) and my mod here (blockstates file). Note that the MeshDefinitionFix interface in my mod is just a workaround that allows a lambda to be used as an ItemMeshDefinition (ForgeGradle doesn't know how to reobfuscate lambdas properly), you can also use an anonymous class like in Forge's example.
  4. I haven't used IDEA's artifacts before, but I don't think they're compiled with the Gradle build task; so they're not reobfuscated by ForgeGradle. You need to run the build task from the command line or IDEA's Gradle window, which will compile and reobfuscate the mod and output it to build/libs.
  5. Applaud increases the poster's karma, the Thank You button in the top right of a post displays the thanks under the post.
  6. Are you compiling it with gradlew build (or running the build task through IDEA's Gradle window)? This reobfuscates the mod after compiling it, so setUnlocalizedName is renamed to the appropriate SRG name (the names used outside of the development environment).
  7. This does appear to be a vanilla bug. On the client, PlayerControllerMP#onPlayerDestroyBlock calls Block#removedByPlayer (which sets the block to air) before calling ItemStack#onBlockDestroyed (which ItemTool calls Block#getBlockHardness from). On the server, ItemInWorldManager#tryHarvestBlock calls ItemStack#onBlockDestroyed before calling Block#removedByPlayer . This means that the block still exists on the server when Item#onBlockDestroyed is called; but it's already been set to air on the client.
  8. The "x" and "y" values are the rotation around the x and y axes, respectively. This wiki page explains the vanilla blockstates and block/item model formats. For blocks with many combinations of properties, you may want to use Forge's blockstates format which is explained here. This allows you to specify what effect each value has on the model and combine multiple models.
  9. The direct damage of the Large Fireball is hardcoded at 6.0 in EntityLargeFireball#onImpact , but the explosion power is controlled by the public EntityLargeFireball#explosionPower field. If you want it to deal a different amount of damage, extend EntityLargeFireball and override onImpact to do the same thing as EntityLargeFireball#onImpact but deal the appropriate amount of damage instead of 6.0.
  10. Using the latest snapshot of ForgeGradle instead of the 2.0.1 stable version may help, since the snapshot includes a recent fix that correctly builds Minecraft with debug information which was previously missing. To switch to the snapshot, follow the instructions in the comments at the top of build.gradle (you may need to download a recent MDK version and copy the code from its build.gradle if you deleted the comments from yours).
  11. All events in the net.minecraftforge.fml.common.gameevent package are fired on the FML bus ( FMLCommonHandler.instance().bus() ) rather than the Forge bus ( MinecraftForge.EVENT_BUS ). Event handlers only work if they're registered with the right bus.
  12. Have you registered your event handler with the appropriate event bus (the FML bus in this case)?
  13. Just get the player's position ( Entity#getPosition or Entity#posX / posY / posZ ) and add a random offset ( Random#nextInt ) on each axis.
  14. One of your mods has added an item ( WeightedRandomChestContent ) to the loot table for the dungeon chest with the minimum quantity set higher than the maximum quantity. You'll have to remove any mods that add dungeon loot one-by-one until you can find the one causing the issue. You could use an IDE's debugger to find the item with the invalid values, but that won't be very easy to do unless you have programming experience. In future, please post logs (and code) using a paste site like Pastebin or Gist.
  15. Unfortunately none of the scenarios you listed have events, but there are some workarounds and related events listed below. As an example of a possible alternative: Immersive Engineering's Lightning Rod doesn't actually detect lightning strikes, it just checks if there's a thunderstorm and spawns a lightning bolt that hits the net of the Lightning Rod. EntityJoinWorld will fire when any entity joins the world (this includes newly spawned entities and entities in chunks that have just been loaded). If it's an instance of EntityAnimal , Entity#isChild will return true for any child. If it's an instance of EntitityAgeable , EntityAgeable#getGrowingAge will return -24000 for brand new children (the growing age is incremented/decremented towards 0 each tick). Use PlayerTickEvent to check the height of the player ( Entity#posY ). This is fired once per player per tick on each side. Use WorldTickEvent to check the world time ( World#getWorldTime ) each tick. This is fired once per world (dimension) per tick on each side. If you only care about one dimension (e.g. The Overworld), you may want to use ServerTickEvent instead. This is fired once per tick on the server.
  16. If you're using IntelliJ IDEA and none of your resources are working in the development environment (but they are working in the release/obfuscated environment), you need to add the following code to your build.gradle (source): idea.module.inheritOutputDirs = true If this isn't the case, I'm not sure what your issue is.
  17. You're trying to access a field or call a method of a null value on line 115 of JavaGetUrl , which causes Java to throw a NullPointerException . The message of the exception isn't relevant in this case, only the type and stack trace tell you what went wrong. is is null , probably because URL#openStream threw an exception. You should check if it's null before trying to call close on it. You may also want to use a try-with-resources statement to auto-close your InputStream .
  18. As far as I can see, there's no specific Entity method that's called when the entity is unloaded. Entity#setDead will be called, but that's also called any other time the entity is killed/removed (e.g. if it falls out of the world or is killed with /kill ). Is there a specific reason you need this?
  19. One of your mods has added an item ( WeightedRandomChestContent ) to the loot table for the dungeon chest with the minimum quantity set higher than the maximum quantity. You'll have to remove any mods that add dungeon loot one-by-one until you can find the one causing the issue. You could use an IDE's debugger to find the item with the invalid values, but that won't be very easy to do unless you have programming experience.
  20. PART is a PropertyEnum of EnumPartType , but you're trying to assign an int value to it ( this.part ).
  21. If you look at the stacktrace, it's being called from PlayerControllerMP#onPlayerDestroyBlock ; so it's likely the block's breaking sound that's causing the issue. Updating ForgeGradle or following my previous debugging instructions should provide further information as to what the issue is.
  22. RenderGlobal#playAusSFX (called from World#playAuxSFXAtEntity ) is throwing an exception, but a NullPointerException was thrown while generating the crash report. Put a breakpoint in the catch block of World#playAuxSFXAtEntity and run Minecraft in debug mode. When it hits the breakpoint, the throwable variable will contain the exception that was thrown.
  23. 3.4028235E37F is equivalent to Float.MAX_VALUE / 10 , so multiplying it by 10.0F produces Float.MAX_VALUE . Anything larger than that would overflow. I'm not entirely sure why it's multiplied by 10 before rounding to an integer or why it doesn't use a double instead of a float to store the pre-rounded value.
  24. I meant post the crash report, though having the code on Gist makes it a bit easier to read. The exception type and stack trace should tell you what went wrong even if the message doesn't.
  25. The crash report should tell you exactly what went wrong. If you can't figure it out, upload it to Gist and link it here.
×
×
  • Create New...

Important Information

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