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. Blocks do not update every tick. That's not how that function works. tickRate() does fuckall unless you call it yourself.
  2. IRecipe implementations do not show in the recipe book, json recipe assets do.
  3. That was the point of my post.
  4. Two ways: 1) lower the light brights (ie 12 instead of 15) 2) move the light block less often (eg when the player moves 4 blocks away from it)
  5. @diesieben07 Ran into this article recently about exceptions. May be worth linking to in the common problems list.
  6. No they aren't. Don't have a dev environment set up, but this is from the MCPbot exports:
  7. Forge states are good for things like Fences, which have 4 different on-off properties. Vanilla format has to list out each one (so, 16 entries) whereas with Forge you can list out 4 and Forge will do the heavy lifting. For example, this block I have: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/expindustry/blockstates/machine_foundry.json#L18-L33 With a vanilla state file I'd have to list out all 8 combinations manually: north {rotation}, lit {submodel} north {rotation}, unlit east {rotation}, lit {submodel} east {rotation}, unlit west {rotation}, lit {submodel} west {rotation}, unlit south {rotation}, lit {submodel} south {rotation}, unlit Look at how many times the {submodel} had to be retyped! And each rotation had to be specified twice as well.
  8. 1) Items starts with a capital letter. 2) You need to import net.minecraft.init.Items before you can use it. 3) The blocks' and items' fields are named in ALL CAPS.
  9. ItemBase (and BlockBase) are an antipattern. https://github.com/tamirco2003/temporary-modding/blob/master/java/my/ghost20000/first/item/ItemBase.java Do this like the block tutorial does: this.setUnlocalizedName(this.getRegistryName()) Ditto here.
  10. Every block paramter is passed a World object and a BlockPos position argument (or three ints, x, y, and z). Get the neighbors and check their blockstate against the current one. And if you're on a version that passes x,y, and z, update. Because BlockIDs are not a thing you should touch.
  11. MARBLE.getRegistryName() + "_black", "black")); You're telling it to look for a different file every time. Drop that "_color" bit. Also, read your logs.
  12. Don't assign to a field that is marked with @ObjectHolder.
  13. Because you can't control when it executes and Forge may not have done all the things it needs to for the Registries, so your item is missing a key bit of information and won't register correctly.
  14. Someone's been watching Sword Art Online season 3. ?
  15. Its specific to my project setup. I have multiple mods in the same workspace (they all work together, so there's no reason to run them separately except to make sure that they can) so the excludes build out 4 different jar files.
  16. Those are methods provided by the Item class. Override the ones that supply an ItemStack parameter. Damage that stack and return it.
  17. hasContainerItem and getContainerItem
  18. Yes, they "pause" because the chunk they are in ceases to exist (and thus, so do they). All* data is serialized and when the chunk loads again that data is deserialized and everything ends up in the same state that it was left in.* *Note: Not literally all data is serialized, eg. pathing information is not and is instead recomputed when needed again.
  19. Code Style Issue #3 You have an @Override annotation. If it was wrong, your IDE would be giving you an error. You're still doing this:
  20. You can also exclude multiple locations or include something as well.
  21. No, a static initializer is when you call new in a place that is static. Like this: public static final Item RED_COAL = new ItemBase("redCoal").creativeTab(CreativeTabs.MATERIALS);
  22. Why are you registering models in the Register<Items> event? There's a ModelRegistryEvent for a reason
  23. And your problem is..? What you're already doing is correct.
  24. Try calling super inside onDataPacket. Only thing I can see that might be related. You do have some other code style issues, though. Such as this entire class: https://github.com/AngheloAlf/MC_ALF_Logic_Gates/blob/bddec5d68621280db1f396e23da0f41506a74775/src/main/java/angheloalf/alf_logic_gates/blocks/base_blocks/AlfBaseBlock.java Inheritance for code reuse is an antipattern.

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.