Skip to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Choonster

Moderators
  • Joined

  • Last visited

Everything posted by Choonster

  1. The OP is using 1.8.9, where the Forge and FML event buses have been merged. Anything that was fired on the FML bus is now fired on the Forge bus.
  2. Are there any errors in either of the logs? Upload them both to Gist and link them here. Try stepping through SoundManager#playSound like I suggested to the OP.
  3. The sounds.json format hasn't changed much in 1.9 except for the addition of the "voice" category for sounds and the need to include the resource domain for sound file paths and sound event names in the "sounds" array of sound events. This page explains the format. Each value in the top-level object is a sound event, you can register a SoundEvent for each one of these to play one of their sound files. The values in the "sounds" array of each sound event are either the path of a sound file as a string (e.g. "tetracraft:entity/terrakon/bark1" ) or an object with its "name" property set to the path of a sound file or the name of another sound event. This object can also contain various other properties, see the wiki page I linked for more details.
  4. The sound name passed to the SoundEvent constructor is the name of a sound event in your sounds.json file (i.e. the keys of the top-level object), not the name of a sound file. In your case, tetracraft:mob.terrakon.bark is the name to use for the first sound.
  5. I would highly recommend using an actual IDE with a graphical debugger like IDEA or Eclipse, it will make debugging your code a lot easier. The log4j configuration is stored in the log4j2.xml file in the forgeSrc JAR. You can copy this file into src/main/resources and add this tag in the <Loggers> tag, between <Logger level="info" name="net.minecraft" additivity="false">...</Logger> and <Root level="all">...</Root> : <Logger level="all" name="net.minecraft" additivity="false"> <AppenderRef ref="FmlSysOut" level="INFO"/> <AppenderRef ref="ServerGuiConsole" level="INFO"/> <AppenderRef ref="FmlFile"/> </Logger> You can read more about configuring Log4j 2 here. This will override Forge's configuration completely. Ideally you'd exclude this file from your built mod, but I haven't worked out how to have Gradle do that yet. Now that I look at your latest.log, I can see there's a JsonSyntaxException being thrown from SoundHandler because your sounds.json was malformed.
  6. MCPBot tells me that EntityLivingBase#addRandomArmor ( func_82164_bB ) was renamed to EntityLivingBase#addRandomDrop on 2015-02-02 (in 1.. It still has this name in 1.8.9, but the method was removed in 1.9.
  7. The event is fired once per hand per side.
  8. It looks like SoundManager isn't writing to the FML log due to the log4j configuration, so the DEBUG level messages that are logged when sounds are played are discarded. Set a breakpoint in SoundManager#playSound and step through it when you play the sound. Does it play the sound or skip it?
  9. You actually need to copy the motion and pickup delay from the old Entity when you spawn the invulnerable one. You can see my implementation here.
  10. The default resource directory is src/main/resources. Have you configured this to be src/resources? Aside from that, your code looks correct. Was there anything in the FML log that wasn't in the console (i.e. anything logged below the INFO level)?
  11. RenderItem#renderQuads uses the quad's tint index to get the colour from ItemColors (i.e. the IItemColor registered for the Item ). If anaglyph mode is enabled, TextureUtil.anaglyphColor is used to translate the colour into an anaglyph colour. I don't know enough about the rendering system to say what happens when a colour is applied to a quad without a texture.
  12. There don't seem to be any errors in the log, I'm not too sure what's going wrong.
  13. The tint index is passed to IBlockColor / IItemColor so they know which part of the model is being coloured and can return the appropriate colour based on that. I believe the TextureAtlasSprite is a location on the block texture sheet to render on the quad (i.e. the quad's texture).
  14. Create a class that extends EntityItem and overrides isEntityInvulnerable to return true . This makes the item entity immune to all damage. In your Item class, override the following methods: Item#hasCustomEntity to return true Item#createEntity to create an instance of your EntityItem class with the specified location and ItemStack Item#getEntityLifespan to return Integer.MAX_VALUE This will spawn an invulnerable EntityItem with a lifespan of 2^31-1 ticks or approximately 3.4 years. If you want an item that actually never expires, you'll need to override EntityItem#onUpdate to do exactly the same thing as the existing method and its super method but not check the age/lifespan.
  15. Have you definitely got the built JAR in the server's mods folder? If you open the built JAR in an archive viewer (e.g. 7-Zip) or Java decompiler (e.g. Bytecode Viewer), are all of your compiled classes present? Does the FML log (logs/fml-server-latest.log) mention your mod? If you're not sure, upload it to Gist and link it here. In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting rather than posting screenshots. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
  16. Are there any errors in the log? Upload the full FML log (logs/fml-client-latest.log) to Gist and link it here.
  17. What you've posted should work in 1.8.
  18. The ItemCameraTransforms.TransformType enum describes the valid transform types for items. HEAD is used to render the item on entity heads, GROUND is used to render the item as an EntityItem and FIXED is used to render the item in item frames.
  19. Like I said, what diesieben07 is talking about doesn't exist in 1.8. It was added in 1.8.9. This is how I register the Render for my arrow entity in 1.8.9. This uses Java 8's method references, you'd use an anonymous class instead if you were targeting Java 6/7. This is how I register it in 1.8.
  20. The OP is still using 1.8 rather than 1.8.9, so IRenderFactory and the corresponding registration don't exist for them. I would suggest updating to 1.8.9 or 1.9 and using the method diesieben07 mentioned.
  21. The new stacktrace confirmed that it's caused by not being able to find the model file rather than being caused by something like a syntax error within it. However, I'm not too sure why it's not loading any of your assets. You could try exiting IDEA, deleting your project by running gradlew cleanIdea from the command line and then re-importing build.gradle into IDEA; though I can't guarantee that this will fix anything. You may not always be able to find tutorials for the latest version of Minecraft since they're just written by random members of the community. 1.9 is still quite new, so it may take a while for new tutorials to be made and old ones to be updated. A lot of core concepts have remained the same across many versions of Minecraft, so even older tutorials may still partially work. 1.8 introduced the model system for blocks and items, it's still mostly similar in 1.9. The registry system has been overhauled in recent 1.9 versions of Forge, but it looks like you're already using the new system. You can find Forge's official documentation here. This isn't a comprehensive guide to every part of Minecraft/Forge, but it does cover a few of the major concepts. Sometimes you just have to read through the Minecraft/Forge code to figure out how various parts of it work.
  22. What diesieben07 said is correct, but I suspect it may not be the cause of this particular error. Forge improved the error reporting for item model loading in 1.9-12.16.0.1837-1.9 (this commit), update to the latest version of Forge and post the new error.
  23. It sounds like you're using a static field instead of an instance field. We can't do much more than guess without seeing your code. If you want more help, upload the TileEntity class to Gist/Pastebin with syntax highlighting and link it here.

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.