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 may want to look at my helper class I use: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/util/LootUtils.java
  2. Ahh. I wouldn't have even thought to look there. Thanks.
  3. I've created a custom hanging entity that I want to use to replace the ItemFrame so that I can supply some additional logic. However, I have a couple issues. If I don't register the mod entity, then the entity shows up and behaves normally, except that it doesn't save (this makes sense: there's no entity ID mapping for it). However, if I add the registerModEntity line for it, then it doesn't show up in-game at all () but does save (as well as popping off if the block it's attached to is broken). Main mod class: itemFrameReplacement = new ItemItemFrame(); itemFrameReplacement.setRegistryName(new ResourceLocation("minecraft","item_frame")); itemFrameReplacement.setUnlocalizedName("frame"); try { GameRegistry.addSubstitutionAlias("minecraft:item_frame", Type.ITEM, itemFrameReplacement); } catch (ExistingSubstitutionException e) { e.printStackTrace(); } //commenting this line changes behavior: EntityRegistry.registerModEntity(EntityItemFrameReplacement.class, "item_frame_rep", 0, this, 48, 10, false);
  4. Your BlockStateContainer method doesn't declare that it has a FACING property: @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] {TYPE}); } You need: @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] {TYPE, BlockHorizontal.FACING}); }
  5. Makes sense. I didn't know that it did more than just set the value.
  6. Your enums have this method: @Override public String getName() { return null; } You cannot return null here. Actually, that line is unhelpful. It's just a "new MyBlock()" line. The important bit is this bit:
  7. Thanks. I was darn sure that it cleared when I closed the search window, which is what I've done in the past (though I haven't even seen it highlight a whole bloody method, just the object name before).
  8. What is the point of a private field with both methods to get the current value and modify the current value? That is, what is protected against that having the field public not protect against?
  9. A couple things: 1) any item stored in a chest (or other non-entityliving inventory) will not tick and thus not rot. 2) any item in an unloaded chunk (or in a player that is not connected to the server's inventory) will not tick and thus not rot. 3) how do you plan to handle combining a stack of "damage:1" meat with "damage:10" meat?
  10. What is this blue highlight and how do I get rid of it? It showed up when I did a search for existing usages of addPropertyOverride, opened up the ItemClock (it was faster than using the package explorer), and now it won't go away.
  11. It was deprecated in favor of: AttachCapabilitiesEvent<Entity>
  12. 16.4 posts per day is not that many, especially for a moderator.
  13. Unsurprisingly, -Xmx2G does too.
  14. @Override public int hashCode() { return item.hashCode(); } This won't work. ItemStack does not provide a hashcode implementation, therefor this wrapper class violates the hashcode/equals contract: That if equals returns true on two instances, hashcode must also return the same value. You will need to provide your own hash implementation. I suggest something along these lines: @Override public int hashCode() { return 37*item.getItem.hashCode() + item.getItemMetadata(); } Or use a HashUtility function: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/math/HashUtils.java Also, again:
  15. What happens if there are no pancakes?
  16. Which ticks even if you're not wearing the armor. Talk about overkill. (do your armor tick in one of your armor items, like the boots)
  17. On the other hand, it means (potentially) being able to toss item stacks of Air into the world, stacking them in your inventory, or pulling them out of the crafting grid. You'd have to do more work to prevent this, than I imagine you'd save by handling null correctly.
  18. The whole point of creating the wrapper was so you could do this: smeltmulti.get(stack);
  19. That's super weird. Why would they change that?
  20. The question is "why?" Nearly everything anyone would want to do can be done without ASM, the rest should be submitted as a pull request to Forge.
  21. Coremods are heavily discouraged around here. Sooo....you are unlikely to get any help. That said: > a) what to do, to get the method names deobfuscated? > 1) asm patches are applied before deobfuscation You can't both of these. You're either waiting until after deobf, or you're not. You can't have both.
  22. ItemStack newstack = stack.split(1);
  23. You do know about stack splitting, yes?
  24. So you know how FurnaceRecpies has a method called getSmeltingResult? You need to do that for your own recipes.

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.