-
Dropping an Item for the Entity
Vanilla entity, being right-clicked, not attacked.
-
Dropping an Item for the Entity
Alright, this is my second post on this topic but it's asking a different question. Using entity.setCurrentItemOrArmor or entity.dropItem client-side only, surprisingly, only affects the client. However, because the Minecraft.getMinecraft().objectMouseOver.entityHit is client-only. Therefore, to successfully get an entity at which the player is looking, you can only be in a "remote" world, but from there, firing the two of the above methods doesn't do much, since it's not the server entities that are "dropping" an item. How do I make it so that right-clicking an entity that the player is looking at (a vanilla entity), will make it "drop" an item?
-
Making held item drop
Nope the that. Calling the method on a skeleton makes him drop as many bows as you use it. (Also, you can't pick them up?)
-
Making held item drop
So I know there is a method dropItem, but is there a way to, when the item drops, set the Players (or Entity's) held item to "air"?
-
Spawn particles for ALL Players
When I use an Item, I want it to spawn particles. It works clientside and on serverside but with a slight catch - the particles I try to spawn only appear to the player using the Item. How would I make sure that all players see them? Edit - oops forgot code @Override public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer player){ for(double x = -1; x < 1; x += .1){ for(double z = -1; z < 1; z += .1){ p_77659_2_.spawnParticle("portal", player.posX, player.posY - 1, player.posZ, x, -1 + (1 - -1) * random.nextDouble(), z); } } if(p_77659_2_.isRemote){ player.moveEntity(Minecraft.getMinecraft().objectMouseOver.blockX - player.posX, Minecraft.getMinecraft().objectMouseOver.blockY - player.posY + 3, Minecraft.getMinecraft().objectMouseOver.blockZ - player.posZ); } for(double x = -1; x < 1; x += .1){ for(double z = -1; z < 1; z += .1){ p_77659_2_.spawnParticle("portal", player.posX, player.posY - 1, player.posZ, x, -1 + (1 - -1) * random.nextDouble(), z); } } return p_77659_1_; } [code]
-
Not Able To View Minecraft Source Files
Hello all! I'm having a bit trouble using the latest forge. I use Eclipse, of course. I want to look at minecraft's native source files. I have found something similar to what I need in Referenced Libraries > forgeBin, but they are all class files an I cannot view them. Am I looking in the wrong spot? Or what do I need to do to view them?
-
Custom entity Applying bonemeal - like effects to plants in certain area?
I have a golem, which is supposed to be the farming golem. I would like to to wander around (already set THAT up) and all the wheat/potatoes/whatnot in the area to have bonemeal - like effects applied to them. That is it. Thanks in advance P.S. I did take a look at bonemeal, but it seems to be using a method that requires a player.
-
Prevent Custom Mob From Despawning and being murdered by other golems.
I have a mob, which should be a Golem. Just like all the other golems, it is an EntityMonster. What i want, however, is for other snowmen NOT to attack him, and for him not despawn when the difficulty is set to peaceful. ~Using forge 1.6.4
-
Create Mob From a Block Formation?
Well, I was thinking of using the pumpkin as the head for another golem, but clearly it doesn't work that way.
-
Create Mob From a Block Formation?
Does that mean I can't do it without modifying base classes?
-
Create Mob From a Block Formation?
I would like to make a new golem for the game, and I was wondering how to do it. Please help me, or at least point me to where the original game does it. Thanks in advance!
-
Biome too...watery
You're not hijacking anything, friend. If you look at my earlier post it has all the code I used for the biome - just creating it and registering the biome adds it to the world (as far as it worked for me)Ignore the chunk and dimension providers, those are for the dimension. Look at FrozenBiome and the main class. It's also quite annoying because I have my own biome that is supposed to be dimension-specific spawn in the overworld. Happy modding!
-
How often does the entire entity class get called?
So pretend I want an entity to set another custom entity’s variable. I want there to be an entity called the necromancer, and he will make zombies follow him. I want each zombie to set a variable in the necromancer, so that I can find out how many zombies are connected. If I make a global variable zombieNumber, will it keep getting set to 0?
-
More mob questions
EntityLivingBase#onDeath(DamageSource) I see a lot of those, but don’t understand how to use them. Can you get me one in context?
-
More mob questions
Yeah, I was actually trying to do just that. Thanks!
IPS spam blocked by CleanTalk.