Jump to content

Recommended Posts

Posted

Having exact same problem with items I spawn in the World, but not all of them, so not sure what could be going on, In the floor it looks like 1, when I pick up, there are 2, I drop those 2 and pick up 4, I drop those 4 and pick up 8.

 

If I drop only 1 of the 2 I picked up, when I pick that one up, it's only one. So it only doubles when I drop all of them.

 

I'm not sure if the problem could be the way my mod spawns those items in the world or what, they are just vanilla items, with custom names and enchanted.

 

And for some reason, code that worked in 1.9.4 to spawn items in the world, not it spawns 2 items sometimes.

 

This is an example of an item spawning twice

		 	if(!world.isRemote){
   	 
   		ItemStack dropX = new ItemStack(ModItems.clover,1,0);
		dropX.addEnchantment(Enchantment.getEnchantmentByID(35), 1);
		dropX.setStackDisplayName("Lucky is who Lucky gets");


	   	EntityItem itemDropX = new EntityItem(world, player.posX+.5, player.posY+.5, player.posZ+.5, dropX);
	   	world.spawnEntityInWorld(itemDropX);
		}

 

I added the !world.isRemote just in case, but all this code is already been called within a !world.isRemote

 

PS: Other than that, I believe there is a Vanilla/Forge bug maybe? Whenever I drop all items in X slot in inventory, when I pick them up back, they double.

 

Using forge 1.10-12.18.0.1984-1.10.0

Posted

And what code is calling this code?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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