Skip 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. Item vs. ItemArrow. That has nothing to do with the texture. private void checkEquipSlots(int slotIndex) { if (((EntityPlayer) entityIn).inventory.armorItemInSlot(slotIndex).getItem() instanceof ItemArrow) { ItemStack newStack = ((EntityPlayer) entityIn).inventory.armorItemInSlot(slotIndex); // Set it to normal Quiver if it has no tag, or arrow tag, or arrow <= 0 if (newStack.hasTagCompound()) { NBTTagCompound nbt = newStack.getTagCompound(); if (nbt.hasKey("Arrows")) { if (nbt.getInteger("Arrows") <= 0) { ((EntityPlayer) entityIn).inventory.armorInventory.set(slotIndex, new ItemStack(ItemInit.QUIVER)); return; } } else { ((EntityPlayer) entityIn).inventory.armorInventory.set(slotIndex, new ItemStack(ItemInit.QUIVER)); return; } } else { ((EntityPlayer) entityIn).inventory.armorInventory.set(slotIndex, new ItemStack(ItemInit.QUIVER)); return; } } } Then the chunk under // armor slot 2(chest) check gets replaced with checkEquipSlots(2) and // slot 1(legs) gets replaced with checkEquipSlots(1). Now you have no duplicate code.
  2. The only thing I see you doing is changing from one item to another based on whether or not there are arrows (or not). Your code for CHEST and LEGS are exactly the same except for a 1 or a 2 (the slot number) and could be replaced with a function call containing said slot number.
  3. I didn't say "you can't do that" I said "I don't think you can." As in, I do not know of a way to make the texture dependent on which slot it is in: that information is not available to the Item or ItemStack classes. But sure, if you've accomplished it, good job. I'd be interested to know how.
  4. I don't think you can do that.
  5. Such as...? Post them.
  6. It's....simulating the insert. If true, the item will not actually be inserted, but the return value will be the same as if it had. It's the "does this fit?" check.
  7. This is disgusting. Do this instead: new ModelResourceLocation(parBlock.getRegistryName(), "inventory")
  8. Block models are loaded automagically.
  9. I presume it's due to lines like these: https://github.com/IceMetalPunk/Placeables/blob/glowstone-placeable/src/main/resources/assets/placeables/models/block/block_glowstone_dust_side0.json#L2 But as to why that error or how to fix it? I have no idea.
  10. ITextComponent (or one of its subclasses, such as TextComponentString) are what you're looking for.
  11. Bingo, there we go. Pretty sure you still need to specify that in your build.gradle file, because it's not inside src/main
  12. Uh... This is where that comment goes. The event itself apparently exists in common code (net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent) but it's only FIRED on the client.
  13. What are you front to accomplish? That is, what should happen from the user's perspective, nor how are you trying to code it?
  14. For recipes, there's no reason to reimplement something complicated like reading an item stack, vanilla did that already. Custom achievements though...99% copy-paste for the whole class. You literally go in, modify what data it is that needs to be deserialized and checked against (if any!) and then just fix all the red that shows up until it is gone. You modify like 12 lines total.
  15. if (entityIn instanceof EntityPlayer)
  16. Those helpers really aren't that hard to understand. Every recipe factory I've created I've done by going "here's a vanilla/forge recipe that's really close to what I want...COPY....PASTE!"
  17. Are you using a packet to send the slider value from the GUI back to the server?
  18. Nope, just in understanding the problem.
  19. No, this would not be possible.
  20. Are you using an API that is external?
  21. Other way around. The sounds that are localized are being played at the volume that is local to the player not local to the camera.
  22. He's not playing sounds, he's talking about every sound affect being picked up by the player not the remote camera perspective.
  23. That's because the AGE property used by Nether Warts (and Beetroot) isn't the same property as BlockCrops. They are not the same object and you can't use each in place of the other.
  24. You don't: No. Always post crash logs.
  25. isDynamic? I don't see that method in IRecipe. What release # of Forge are you using? Nothing. Once you have an implementation and it's mentioned in your _factories.json your next step is to use it. That's it. You're done.

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

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.