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 don't need all of these: https://github.com/dustpuppy/wizardmod/blob/master/src/main/resources/assets/thewizardmod/models/item/magic_extractor.json#L4 For any model unless you want the model to be different than the default values present in item/generated. Similarly... https://github.com/dustpuppy/wizardmod/blob/master/src/main/resources/assets/thewizardmod/models/item/iron_wand_0.json#L2 Use item/generated not builtin/generated. Third: Post your log. If models don't load, there's always an error.
  2. Sure. Which is why I recommended it.
  3. The "click and reset growth" is usually done via right click not left. As for how to handle that, there's a player interaction method in the block class for the block being right clicked. Check for pickaxe, set the growth age back to 0 (or 1 or whatever), drop a shard, and damage the pick (if you want).
  4. Lookup performance wise, ObjectHolder is probably faster. After that, it's going to be the same. Personally I'd recommend ObjectHolder.
  5. Just returning super means you did dick with the function and shouldn't bother with the override at all. So yes, return true and the itemstack you want to stay in the crafting grid. (With d7 ninjaing me by a few seconds)
  6. Either put this in Support & Bug Reports, open an issue on Github, or create a pull request on Github.
  7. Override hasContainerItem() and getContainerItem().
  8. You need to copy the AI behavior resposible, modify it, and use it instead of the original.
  9. Uh... Use the metadata value that that state encodes to in your getMetaFromState?
  10. Neither of those are going to do what he wants. The former will still generate, only now its his ore that generates (and in a location he doesn't want it to). The latter is only useful if he replaces the ore block with stone or we end up in the same situation again: only now its his ore that generates (and in a location he doesn't want it to).
  11. This line does jack and all. Get rid of it. ModelLoader is SideOnly(CLIENT), you can't have it in common code. You are not using ObjectHolder correctly. If you are assigning the value yourself, you don't need the annotation. You're doing nothing with this hashset except adding things to it. You don't need it. You're registering two different model variants for the same item-metadata combination.
  12. This would be covered by IBlockStates pretty well. All you have to do is properly define your blockstate json.
  13. FFS. They are two different ways of doing the same thing. You either make a common proxy (which is used server side) and extend it for the client proxy, or you make the common proxy an interface which the server and client proxy implement. I never said "I believe ClientProxy should extend" I said I still do it this way, even though it is bad.
  14. Ok, so 1: ModelLoader.setCustomModelResourceLocation( item, meta, new ModelResourceLocation(Reference.PREFIX + id, "inventory") ); item.getRegistryName(), magic. 2: You're registering your item models at the wrong time. You must use the ModelRegistryEvent. 3: you didn't post the log, so there's still the possibility of several problems: The possibility that the file is in the wrong place / misnamed (despite what you've said) The possibility that the file isn't a valid json file (even though it looks like it) The possibility that the texture is in the wrong place / misnamed
  15. I still go by the ClientProxy extends CommonProxy setup myself. <_< Mind, that came in handy when I built my EasyRegistry (they act as a common and client proxy, with the common actually containing a large portion of code, but code that makes no sense to be anywhere else).
  16. Move everything in CommonProxy.class to your main mod class. Then retype the CommonProxy to an interface.
  17. It's called twice. All you have to do is check "is hand == mainhand" in that last if-block. That prevents an empty off-hand from making the "dog" sit.
  18. I don't know, but you can easily fix this by making it do nothing if the hand is the off-hand.
  19. Ok, good, you didn't fuck up the usual suspects. Unfortunately I can't identify the problem. :\
  20. The function is called twice: once for each hand. If both hands are empty, the "dog" will get toggled twice in a row. You make no discrimination about which hand is being used (you do identify if the hand is holding food/dye/etc items, but the "dog" only sits when the hand is empty, and if both are empty, you process that interaction twice: sit, then unsit).
  21. You might actually want the function getMouseOver() in EntityRenderer, it's pretty much what you're looking for (note: this existing method is client-side only and if you need to run the code on the server, you will have to duplicate it).
  22. The bit diesieben07 forgot to say ways, "Use UUIDs"

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.