mappings
This commit is contained in:
1 parent
fd3c8290cf
commit
4dd3cc7fd6
6 files changed
+10
-10
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
# or better: https://modmuss50.me/fabric.html
|
# or better: https://modmuss50.me/fabric.html
|
||||||
minecraft_version=1.17.1
|
minecraft_version=1.17.1
|
||||||
yarn_mappings=1.17.1+build.1
|
yarn_mappings=1.17.1+build.13
|
||||||
loader_version=0.11.6
|
loader_version=0.11.6
|
||||||
fabric_version=0.36.1+1.17
|
fabric_version=0.36.1+1.17
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class InventoryHelper
|
|||||||
public static boolean cleanUpShulkerBoxTag(ItemStack stack)
|
public static boolean cleanUpShulkerBoxTag(ItemStack stack)
|
||||||
{
|
{
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
NbtCompound tag = stack.getTag();
|
NbtCompound tag = stack.getNbt();
|
||||||
|
|
||||||
if (tag == null || !tag.contains("BlockEntityTag", TAG_COMPOUND))
|
if (tag == null || !tag.contains("BlockEntityTag", TAG_COMPOUND))
|
||||||
return false;
|
return false;
|
||||||
@@ -42,7 +42,7 @@ public class InventoryHelper
|
|||||||
}
|
}
|
||||||
if (tag.isEmpty())
|
if (tag.isEmpty())
|
||||||
{
|
{
|
||||||
stack.setTag(null);
|
stack.setNbt(null);
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
return changed;
|
return changed;
|
||||||
@@ -50,7 +50,7 @@ public class InventoryHelper
|
|||||||
|
|
||||||
public static boolean shulkerBoxHasItems(ItemStack stack)
|
public static boolean shulkerBoxHasItems(ItemStack stack)
|
||||||
{
|
{
|
||||||
NbtCompound tag = stack.getTag();
|
NbtCompound tag = stack.getNbt();
|
||||||
|
|
||||||
if (tag == null || !tag.contains("BlockEntityTag", TAG_COMPOUND))
|
if (tag == null || !tag.contains("BlockEntityTag", TAG_COMPOUND))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public abstract class ItemEntityMixin extends Entity implements ItemEntityInterf
|
|||||||
if (selfStack.getItem() == otherStack.getItem()
|
if (selfStack.getItem() == otherStack.getItem()
|
||||||
&& !InventoryHelper.shulkerBoxHasItems(selfStack)
|
&& !InventoryHelper.shulkerBoxHasItems(selfStack)
|
||||||
&& !InventoryHelper.shulkerBoxHasItems(otherStack)
|
&& !InventoryHelper.shulkerBoxHasItems(otherStack)
|
||||||
&& selfStack.hasTag() == otherStack.hasTag()
|
&& selfStack.hasNbt() == otherStack.hasNbt()
|
||||||
&& selfStack.getCount() + otherStack.getCount() <= SHULKERBOX_MAX_STACK_AMOUNT)
|
&& selfStack.getCount() + otherStack.getCount() <= SHULKERBOX_MAX_STACK_AMOUNT)
|
||||||
{
|
{
|
||||||
int amount = Math.min(otherStack.getCount(), SHULKERBOX_MAX_STACK_AMOUNT - selfStack.getCount());
|
int amount = Math.min(otherStack.getCount(), SHULKERBOX_MAX_STACK_AMOUNT - selfStack.getCount());
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public abstract class PlayerInventory_scarpetEventMixin
|
|||||||
if (count != stack.getCount()) // res returns false for larger item adding to a almost full ineventory
|
if (count != stack.getCount()) // res returns false for larger item adding to a almost full ineventory
|
||||||
{
|
{
|
||||||
ItemStack diffStack = new ItemStack(item, count - stack.getCount());
|
ItemStack diffStack = new ItemStack(item, count - stack.getCount());
|
||||||
diffStack.setTag(stack.getTag());
|
diffStack.setNbt(stack.getNbt());
|
||||||
PLAYER_PICKS_UP_ITEM.onItemAction((ServerPlayerEntity) player, null, diffStack);
|
PLAYER_PICKS_UP_ITEM.onItemAction((ServerPlayerEntity) player, null, diffStack);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
@@ -857,7 +857,7 @@ public class WorldAccess {
|
|||||||
|
|
||||||
ItemStack tool = new ItemStack(item, 1);
|
ItemStack tool = new ItemStack(item, 1);
|
||||||
if (tag != null)
|
if (tag != null)
|
||||||
tool.setTag(tag);
|
tool.setNbt(tag);
|
||||||
if (playerBreak && state.getHardness(world, where) < 0.0) return Value.FALSE;
|
if (playerBreak && state.getHardness(world, where) < 0.0) return Value.FALSE;
|
||||||
boolean removed = world.removeBlock(where, false);
|
boolean removed = world.removeBlock(where, false);
|
||||||
if (!removed) return Value.FALSE;
|
if (!removed) return Value.FALSE;
|
||||||
@@ -902,7 +902,7 @@ public class WorldAccess {
|
|||||||
return Value.TRUE;
|
return Value.TRUE;
|
||||||
if (toolBroke)
|
if (toolBroke)
|
||||||
return Value.NULL;
|
return Value.NULL;
|
||||||
NbtElement outtag = tool.getTag();
|
NbtElement outtag = tool.getNbt();
|
||||||
if (outtag == null)
|
if (outtag == null)
|
||||||
return Value.TRUE;
|
return Value.TRUE;
|
||||||
return new NBTSerializableValue(() -> outtag);
|
return new NBTSerializableValue(() -> outtag);
|
||||||
|
|||||||
@@ -96,10 +96,10 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
|
|||||||
|
|
||||||
public static Value fromStack(ItemStack stack)
|
public static Value fromStack(ItemStack stack)
|
||||||
{
|
{
|
||||||
if (stack.hasTag())
|
if (stack.hasNbt())
|
||||||
{
|
{
|
||||||
NBTSerializableValue value = new NBTSerializableValue();
|
NBTSerializableValue value = new NBTSerializableValue();
|
||||||
value.nbtSupplier = stack::getTag;
|
value.nbtSupplier = stack::getNbt;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
return Value.NULL;
|
return Value.NULL;
|
||||||
|
|||||||
Reference in new issue
Block a user