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.

Bedrock_Miner

Forge Modder
  • Joined

  • Last visited

Everything posted by Bedrock_Miner

  1. Is it possible to create a Mod in a way, that the client doesn't need to install the Mod on client side, if it is installed at the server where the client is connected to? And if: How?
  2. It returns, whether the minecart has fuel or not. It's copied from EntityMinecartFurnace.class. If I leave it out, it won't work too. I tried it also without any if-construction... Without success.
  3. I don't limit the Call to the server side.. I do it like this: public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { [...] par2EntityPlayer.openGui(Main.instance, 0, par3World, par4, par5, par6); return true; } } } And I don't know, which container to use, because I actually don't have one
  4. Now it works! I changed my damage-method to the following: player.inventory.getStackInSlot(InventoryController.getSlot(Element.get(elementID))).setItemDamage(player.inventory.getStackInSlot(InventoryController.getSlot(Element.get(elementID))).getItemDamage() + 1); if (player.inventory.getStackInSlot(InventoryController.getSlot(Element.get(elementID))).getItemDamage() >= player.inventory.getStackInSlot(InventoryController.getSlot(Element.get(elementID))).getMaxDamage()) player.inventory.setInventorySlotContents(InventoryController.getSlot(Element.get(elementID)), null); Thanks to all of you!
  5. @GotoLink: But this shouldn't stop the Gui from being shown. @khlorghaal: I tried it with a custom GUI and even this isn't shown I think, it's because the getClientGuiElement method isn't called... Any ideas why? @SenpaiSubaraki: I don't have any container to return and with a TE Java responds with a Cast-Exception.
  6. Hi! I tried to create a custom Minecart with furnace. Everything worked well, except the fact, that the Minecart isn't spawning any Particles. I copied this Method from EntityMinecartFurnace: public void onUpdate() { if (this.isMinecartPowered() && this.rand.nextInt(3) == 0) this.worldObj.spawnParticle("largesmoke", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D); [...] } But there are no Particles Spawning. I tried to replace this.worldObj with Minecraft.getMinecraft().theWorld. This worked, but only in Singleplayer, because Minecraft.getMinecraft() is client only. Has Anybody got an Idea how to persuade my Particles to spawn anyway?
  7. Even this doesn't work. I think the problem is, that the Item I want to damage is not the currently selected Item. It can be any Item in the Inventory... I don't understand, why it doesn't break.. Note: The Item, which you get instead of the old one can't be throwed out of the Inventory. If you press Q the game crashes with the following crash report:
  8. Thank You! This finally worked!
  9. Hi Guys! I want to create a Gui for a new Sign, which is shown when te sign is placed, but it won't work. I don't really know why and I need some help.. My Code: I hope, anybody knows, which mistake I made. Thanks in Advance!
  10. But ther's also no property for clicking right into the air. There are only RIGHT_KLICK_BLOCK, RIGHT_KLICK_AIR and LEFT_KLICK_BLOCK; I need LEFT_KLICK_AIR.
  11. @Chibill or others: Can anybody give me some working code?
  12. Hi! I tried to create a new sign, but I got some problems: As I tried to copy all resources from vanilla-sign i found an occurence of return new Packet130UpdateSign(this.xCoord, this.yCoord, this.zCoord, astring); in TileEntitySign, but Packet130UpdateSign(...) and the classes who use/are used by this are all baseclasses. For what function is this used? And how can I replace this without base class change? Hope, you understand my problems EDIT: You also can tell me, what I have to do for creating it on my own.
  13. I don't know how, but it must be possible, because they do it in the PortalGun Mod.
  14. I looked it up and found only onItemRightKlick(...), but nothing for Left Klick except onLeftKlickEntity, and this is only for entities and not active if you click right into the air...
  15. Yes, exactly. You hold the Item and perform a klick, either with the left mouse-button or with the right one. And both clicks should lead to a single method. But I could only find methods for the event of klicking at a Block... You should be able to klick right into the air, like wit a bow, but also with the left mouse button. (Hope, everybody understands)
  16. anybody any ideas?
  17. And how? If i just go like this it doesn't work: @Override public void onUpdate(ItemStack stack, World world, Entity entity, int n, boolean b) { if (stack.getItemDamage() >= stack.getMaxDamage()) stack = null; }
  18. Hello Guys! I'm creating a special Item, which should have a shooting function if you right klick it and a healing function if you left klick it. Right Klick short: Shoot Right Klick long: Aim and shoot Left klick: Heal The function should be created in a way that you don't have to select a Block or an Entity before klicking, just klick anywhere. Any Ideas??
  19. Hello everybody! I created an Item which gets damage from a handler, which works. But if the Item gets the last bit of Damage which should destroy it, it doesn't and another Item appears there instead which has zero Damage. Have i missed anything in my Item class? It looks very short, I think.. package mod.classes.items; import java.util.List; import mod.Main; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraft.world.World; public class ItemTool extends ModItem { public ItemTool(int ID) { super(ID); this.setMaxStackSize(1); this.setMaxDamage(128); this.setCreativeTab(Main.modBasic); } } The Damage is dealt with this Method: player.inventory.getStackInSlot(InventoryController.getSlot(Element.get(elementID))).damageItem(1, player); Hope anybody sees my Mistake..
  20. Thank you for this information... I thing I hadn't find this on my own. I worked a little bit and now I've got the function I want to have.. For anyone who is interested in this I post it here:
  21. Sounds good, but where is this base function??? Couldn't find it anywhere.
  22. OK, then I try it another way.. But thanks for trying to help me.
  23. Yes, but how can I stop the vanilla methods? Or: How can I change the Keybindings from my Mod? PS: Nooby question: Why does everybody call normal-minecraft-stuff "vanilla"?

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.