mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 08:39:58 +03:00
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
--- ../src-base/minecraft/net/minecraft/world/storage/loot/LootEntryItem.java
|
|
+++ ../src-work/minecraft/net/minecraft/world/storage/loot/LootEntryItem.java
|
|
@@ -18,9 +18,9 @@
|
|
protected final Item item;
|
|
protected final LootFunction[] functions;
|
|
|
|
- public LootEntryItem(Item itemIn, int weightIn, int qualityIn, LootFunction[] functionsIn, LootCondition[] conditionsIn)
|
|
+ public LootEntryItem(Item itemIn, int weightIn, int qualityIn, LootFunction[] functionsIn, LootCondition[] conditionsIn, String entryName)
|
|
{
|
|
- super(weightIn, qualityIn, conditionsIn);
|
|
+ super(weightIn, qualityIn, conditionsIn, entryName);
|
|
this.item = itemIn;
|
|
this.functions = functionsIn;
|
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
|
if (!itemstack.isEmpty())
|
|
{
|
|
- if (itemstack.getCount() < this.item.getItemStackLimit())
|
|
+ if (itemstack.getCount() < this.item.getItemStackLimit(itemstack))
|
|
{
|
|
stacks.add(itemstack);
|
|
}
|
|
@@ -79,6 +79,7 @@
|
|
|
|
public static LootEntryItem deserialize(JsonObject object, JsonDeserializationContext deserializationContext, int weightIn, int qualityIn, LootCondition[] conditionsIn)
|
|
{
|
|
+ String name = net.minecraftforge.common.ForgeHooks.readLootEntryName(object, "item");
|
|
Item item = JsonUtils.getItem(object, "name");
|
|
LootFunction[] alootfunction;
|
|
|
|
@@ -91,6 +92,6 @@
|
|
alootfunction = new LootFunction[0];
|
|
}
|
|
|
|
- return new LootEntryItem(item, weightIn, qualityIn, alootfunction, conditionsIn);
|
|
+ return new LootEntryItem(item, weightIn, qualityIn, alootfunction, conditionsIn, name);
|
|
}
|
|
}
|