Jump to content

[1.10] Need help to remove item from LootTable


American2050

Recommended Posts

I'm trying to remove items drop from Cows. The problem I'm having is that I don't know what's the name of the different LootPool that they hold.

 

With this example, I can remove the leather, but not the beef.

 

//REMOVE DROPS FROM COWS
	if (event.getName().equals(LootTableList.ENTITIES_COW)) {

		LootPool theLootPool = event.getTable().getPool("main");

		theLootPool.removeEntry("minecraft:leather");
		theLootPool.removeEntry("minecraft:beef");			

	}

 

I guess the problem is that actually the leather is the only item on LootPool main and the beef is on a different one.

 

So from there, I did some further investigation and found out that the beef is on a 2nd pool that we have to refer as "pool1" and there I was able to remove the beef.

 

My questions are. Is it possible to remove the drop in a general way even not knowing on what pool it is?

 

PS: Also, would it be possible to get a "pools" list, or a way to loop thru the pools?

Link to comment
Share on other sites

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.