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. Draco18s replied to a post in a topic in Modder Support
    I suspect that the block being used by your seed item is not actually your crop block. But with the code you have, I'm not sure why that is. My guess is that the item you're holding is not the one that we've been talking about, but another item entirely.
  2. You mean for how, when entities on fire die, they drop cooked meat? That's handled by the EntityHasProperty, EntityPredicate, and EntityFlagsPredicate classes. Its pretty complicated. EntityFlagsPredicate#test is probably what you're looking for.
  3. Yeah, its a transparency sorting problem. Its going to be difficult to solve.
  4. Draco18s replied to a post in a topic in Modder Support
    You only need two references: The block instance is passed to the seed item's constructor The item instance is returned in the block's getSeedsItem method via a ModItems (ItemList) reference. That's it.
  5. Assert.IsEqual(worth(picture), worth(thousand_words);
  6. I suspect the problem here is that "assets" is not a proper domain name. But yes, as Animefan8888 asks, can you post the entire json file in question?
  7. Lets follow the logic here. "I need to override this method in my block class in order to get the behavior I want." Now answer the question, "Do I need my own block class?" Yes: No:
  8. Generally speaking, you can only override a method in a class that is, itself, a subclass of the class where the method to be overridden is found. So in order to override a method in the Block class you have to do so in a subclass that extends Block. You would know this if you had any knowledge of object oriented programming already. A thing that we here at Forge, don't teach, because there's already a billion other resources for it, like Stack Overflow. All we help people with is finding the right method in Minecraft or Forge that does the thing that they need. We've done that, we've told you to override getRenderLayer, what to return, and where it goes. (Oh, by the way, if you show up at Stack Overflow and post this exact question, I'll see it and almost certainly vote to close it for being unclear or too broad or looking for off-site resources)
  9. You need to override the named method correctly.
  10. Not having messed with Loot Conditions, I recommend you examine the existing loot condition classes and how they're used.
  11. This makes no sense, getEntries() returns an unmodifiable set: @Override public Set<Entry<ResourceLocation, V>> getEntries() { return Collections.unmodifiableSet(this.names.entrySet()); }
  12. As well as a MissingVariantException: "active=false, facing=north" is not the same as "active=false,facing=north" This is why Forge variants exist, but if you're going to use vanilla, you have to match vanilla exactly.
  13. Draco18s replied to a post in a topic in Modder Support
    Or Or F11 Or https://lmgtfy.com/?q=eclipse+run+debug
  14. Draco18s replied to a post in a topic in Modder Support
    Set a breakpoint here: https://github.com/drmdgg/marijuanacraft/blob/master/src/main/java/drmdgg/marijuanacraft/MarijuanaCraft.java#L88 Run in debug mode and inspect the value of BlockList.mplant
  15. Implement (and register) your own ILootCondition
  16. Have you looked at how vanilla does it?
  17. Draco18s replied to a post in a topic in Modder Support
    Great. You changed ONE thing in your ItemList to be final. https://github.com/drmdgg/marijuanacraft/blob/master/src/main/java/drmdgg/marijuanacraft/lists/ItemList.java#L14 How about the rest of them, hmmm? Ditto your block list: https://github.com/drmdgg/marijuanacraft/blob/master/src/main/java/drmdgg/marijuanacraft/lists/BlockList.java#L22 The reason you're still getting null is because your marijuana_bud is null because @ObjectHolder only works on static final fields. https://mcforge.readthedocs.io/en/1.13.x/concepts/registries/#injecting-registry-values-into-fields
  18. rightClick and related methods that have a hand parameter. Its still relevant, just maybe not for this situation.
  19. Yes. For example, here's my output slot: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/hardlib/api/internal/inventory/SlotOutput.java Speaking of, if you don't want hoppers (and other machines) pushing items into your output slot, you'll need two ItemStackHandlers: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/entity/SifterTileEntity.java#L40-L41 One of which wraps around the other: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/hardlib/api/internal/inventory/OutputItemStackHandler.java So that internally you can insert, but you only expose the wrapper to other systems.
  20. Did you create the file inside Eclipse? If not, did you refresh Eclipse's project directory so that it knows about the file?
  21. Draco18s replied to a post in a topic in Modder Support
    Your item group is incorrect. https://github.com/drmdgg/mcraft/blob/master/java/drmdgg/marijuanacraft/java/drmdgg/marijuanacraft/MJItemGroup.java#L7 You must use ModItemGroup and pass a Supplier<ItemStack> as at the point that the ItemGroup is constructed your icon item is null and vanilla code is Dumb about it. Here's a working example: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/industry/ExpandedIndustry.java#L59 Also, your repo is not correctly set up: https://github.com/drmdgg/mcraft That should contain the build.gradle file, and other files at that root directory. The way you've done it has completely fucked up where your resources are. For example, it should look like this: https://github.com/Draco18s/ReasonableRealism
  22. Yes, because to use an ItemStackHandler, you need to use SlotItemHandler, not Slot.
  23. Draco18s replied to a post in a topic in Modder Support
    Change this to final or the annotation doesn't work. https://github.com/drmdgg/mcraft/blob/master/java/drmdgg/marijuanacraft/init/blocks/BlockInit.java#L15 Also, you don't need to implement IGrowable, CropsBlock already does. https://github.com/drmdgg/mcraft/blob/master/java/drmdgg/marijuanacraft/init/blocks/plants/MPlant.java#L29 What is this? Why is this here? You aren't even using it anyway. https://github.com/drmdgg/mcraft/blob/master/java/drmdgg/marijuanacraft/init/blocks/plants/MPlant.java#L40-L49 You are still assigning to fields directly: https://github.com/drmdgg/mcraft/blob/master/java/drmdgg/marijuanacraft/MarijuanaCraft.java#L165 Why do you have both a BlockInit and a BlockList? Your BlockList is also not using annotations, also not using final, and also being assigned to directly. As far as I can tell, you haven't changed anything I've asked you to change. Or if you have, you haven't updated your git repo, which makes my searching for problems completely pointless because its not your code (it is outdated).
  24. Cool. Have you looked at those classes?
  25. https://mcforge.readthedocs.io/en/latest/concepts/registries/#injecting-registry-values-into-fields public static final Item ENDER_PEARL = null; // Note that the actual name is "minecraft:ender_pearl", not "minecraft:ENDER_PEARL". // However, since constructing a ResourceLocation lowerc

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.