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. Post your code.
  2. Draco18s replied to Flight's topic in Modder Support
    Makes your post hard to read.
  3. Cool beans. I was just providing an alternative and the "stuck point" I had when doing it that way (I had almost create a thread because I was pulling my hair out when I found the solution).
  4. Draco18s replied to Flight's topic in Modder Support
    Oh, I don't know. Maybe it was the [ move] tag, or the [ glow] and the multiple colors....
  5. You need to run: gradle.bat build in the command line
  6. waaait really!? awww man that ruined so much of my plans! man this is really confusing stuff... i think il just register blocks for each type and then, how can i use the orientable blocks? like a furnace for example... i want 1 block to have 4 possible directions and to be able to place them within code... You can have more than 16 possible states, they just can't be stored in metadata. It's either taken from the world or taken from the tile entity (using getActualState() )
  7. Why would he want to use capabilities, he is using a TileEntity, not saving data to the player. Note to self capabilities can be tied to TileEntities. Yes, Caps can be on TileEntities. ItemStacks too. The hard part about doing the GUI was this line: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/GuiHandler.java#L37 Because Capabilities aren't inherently IInventory, so it's a little wonky getting the GuiContainer set up correctly.
  8. Alternatively you can override the getAttackSpeed method.
  9. 1) Download forge 2) Set up forge 3) Copy code and make changes to build.gradle You've done #3 before doing #2
  10. Has it occurred to anyone in this thread to use Capabilities instead?
  11. registry name is used as a lookup for the blockstate file. If the registry name is set as "asdfqwer123" then it will look in assets/yourmodid/blockstates/ for a file named "asdfqwer1234.json"
  12. The slot bounds problem is in the transferStackInSlot method.
  13. Jesus... Why you do this? ;_;
  14. Only override a method if you plan on DOING something with it.
  15. Running in Eclipse is fine. Building a jar you must use gradle.
  16. Probably will still render the mob being on fire, it will just give no shits. (ZombiePigs and Blazes still render being on fire--say, by being in lava--they just don't take damage)
  17. You need to create the variant: public static final PropertyEnum<BlockPlanks.EnumType> VARIANT = PropertyEnum.<BlockPlanks.EnumType>create("variant", BlockPlanks.EnumType.class); Register it by overriding protected BlockStateContainer createBlockState() And finally translate between the states and meta by overriding public IBlockState getStateFromMeta(int meta) and public int getMetaFromState(IBlockState state) Do note that you're still limited to 16 possible values for metadata. Blockstates aren't magic.
  18. Good luck covering every possible way it can leave your inventory. (Hint: itemframes)
  19. Actually it would be: }, "variants": { "variant": { "oak": { "model": "oak_planks" "textures": { "texture": "blocks/planks_oak" } }, The variant name (in this case "variant" because of the string passed to PropertyEnum.<BlockPlanks.EnumType>create("variant", BlockPlanks.EnumType.class); ) creates a block, inside which you list all the variants associated with it. Notice how "mossy" had a top-level block that contained both "true" and "false." Of course, you should give your variant a better than than "variant" such as "wood_type." I've got a two-property example here: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/blockstates/axel.json Though my enums are set up differently. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/blockproperties/Props.java#L70 IMetaLookup being a custom interface to supply cleaner meta->enum and enum->meta conversions (there is no need for a META_LOOKUP array: Enum.values() already exists, as well as Enum#ordinal()
  20. Aaah, that's what that is. Alright. I do agree that it's cleaner alright! Didn't work for me cause I'm on Java 7 still, not 8, so it doesn't have that feature (ditto lambdas).
  21. Step 1: Extend EntityMinecart Step 2: Register it as normal Step 3: Register a renderer for it as normal
  22. Does not appear that your workspace was set up correctly.
  23. Or a lambda. Or a method reference (which gives the cleanest code I think). How does the method reference version look? I had a devil of a time constructing the anonymous class correctly (and then felt like an idiot afterwards).

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.