data changes

This commit is contained in:
Sen 2025-07-06 21:43:15 +02:00
parent 575015abd6
commit b14a99dc05
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
75 changed files with 449 additions and 1717 deletions

View file

@ -228,8 +228,6 @@ public abstract class ReorderRegistry {
for(BlockDoublePlant block : BlockDoublePlant.PLANTS) {
addAttach(block, Facing.DOWN);
}
addAttach(Blocks.banner, Facing.DOWN);
addCardinals(Blocks.wall_banner, 4, 2, 5, 3);
addAttach(Blocks.oak_door, Facing.DOWN);
addAttach(Blocks.spruce_door, Facing.DOWN);
addAttach(Blocks.birch_door, Facing.DOWN);

View file

@ -2900,10 +2900,7 @@ public class Player extends User implements ICrafting, Executor, IPlayer
Item item = packet.getItem();
if(item == null)
return;
ItemStack stack = new ItemStack(item, packet.isStacked() ? item.getItemStackLimit() : 1);
stack.setTag(item.getItemTag(packet.getTagIndex()));
if(item.hasTags() != stack.hasTag())
return;
ItemStack stack = new ItemStack(item, packet.isStacked() ? item.getMaxAmount() : 1);
int amount = stack.size;
if(amount <= 0)
return;

View file

@ -8,8 +8,8 @@ import common.entity.npc.EntityUndead;
import common.entity.npc.EntityZombie;
import common.entity.types.EntityLiving;
import common.init.Blocks;
import common.init.Items;
import common.item.RngLoot;
import common.item.material.ItemEnchantedBook;
import common.rng.Random;
import common.rng.WeightedList;
import common.tileentity.TileEntity;
@ -140,7 +140,7 @@ public class FeatureDungeons
if (j3 == 1)
{
worldIn.setState(blockpos2, Blocks.chest.correctFacing(worldIn, blockpos2, Blocks.chest.getState()), 2);
WeightedList<RngLoot> list = RngLoot.addToList(LootConstants.DUNGEON_CHEST, Items.enchanted_book.getRandom(rand));
WeightedList<RngLoot> list = RngLoot.addToList(LootConstants.DUNGEON_CHEST, ItemEnchantedBook.getRandom(rand));
TileEntity tileentity1 = worldIn.getTileEntity(blockpos2);
if (tileentity1 instanceof TileEntityChest)

View file

@ -9,8 +9,8 @@ import common.block.tech.BlockTorch;
import common.entity.item.EntityChestCart;
import common.entity.npc.EntityArachnoid;
import common.init.Blocks;
import common.init.Items;
import common.item.RngLoot;
import common.item.material.ItemEnchantedBook;
import common.rng.Random;
import common.rng.WeightedList;
import common.tags.TagObject;
@ -355,12 +355,12 @@ public class StructureMineshaft
if (randomIn.zrange(100) == 0)
{
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 2, 0, k1 - 1, RngLoot.addToList(LootConstants.MINESHAFT_CHEST, Items.enchanted_book.getRandom(randomIn)), 3 + randomIn.zrange(4));
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 2, 0, k1 - 1, RngLoot.addToList(LootConstants.MINESHAFT_CHEST, ItemEnchantedBook.getRandom(randomIn)), 3 + randomIn.zrange(4));
}
if (randomIn.zrange(100) == 0)
{
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 0, 0, k1 + 1, RngLoot.addToList(LootConstants.MINESHAFT_CHEST, Items.enchanted_book.getRandom(randomIn)), 3 + randomIn.zrange(4));
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 0, 0, k1 + 1, RngLoot.addToList(LootConstants.MINESHAFT_CHEST, ItemEnchantedBook.getRandom(randomIn)), 3 + randomIn.zrange(4));
}
if (this.hasSpiders && !this.spawnerPlaced && SVars.mobs && SVars.spawnMineshaftMobs)

View file

@ -9,8 +9,8 @@ import common.block.tech.BlockTripWire;
import common.block.tech.BlockTripWireHook;
import common.entity.npc.EntityMage;
import common.init.Blocks;
import common.init.Items;
import common.item.RngLoot;
import common.item.material.ItemEnchantedBook;
import common.rng.Random;
import common.tags.TagObject;
import common.util.BlockPos;
@ -252,7 +252,7 @@ public class StructureScattered
{
int l1 = enumfacing.getFrontOffsetX() * 2;
int i2 = enumfacing.getFrontOffsetZ() * 2;
this.hasPlacedChest[enumfacing.getHorizontalIndex()] = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 10 + l1, -11, 10 + i2, RngLoot.addToList(LootConstants.DESERT_PYRAMID, Items.enchanted_book.getRandom(randomIn)), 2 + randomIn.zrange(5));
this.hasPlacedChest[enumfacing.getHorizontalIndex()] = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 10 + l1, -11, 10 + i2, RngLoot.addToList(LootConstants.DESERT_PYRAMID, ItemEnchantedBook.getRandom(randomIn)), 2 + randomIn.zrange(5));
}
}
@ -538,7 +538,7 @@ public class StructureScattered
if (!this.placedMainChest)
{
this.placedMainChest = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 8, -3, 3, RngLoot.addToList(LootConstants.JUNGLE_MAIN, Items.enchanted_book.getRandom(randomIn)), 2 + randomIn.zrange(5));
this.placedMainChest = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 8, -3, 3, RngLoot.addToList(LootConstants.JUNGLE_MAIN, ItemEnchantedBook.getRandom(randomIn)), 2 + randomIn.zrange(5));
}
this.setBlockState(worldIn, Blocks.mossy_cobblestone.getState(), 9, -3, 2, structureBoundingBoxIn);
@ -571,7 +571,7 @@ public class StructureScattered
if (!this.placedHiddenChest)
{
this.placedHiddenChest = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 9, -3, 10, RngLoot.addToList(LootConstants.JUNGLE_MAIN, Items.enchanted_book.getRandom(randomIn)), 2 + randomIn.zrange(5));
this.placedHiddenChest = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 9, -3, 10, RngLoot.addToList(LootConstants.JUNGLE_MAIN, ItemEnchantedBook.getRandom(randomIn)), 2 + randomIn.zrange(5));
}
return true;

View file

@ -11,8 +11,8 @@ import common.collect.Lists;
import common.collect.Maps;
import common.entity.npc.EntityHaunter;
import common.init.Blocks;
import common.init.Items;
import common.item.RngLoot;
import common.item.material.ItemEnchantedBook;
import common.rng.Random;
import common.tags.TagObject;
import common.util.BlockPos;
@ -303,7 +303,7 @@ public class StructureStronghold
if (!this.hasMadeChest && structureBoundingBoxIn.isVecInside(new BlockPos(this.getXWithOffset(3, 3), this.getYWithOffset(2), this.getZWithOffset(3, 3))))
{
this.hasMadeChest = true;
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 2, 3, RngLoot.addToList(LootConstants.STRONGHOLD_CHEST, Items.enchanted_book.getRandom(randomIn)), 2 + randomIn.zrange(2));
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 2, 3, RngLoot.addToList(LootConstants.STRONGHOLD_CHEST, ItemEnchantedBook.getRandom(randomIn)), 2 + randomIn.zrange(2));
}
return true;
@ -742,12 +742,12 @@ public class StructureStronghold
this.setBlockState(worldIn, Blocks.torch.getState(), i1, 8, j1 + 1, structureBoundingBoxIn);
}
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 3, 5, RngLoot.addToList(LootConstants.STRONGHOLD_LIBRARY, Items.enchanted_book.getRandom(randomIn, 1, 5, 2)), 1 + randomIn.zrange(4));
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 3, 5, RngLoot.addToList(LootConstants.STRONGHOLD_LIBRARY, ItemEnchantedBook.getRandom(randomIn, 1, 5, 2)), 1 + randomIn.zrange(4));
if (this.isLargeRoom)
{
this.setBlockState(worldIn, Blocks.air.getState(), 12, 9, 1, structureBoundingBoxIn);
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 12, 8, 1, RngLoot.addToList(LootConstants.STRONGHOLD_LIBRARY, Items.enchanted_book.getRandom(randomIn, 1, 5, 2)), 1 + randomIn.zrange(4));
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 12, 8, 1, RngLoot.addToList(LootConstants.STRONGHOLD_LIBRARY, ItemEnchantedBook.getRandom(randomIn, 1, 5, 2)), 1 + randomIn.zrange(4));
}
return true;
@ -1155,7 +1155,7 @@ public class StructureStronghold
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.ladder.getState().withProperty(BlockLadder.FACING, Facing.WEST)), 9, 1, 3, structureBoundingBoxIn);
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.ladder.getState().withProperty(BlockLadder.FACING, Facing.WEST)), 9, 2, 3, structureBoundingBoxIn);
this.setBlockState(worldIn, this.getMetadataWithOffset(Blocks.ladder.getState().withProperty(BlockLadder.FACING, Facing.WEST)), 9, 3, 3, structureBoundingBoxIn);
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 4, 8, RngLoot.addToList(LootConstants.STRONGHOLD_CROSS, Items.enchanted_book.getRandom(randomIn)), 1 + randomIn.zrange(4));
this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 4, 8, RngLoot.addToList(LootConstants.STRONGHOLD_CROSS, ItemEnchantedBook.getRandom(randomIn)), 1 + randomIn.zrange(4));
}
return true;