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. That's not the point. You want to know how to compare a list of items (a shapeless recipe) to another list of items (what's in the container) in order to generate a result. JSON files are just data, you already have data. What you want is the operational code that operates on the data: the code that is in ShapelessRecipie.java
  2. Look at how shapeless recipes work for that part.
  3. If you want a block to pick up dropped items, look at the Hopper.
  4. "type": "minecraft:crafting_shaped",
  5. No, they do. They'd have to.
  6. Game Ticks != Render Ticks
  7. ...what?
  8. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/OresBase.java#L335 https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/client/ClientProxy.java#L96-L130 https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/client/ProspectorParticle.java
  9. This used to be a public value and now it's private. There should be a getter function, if not, you can use reflection. The type changed from one version to another when ItemStacks were made to never be allowed to be null (instead using .isEmpty() so that zero-size stacks weren't treated as items, but rather nothing). You'll need to update your code to match the new system.
  10. Your command class should not even compile, if it is what you've posted. That said, this is just flat wrong.
  11. You should not be using NBT for runtime data.
  12. Probably not.
  13. this muchAs you're coming from 1.7, my registration method may be of interst to you. Take these two files: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/EasyRegistry.java https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java Set them as the common proxy/client proxy of a library mod (just need this much and this line), update the references to HardLib to point to your own lib main class. And you're good to go. You just call it like this. There's other variant registry methods too, e.g. blocks with no item (cake), items, blocks with custom items (when you need to subclass ItemBlock), items with custom mesh definitions (nbt-driven models), custom state mappers (where you want properties on your blocks but want to handle the blockstate stuff differently than standard, an example: 2D_ITEM isn't in the blockstate, and FLOWER_STALK actually changes the blockstate file entirely). But largely speaking you won't be using those variations much. registerBlockWithItem, registerBlockWithCustomItem, registerItem are the main three you'll be using. If you want to understand how the registry system works, look for the registry events within the two EasyRegistry classes.
  14. Cough. There's also scheduled block ticks. Which is what redstone uses. And TEs are not always ticking. You can have non-ticking TEs.
  15. Rename the file Jar files *are* zip files, as long as the information inside the compressed file is correct (compiled class code), it should load.
  16. Ah, you're using the horizontal facing. s/BlockDirectional.FACING/FACING Also: public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL); You can just use BlockHorizontal.FACING, rather than creating a new property.
  17. private String name; private EnumQuality quality; private int tier; private float attackSpeed; private float attackDamageMin; private float attackDamageMax; private float attackDamage; private boolean hasCriticalDamage = false; private float criticalDamageChance; private float criticalDamageValue; private float criticalDamage; private boolean hasLore = false; private String lore; Items are singletons, you can't do this. private String bold = "\u00A7l"; private String italic = "\u00A7o"; private String reset = "\u00A7r"; Seriously? TextFormatting, use it.
  18. .getMetaFromState(state) No. Bad modder. EnumFacing facing = state.getValue(BlockDirectional.FACING)
  19. Please don't wrap your posts in a code box
  20. The closest I've ever come to doing something like this, I used particle effects. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/client/ProspectorParticle.java
  21. This is because EntityPlayer checks for if(item == Items.ELYTRA) You will never get this to work the way you want.

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.