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. Oh I get why it's done, Lex. Minecraft has its limitations because of the decompile and deobf process. All I meant was that I, as a coder, wouldn't have chosen those names for my own functions.
  2. That only makes me think of How to Write Unmaintainable Code
  3. https://github.com/Excaliburns/ModPractice/blob/master/src/main/java/items/HuskItem.java#L52 If (not client) then...
  4. Well....let's see here... matches returns....if what's in the crafting grid matches the recipe getCraftingResult returns....the result of the recipe getRecipeOutput returns....the output item of the recipe (this will be the basic item with no knowledge of the grid, but you need to return something) getRemainingItems returns....the items remaining in the crafting grid after the result is taken canFit returns....if the recipe fits within a given grid (2x2, 3x3, etc) Look at some existing implementations to snaggle most of those methods already implemented. All you'd have to do is fluff up the getRecipeOutput method to grab the metadata you want from the items in the grid.
  5. (On the single player integrated server, anyway)
  6. https://github.com/Excaliburns/ModPractice/blob/master/src/main/java/network/tutmodMessage.java#L43 When the packet is being reconstructed from the byte array...what is the value (and therefore its size) of itemsList? I'll give you a hint, it's specified in the zero-argument constructor.
  7. You would have to look at the player's ToString method and find out.
  8. The player isn't null. The object's ToString() method encountered a NPE while executing.
  9. You aren't using the methods without parameters so of course they're not deprecated.
  10. (or you can set each stack's stacksize to double: virtually all drops are done via 1-size stacks, even in the case of dropping 3 or 5 items)
  11. Because string comparison is awful. You will have to either: a) make a recipe for each variant b) create a new IRecipe implementation that gets the metadata of the dye and applies it to the recipe output.
  12. BTW, it'll take a while to get accepted and you'll probably feel like you're being abused with needing to make changes. Its not personal.
  13. if(entity instanceof EntityParrot) { ... }
  14. You need to encode the information you want to send. ByteBufUtils will help.
  15. https://github.com/Excaliburns/ModPractice/blob/master/src/main/java/network/tutmodMessage.java#L35-L43 And what, pray tell, did you expect to happen?
  16. You should be fine, it's just that if you wanted to override a behavior (e.g. making water buckets do something different) you'd have to remove the existing behavior.
  17. I think so. You're also removing any existing behavior for items you're adding behaviors for, yes? (If applicable) (Aside from the default "toss").
  18. The dispenser does not fire any event, of any kind, when it dispenses items. The BlockEvent class (and its subclasses) are for events like crops growing, blocks being placed, blocks being broken, etc. They are very specific (I do not believe that BlockEvent is used in any context except via its subclasses). Also, if you look at BlockDispenser and the dispense method, you'll see that no events are posted. If you want to change how the dispenser dispenses items, you can do that by adding and removing entries to the DISPENSE_BEHAVIOR_REGISTRY
  19. Snrk. Hardly. File a bug report. Better yet, make a Pull Request fixing the problem. https://github.com/MinecraftForge/MinecraftForge
  20. Custom IRecipe implementation should be able to do this.
  21. That is NOT how you post code. You've made it bold for some inane reason and not used a code block (the button with <> on it).
  22. Because you're using the base ItemBlock class which returns 0 in getMetadata()...
  23. Learn how to read the log: Caused by: java.io.FileNotFoundException: multic:blockstates/colored_plank.json
  24. I do not have an answer.

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.