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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Oh? Since what version?
  2. Watch out for SideOnly(CLIENT), I believe getSubItems is client side only (as it is only used for the creative inventory). Instead use: BlockStateContainer bsc = block.getBlockState(); ImmutableList<IBlockState> values = bsc.getValidStates(); That will result in a list of IBlockStates that you can then ask for a pickBlock item.
  3. IInventory is only for vanilla containers. That won't work with mods.
  4. Remove tile entity does not do what you want, in any way, shape, or form. You want to remove an item from a tile entity's inventory? Use getCapability() to get its inventory and remove the item from the IItemStackHandler instance.
  5. if(ladderState.GetValue(FACING) == EnumFacing.NORTH) { // do stuff } if(cropState.GetValue(AGE) > 5) { // do stuff } repeaterState = repeaterState.WithProperty(DELAY, 2);
  6. Yes, the original poster had that function overridden and returning the proper value already.
  7. It does. It's just that that array gets tossed and a new one is created by toArray()
  8. Nope: https://www.tutorialspoint.com/java/util/arraylist_toarray.htm
  9. Alot is better than you at everything
  10. @Override public boolean isOpaqueCube(IBlockState state) { return false; } @Override public boolean isFullCube(IBlockState state) { return false; }
  11. Add an exclude entry for it. *Shrug*
  12. Change the path here to point at your file: https://github.com/Draco18s/ReasonableRealism/blob/master/build.gradle#L99
  13. Mobs are still "Java" format. That hasn't changed yet.
  14. One of the files is locked and can't be edited. Its in use (or incorrectly locked). As for your files, you need to tell the build task where to take the files from and where to put them. It's not automagic.
  15. You could. But you'd have to put them in subfolders, because otherwise you would have multiple files with the same name in the same directory. gradlew build fullBuild or gradlew build terrakonCraftJar or gradlew build eCoreJar
  16. Define "doesn't work."
  17. In addition to what D7 said, if you're interacting with other parts of another mod... You need to do 2 things: 1) Put all of the "I need to reference that other mod" code in a separate class 2) Only load that class inside an if(Loader.isModLoaded("id_of_mod")) check. eg: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/FarmingBase.java#L154-L156 (and the code it references: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/integration/IndustryIntegration.java ) If you're dealing with items and blocks, you can use @ObjectHolder annotations to get those items/blocks from the registries (just check that they're not-null before using them, additionally an if(Loader.isModLoaded("id_of_mod")) check could be useful). see: http://mcforge.readthedocs.io/en/latest/concepts/registries/#injecting-registry-values-into-fields For conditionally hiding your items: you control the getSubItems method. Use an if(Loader.isModLoaded("id_of_mod")) check to either add your item(s) to the creative tab, or not. You can also use conditional recipes to control whether your items can be crafted.
  18. I created a folder (called etc/) that I then created subfolders for and used those...let me grab how that works... https://github.com/Draco18s/ReasonableRealism/blob/master/build.gradle#L99-L102 I never included the etc/ folder on my repo, but you should be able to work that part out yourself:
  19. Not use a static initializer? Seriously, control the order your code gets executed in. You HAVE to insure that your blocks get created before your items. The only way to do this is to explicitly invoke the initializers yourself.
  20. Because your blocks and items are created in static initializer blocks, your item is being created before your block, so ModBlocks.CROPCORN is null at this point.
  21. This looks fine, let me go see where this item is created... Uh...
  22. First: http://shouldiblamecaching.com/ Second: Go to the Eclipse marketplace and download the JSON Editor plugin. Edit your JSON files inside Eclipse, then Eclipse will know that they've changed.
  23. The problem is that the client doesn't know what the contents of a chest are until the player opens it.

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.