Jump 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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. You're already using ModelLoader.setCustomModelResourceLocation. The only problem is, this class is client-side-only, which means you need to reference it only through your ClientProxy class. You should also do it inside the ModelRegistryEvent.
  2. Right click anywhere in the Package Explorer window. Build Path -> Configure Build Path. Libraries tab. Add External Jars.
  3. We would like to see the whole main class and the whole class where this line is in order to make sure that it is being called.
  4. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/util/AdvancementUtils.java#L20 Here's an example. It does not point to the same object you're interested in, it just shows how to use ReflectionHelper.
  5. Override Item#getDurabilityForDisplay
  6. Use ReflectionHelper. (Note: The class name is not "avh.f" it's "avh" with a field name of "f", but you don't need Notch names anyway)
  7. You need the SRG name as well. You can get it from MCPbot.
  8. TileEntity has a REGISTRY field that is like all other registries. You will need to use reflection to access it, however.
  9. Oh, you're extending Entity directly. I missed that. Not sure what's preventing you from interacting with it then.
  10. You still need to put any access to FooAPI into another class. The JVM doesn't know at the time that it reads your main mod file from disk that FooAPI will never be accessed, so it goes to check to see if it knows where FooAPI is, won't find it, and will crash. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/FarmingBase.java#L196-L198 I don't know why you're getting the error you are when compiling, though. Did you add FooAPI to your build path in Eclipse?
  11. Well, for one, you have to wrap your API getter in a separate class. If FooAPI isn't available at runtime, Minecraft will crash when it instanciates your main class because FooAPI can't be found. That said, you need to do this in the dependencies section of your build.gradle file: compile files('lib/FooBar.jar')
  12. Jesus christ on a crutch @Override is just an IDE directive, it isn't actually compiled to bytecode
  13. Ah, you're doing something different than what I expected. To answer your question about the shulker box being an anomaly: I would say maybe, but anyone who wants to do the same thing that looks at the shulker box would copy it.
  14. Then you need to not override the method. Overriding a method to do nothing is almost never the correct thing to do. That or call the correct super method...super.readEntityFromNBT
  15. You're reaching across threads here. See the warning: http://mcforge.readthedocs.io/en/latest/networking/simpleimpl/
  16. I am not going to download a random zip file from the internet. Properly host your code somewhere, such as a git repository.
  17. Note that if you do it that way and have an Advancement set to grant the player the recipe, it will throw an error upon world load.
  18. I found two possibilities: Entity#turn(float, float) Entity#setRotation(float, float)
  19. Right click -> References -> Find in workspace -> learn
  20. All of my container blocks use removedByPlayer to drop their contents. This is due to there having been an issue at one point in 1.10 where the TileEntity would have been removed before breakBlock was called, causing either a NPE or an otherwise inaccessible container. In fact, most mods might still be doing it this way because of the default behavior of breakBlock: public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { if (hasTileEntity(state) && !(this instanceof BlockContainer)) { worldIn.removeTileEntity(pos); } } No one uses BlockContainer any more because it's an unnecessary vanilla artifact. Block#getDrops is a bad hook because it's only called by World#destroyBlock which is not invoked during the standard punch/mine/harvest logic, it's called by Entity AI tasks (Wither, Silverfish, Rabbits), the Fill command, buckets (when placing/taking fluids), and a couple of plants (lilypads when a boat collides with them, corous plants and cactus if it can't survive at its current blockpos), etc.
  21. Without the readEntityFromNBT and writeEntityToNBT methods calling super, your entity on the client can't be synchronized with the copy on the server.
  22. Ok, zeroth, NEVER EVER POST CODE AS IMAGES. JESUS. 1) You need to use the RegistryEvents, you can't just shove items into the registry like that. You have to do it at the proper time in the proper way. 2) You can't use ModelLoader.setCustomModelResourceLocation in common code, it is marked as SideOnly(CLIENT) so you must call that through your proxy 3) You aren't even calling registerRenderer anyway
  23. Has to do with the parent class, likely. BlockLog already declared that LOG_AXIS property was a part of the BlockstateContainer and your one messed that up.
  24. Facing of Null is used when no specific direction is involved. Typically referred to as "internal use" but it is not necessarily the case that it's the player accessing it. Could be that the block was broken and is dropping its contents, could be a "peek" mod that opens a container to look at the contents. However, automation (hoppers, etc) should always pass in a non-null side.
  25. You can even create a local variable, but yes.

Important Information

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

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.