Everything posted by Bedrock_Miner
-
Multiplayer Mod Question
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?
-
[solved... nearly] No Particles Spawn!
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.
-
Creating GUI won't work
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
-
[SOLVED] Item doesn't break!
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!
-
Creating GUI won't work
@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.
-
[solved... nearly] No Particles Spawn!
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?
-
[SOLVED] Item doesn't break!
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:
-
Item Mouse Actions
Thank You! This finally worked!
-
Creating GUI won't work
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!
-
Item Mouse Actions
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.
-
[SOLVED] Item doesn't break!
@Chibill or others: Can anybody give me some working code?
-
Creating a sign
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.
-
Item Mouse Actions
I don't know how, but it must be possible, because they do it in the PortalGun Mod.
-
Item Mouse Actions
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...
-
Item Mouse Actions
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)
-
Item Mouse Actions
anybody any ideas?
-
[SOLVED] Item doesn't break!
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; }
-
Item Mouse Actions
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??
-
[SOLVED] Item doesn't break!
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..
-
Keyboard usage
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:
-
Keyboard usage
Sounds good, but where is this base function??? Couldn't find it anywhere.
-
Damage and Meta for Items?
OK, then I try it another way.. But thanks for trying to help me.
-
Keyboard usage
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"?
- Keyboard usage
-
Damage and Meta for Items?
Anyone? -> GotoLink?
IPS spam blocked by CleanTalk.