From b8a59651d0cc7c4296044dc638707d3c6b0c8e81 Mon Sep 17 00:00:00 2001 From: Alatyami Date: Sun, 30 Jul 2023 22:15:03 -0600 Subject: [PATCH] Fixed #16 Added Animal Traps that result in trapping entity drops. --- .../trapper/block/AnimalTrapBlock.java | 133 ++ .../block/entity/AnimalTrapBlockEntity.java | 318 ++++ .../block/entity/FishtrapBlockEntity.java | 5 +- .../block/entity/SpawnEggTrapBlockEntity.java | 4 +- .../init/GrowthcraftTrapperBlockEntities.java | 11 + .../init/GrowthcraftTrapperBlocks.java | 18 + .../trapper/init/GrowthcraftTrapperMenus.java | 9 +- .../trapper/screen/AnimalTrapMenu.java | 130 ++ .../trapper/screen/AnimalTrapScreen.java | 47 + .../growthcraft/trapper/shared/Reference.java | 17 +- .../trapper/utils/BlockPropertiesUtils.java | 9 + .../blockstates/animal_trap_copper.json | 27 + .../blockstates/animal_trap_diamond.json | 27 + .../blockstates/animal_trap_gold.json | 27 + .../blockstates/animal_trap_iron.json | 27 + .../growthcraft_trapper/lang/en_us.json | 16 +- .../models/block/animal_trap_copper.json | 1274 +++++++++++++++++ .../models/block/animal_trap_diamond.json | 1274 +++++++++++++++++ .../models/block/animal_trap_gold.json | 1274 +++++++++++++++++ .../models/block/animal_trap_iron.json | 1274 +++++++++++++++++ .../models/item/animal_trap_copper.json | 3 + .../models/item/animal_trap_diamond.json | 3 + .../models/item/animal_trap_gold.json | 3 + .../models/item/animal_trap_iron.json | 3 + .../textures/block/animal_trap_copper.png | Bin 0 -> 494 bytes .../block/animal_trap_copper_front.png | Bin 0 -> 498 bytes .../textures/block/animal_trap_diamond.png | Bin 0 -> 493 bytes .../block/animal_trap_diamond_front.png | Bin 0 -> 498 bytes .../textures/block/animal_trap_gold.png | Bin 0 -> 493 bytes .../textures/block/animal_trap_gold_front.png | Bin 0 -> 498 bytes .../blocks/animal_trap_copper.json | 19 + .../blocks/animal_trap_diamond.json | 19 + .../loot_tables/blocks/animal_trap_gold.json | 19 + .../loot_tables/blocks/animal_trap_iron.json | 19 + .../gameplay/trapping/animal_trap_carrot.json | 36 + .../gameplay/trapping/animal_trap_leaves.json | 101 ++ .../gameplay/trapping/animal_trap_seeds.json | 31 + .../gameplay/trapping/animal_trap_wheat.json | 26 + .../recipes/animal_trap_copper.json | 24 + .../recipes/animal_trap_diamond.json | 24 + .../recipes/animal_trap_gold.json | 24 + .../recipes/animal_trap_iron.json | 24 + 42 files changed, 6286 insertions(+), 13 deletions(-) create mode 100644 src/main/java/growthcraft/trapper/block/AnimalTrapBlock.java create mode 100644 src/main/java/growthcraft/trapper/block/entity/AnimalTrapBlockEntity.java create mode 100644 src/main/java/growthcraft/trapper/screen/AnimalTrapMenu.java create mode 100644 src/main/java/growthcraft/trapper/screen/AnimalTrapScreen.java create mode 100644 src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_copper.json create mode 100644 src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_diamond.json create mode 100644 src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_gold.json create mode 100644 src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_iron.json create mode 100644 src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_copper.json create mode 100644 src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_diamond.json create mode 100644 src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_gold.json create mode 100644 src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_iron.json create mode 100644 src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_copper.json create mode 100644 src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_diamond.json create mode 100644 src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_gold.json create mode 100644 src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_iron.json create mode 100644 src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_copper.png create mode 100644 src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_copper_front.png create mode 100644 src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_diamond.png create mode 100644 src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_diamond_front.png create mode 100644 src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_gold.png create mode 100644 src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_gold_front.png create mode 100644 src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_copper.json create mode 100644 src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_diamond.json create mode 100644 src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_gold.json create mode 100644 src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_iron.json create mode 100644 src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_carrot.json create mode 100644 src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_leaves.json create mode 100644 src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_seeds.json create mode 100644 src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_wheat.json create mode 100644 src/main/resources/data/growthcraft_trapper/recipes/animal_trap_copper.json create mode 100644 src/main/resources/data/growthcraft_trapper/recipes/animal_trap_diamond.json create mode 100644 src/main/resources/data/growthcraft_trapper/recipes/animal_trap_gold.json create mode 100644 src/main/resources/data/growthcraft_trapper/recipes/animal_trap_iron.json diff --git a/src/main/java/growthcraft/trapper/block/AnimalTrapBlock.java b/src/main/java/growthcraft/trapper/block/AnimalTrapBlock.java new file mode 100644 index 0000000..8b9fff7 --- /dev/null +++ b/src/main/java/growthcraft/trapper/block/AnimalTrapBlock.java @@ -0,0 +1,133 @@ +package growthcraft.trapper.block; + +import growthcraft.trapper.GrowthcraftTrapper; +import growthcraft.trapper.block.entity.AnimalTrapBlockEntity; +import growthcraft.trapper.init.GrowthcraftTrapperBlockEntities; +import growthcraft.trapper.utils.BlockPropertiesUtils; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.level.material.PushReaction; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraftforge.network.NetworkHooks; +import org.jetbrains.annotations.Nullable; + +public class AnimalTrapBlock extends BaseEntityBlock implements SimpleWaterloggedBlock { + + public static final DirectionProperty FACING = DirectionalBlock.FACING; + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + + private int processingFactor = 1; + + public AnimalTrapBlock() { + this(1); + } + + public AnimalTrapBlock(int processingFactor) { + super(BlockPropertiesUtils.getInitProperties("animal_trap", Blocks.IRON_BLOCK)); + this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, Boolean.valueOf(false))); + this.processingFactor = processingFactor; + } + + @Override + public InteractionResult use(BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) { + if (!level.isClientSide) { + // Play sound + level.playSound(player, blockPos, SoundEvents.BARREL_OPEN, SoundSource.BLOCKS, 1.0F, 1.0F); + // Open the menu container + try { + AnimalTrapBlockEntity blockEntity = (AnimalTrapBlockEntity) level.getBlockEntity(blockPos); + NetworkHooks.openScreen(((ServerPlayer) player), blockEntity, blockPos); + } catch (Exception ex) { + GrowthcraftTrapper.LOGGER.error(String.format("%s unable to open AnimalTrapBlockEntity GUI at %s.", player.getDisplayName().getString(), blockPos)); + GrowthcraftTrapper.LOGGER.error(ex.getMessage()); + } + + } else { + + } + return InteractionResult.SUCCESS; + } + + @Override + public RenderShape getRenderShape(BlockState p_49232_) { + return RenderShape.MODEL; + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + BlockState blockState = this.defaultBlockState(); + + return blockState.setValue(FACING, context.getClickedFace()).setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder blockStateBuilder) { + blockStateBuilder.add(FACING, WATERLOGGED); + } + + @Override + public PushReaction getPistonPushReaction(BlockState p_60584_) { + return PushReaction.DESTROY; + } + + @Override + public FluidState getFluidState(BlockState blockState) { + return Boolean.TRUE.equals(blockState.getValue(WATERLOGGED)) + ? Fluids.WATER.getSource(false) + : super.getFluidState(blockState); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return GrowthcraftTrapperBlockEntities.ANIMAL_TRAP_BLOCK_ENTITY.get().create(blockPos, blockState); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType blockEntityType) { + return createTickerHelper( + blockEntityType, + GrowthcraftTrapperBlockEntities.ANIMAL_TRAP_BLOCK_ENTITY.get(), + (worldLevel, pos, state, blockEntity) -> blockEntity.tick() + ); + } + + @Override + public void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState newBlockState, boolean isMoving) { + if (blockState.getBlock() != newBlockState.getBlock()) { + try { + AnimalTrapBlockEntity blockEntity = (AnimalTrapBlockEntity) level.getBlockEntity(blockPos); + blockEntity.dropItems(); + } catch (Exception ex) { + GrowthcraftTrapper.LOGGER.error(String.format("Invalid blockEntity type at %s, expected AnimalTrapBlockEntity", blockPos)); + } + } + super.onRemove(blockState, level, blockPos, newBlockState, isMoving); + } + + public int getProcessingFactor() { + return processingFactor; + } +} diff --git a/src/main/java/growthcraft/trapper/block/entity/AnimalTrapBlockEntity.java b/src/main/java/growthcraft/trapper/block/entity/AnimalTrapBlockEntity.java new file mode 100644 index 0000000..ea3c27f --- /dev/null +++ b/src/main/java/growthcraft/trapper/block/entity/AnimalTrapBlockEntity.java @@ -0,0 +1,318 @@ +package growthcraft.trapper.block.entity; + +import growthcraft.trapper.GrowthcraftTrapper; +import growthcraft.trapper.block.AnimalTrapBlock; +import growthcraft.trapper.init.GrowthcraftTrapperBlockEntities; +import growthcraft.trapper.init.config.GrowthcraftTrapperConfig; +import growthcraft.trapper.lib.handler.WrappedInventoryHandler; +import growthcraft.trapper.lib.utils.BlockStateUtils; +import growthcraft.trapper.lib.utils.TickUtils; +import growthcraft.trapper.screen.AnimalTrapMenu; +import growthcraft.trapper.shared.Reference; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.Connection; +import net.minecraft.network.chat.Component; +import net.minecraft.network.protocol.Packet; +import net.minecraft.network.protocol.game.ClientGamePacketListener; +import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.tags.ItemTags; +import net.minecraft.world.Containers; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.SimpleContainer; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.LiquidBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.storage.loot.*; +import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; +import net.minecraft.world.level.storage.loot.parameters.LootContextParams; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.common.Tags; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.ItemStackHandler; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +public class AnimalTrapBlockEntity extends BlockEntity implements BlockEntityTicker, MenuProvider { + + private final int minTick = TickUtils.toTicks(GrowthcraftTrapperConfig.getMinTickFishingInMinutes(), "minutes"); + private final int maxTick = TickUtils.toTicks(GrowthcraftTrapperConfig.getMaxTickFishingInMinutes(), "minutes"); + private int tickTimer = 0; + private int tickCooldown = 0; + + private Component customName; + + private final ItemStackHandler itemStackHandler = new ItemStackHandler(7) { + @Override + protected void onContentsChanged(int slot) { + setChanged(); + } + + @Override + public boolean isItemValid(int slot, @NotNull ItemStack stack) { + return switch (slot) { + case 0 -> true; + case 1 -> false; + case 2 -> false; + case 3 -> false; + case 4 -> false; + case 5 -> false; + case 6 -> false; + default -> false; + }; + } + }; + + private LazyOptional itemHandlerLazyOptional = LazyOptional.empty(); + + private final Map> directionWrappedHandlerMap = + Map.of( + Direction.UP, LazyOptional.of(() -> new WrappedInventoryHandler( + itemStackHandler, + (index) -> index == 0, + (index, stack) -> itemStackHandler.isItemValid(0, stack)) + ), + Direction.DOWN, LazyOptional.of(() -> new WrappedInventoryHandler( + itemStackHandler, + (i) -> i >= 1, + (i, s) -> false) + ), + Direction.NORTH, LazyOptional.of(() -> new WrappedInventoryHandler( + itemStackHandler, + (index) -> index == 0, + (index, stack) -> itemStackHandler.isItemValid(0, stack)) + ), + Direction.SOUTH, LazyOptional.of(() -> new WrappedInventoryHandler( + itemStackHandler, + (index) -> index == 0, + (index, stack) -> itemStackHandler.isItemValid(0, stack)) + ), + Direction.EAST, LazyOptional.of(() -> new WrappedInventoryHandler( + itemStackHandler, + (index) -> index == 0, + (index, stack) -> itemStackHandler.isItemValid(0, stack)) + ), + Direction.WEST, LazyOptional.of(() -> new WrappedInventoryHandler( + itemStackHandler, + (index) -> index == 0, + (index, stack) -> itemStackHandler.isItemValid(0, stack)) + ) + ); + + public AnimalTrapBlockEntity(BlockPos blockPos, BlockState blockState) { + super(GrowthcraftTrapperBlockEntities.ANIMAL_TRAP_BLOCK_ENTITY.get(), blockPos, blockState); + } + + public void tick() { + if (this.getLevel() != null) { + this.tick(this.getLevel(), this.getBlockPos(), this.getBlockState(), this); + } + } + + @Override + public void tick(Level level, BlockPos blockPos, BlockState blockState, AnimalTrapBlockEntity blockEntity) { + if (level.isClientSide) return; + + if (GrowthcraftTrapperConfig.isDebugEnabled() && (tickTimer % 100 == 0)) { + GrowthcraftTrapper.LOGGER.debug(String.format("AnimalTrapBlockEntity [%s] - tickTimer - %d/%d ", blockPos.toShortString(), tickTimer, tickCooldown)); + } + + tickTimer++; + + if (tickCooldown != 0 && tickTimer > tickCooldown && canDoTrapping(level, blockPos)) { + this.doTrapping(blockPos); + tickTimer = 0; + tickCooldown = TickUtils.getRandomTickCooldown(minTick, maxTick) / ((AnimalTrapBlock) level.getBlockState(blockPos).getBlock()).getProcessingFactor(); + } else if(tickCooldown == 0 && canDoTrapping(level,blockPos)) { + tickCooldown = TickUtils.getRandomTickCooldown(minTick, maxTick) / ((AnimalTrapBlock) level.getBlockState(blockPos).getBlock()).getProcessingFactor(); + } + } + + private boolean canDoTrapping(Level level, BlockPos blockPos) { + Map blockMap = BlockStateUtils.getSurroundingBlocks(level, blockPos); + + if (blockMap.get("up") != Blocks.AIR) return false; + + List horizontalBlocks = Arrays.asList(blockMap.get("north"), blockMap.get("north"), blockMap.get("north"), blockMap.get("north")); + + for (Block block : horizontalBlocks) { + if (block == Blocks.AIR || block instanceof LiquidBlock) return false; + } + + return true; + } + + private void doTrapping(@NotNull BlockPos blockPos) { + if (level == null) return; + + ItemStack baitItemStack = itemStackHandler.getStackInSlot(0); + + LootDataManager lootDataManager = Objects.requireNonNull(level.getServer()).getLootData(); + LootTable lootTable; + + String lootTableType = ""; + + // Depending on the bait that was used, determines what gets caught. + if (baitItemStack.is(Tags.Items.CROPS_WHEAT)) { + lootTableType = "wheat"; + lootTable = lootDataManager.getElement(LootDataType.TABLE, Reference.LootTables.ANIMAL_TRAP_WHEAT); + } else if (baitItemStack.is(Tags.Items.CROPS_CARROT)) { + lootTableType = "carrot"; + lootTable = lootDataManager.getElement(LootDataType.TABLE, Reference.LootTables.ANIMAL_TRAP_CARROT); + } else if (baitItemStack.is(Tags.Items.SEEDS_WHEAT)) { + lootTableType = "seeds_wheat"; + lootTable = lootDataManager.getElement(LootDataType.TABLE, Reference.LootTables.ANIMAL_TRAP_SEEDS); + } else if (baitItemStack.is(ItemTags.LEAVES)) { + lootTableType = "leaves"; + lootTable = lootDataManager.getElement(LootDataType.TABLE, Reference.LootTables.ANIMAL_TRAP_LEAVES); + } else { + lootTableType = "invalid_bait"; + lootTable = lootDataManager.getElement(LootDataType.TABLE, BuiltInLootTables.EMPTY); + } + + GrowthcraftTrapper.LOGGER.debug( + String.format("AnimalTrapBlockEntity [%s] - doTrapping - Bait [%s], LootTableType [%s].", blockPos.toShortString(), baitItemStack, lootTable.getLootTableId()) + ); + + // If loot table is null, fail now. + if (lootTable == null) return; + + LootParams lootContext = new LootParams.Builder((ServerLevel) level) + .withParameter(LootContextParams.ORIGIN, new Vec3(blockPos.getX(), blockPos.getY(), blockPos.getZ())) + .create(LootContextParamSets.EMPTY); + + List lootItemStacks = lootTable.getRandomItems(lootContext); + + for (ItemStack itemStack : lootItemStacks) { + if (GrowthcraftTrapperConfig.isDebugEnabled() && ( (tickTimer % 100 == 0) || tickTimer >= tickCooldown ) ) { + GrowthcraftTrapper.LOGGER.debug( + String.format("AnimalTrapBlockEntity [%s] - doTrapping - Caught a %s from %s loot table.", blockPos.toShortString(), itemStack, lootTableType) + ); + } + + if (itemStack.getItem() != Items.AIR) { + for (int i = 1; i < itemStackHandler.getSlots(); i++) { + ItemStack storedItemStack = itemStackHandler.getStackInSlot(i); + if (itemStackHandler.getStackInSlot(i).isEmpty() || storedItemStack.getItem() == itemStack.getItem()) { + itemStackHandler.setStackInSlot(i, new ItemStack(itemStack.getItem(), itemStackHandler.getStackInSlot(i).getCount() + 1)); + break; + } + } + } + } + + itemStackHandler.getStackInSlot(0).shrink(1); + + this.getLevel().playSound(null, this.worldPosition, SoundEvents.TRIPWIRE_CLICK_ON, SoundSource.BLOCKS, 0.5F, 0.5F); + + } + + @Nullable + @Override + public Packet getUpdatePacket() { + return ClientboundBlockEntityDataPacket.create(this); + } + + @Override + public CompoundTag getUpdateTag() { + return this.serializeNBT(); + } + + @Override + public void handleUpdateTag(CompoundTag tag) { + this.load(tag); + } + + @Override + public void load(CompoundTag nbt) { + super.load(nbt); + itemStackHandler.deserializeNBT(nbt.getCompound("inventory")); + this.tickTimer = nbt.getInt("tickTimer"); + this.tickCooldown = nbt.getInt("tickCooldown"); + + if (nbt.contains("CustomName", 8)) { + this.customName = Component.Serializer.fromJson(nbt.getString("CustomName")); + } + } + + @Override + public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) { + this.load(pkt.getTag()); + } + + @Override + public void onLoad() { + super.onLoad(); + itemHandlerLazyOptional = LazyOptional.of(() -> itemStackHandler); + } + + @Override + public void invalidateCaps() { + super.invalidateCaps(); + itemHandlerLazyOptional.invalidate(); + } + + @Override + protected void saveAdditional(CompoundTag nbt) { + nbt.put("inventory", itemStackHandler.serializeNBT()); + nbt.putInt("tickTimer", this.tickTimer); + nbt.putInt("tickCooldown", this.tickCooldown); + if (this.customName != null) { + nbt.putString("CustomName", Component.Serializer.toJson(this.customName)); + } + super.saveAdditional(nbt); + } + + @Override + public Component getDisplayName() { + return Component.translatable("container.growthcraft_trapper.animal_trap"); + } + + @Nullable + @Override + public AbstractContainerMenu createMenu(int containerId, Inventory inventory, Player player) { + return new AnimalTrapMenu(containerId, inventory, this); + } + + @NotNull + @Override + public LazyOptional getCapability(@NotNull Capability cap, @Nullable Direction side) { + if (cap == ForgeCapabilities.ITEM_HANDLER) { + if (side == null) return itemHandlerLazyOptional.cast(); + + if (directionWrappedHandlerMap.containsKey(side)) { + return directionWrappedHandlerMap.get(side).cast(); + } + } + return super.getCapability(cap, side); + } + + public void dropItems() { + SimpleContainer inventory = new SimpleContainer(itemStackHandler.getSlots()); + for (int i = 0; i < itemStackHandler.getSlots(); i++) { + inventory.setItem(i, itemStackHandler.getStackInSlot(i)); + } + Containers.dropContents(this.getLevel(), this.worldPosition, inventory); + } +} diff --git a/src/main/java/growthcraft/trapper/block/entity/FishtrapBlockEntity.java b/src/main/java/growthcraft/trapper/block/entity/FishtrapBlockEntity.java index dd98efb..eff0a60 100644 --- a/src/main/java/growthcraft/trapper/block/entity/FishtrapBlockEntity.java +++ b/src/main/java/growthcraft/trapper/block/entity/FishtrapBlockEntity.java @@ -31,6 +31,7 @@ import net.minecraft.world.item.enchantment.Enchantments; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.LiquidBlock; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; @@ -135,6 +136,8 @@ public void tick(Level level, BlockPos blockPos, BlockState blockState, Fishtrap this.doFishing(blockPos); tickTimer = 0; tickCooldown = TickUtils.getRandomTickCooldown(minTickFishing, maxTickFishing); + } else if(tickCooldown == 0 && canDoFishing(level,blockPos)) { + tickCooldown = TickUtils.getRandomTickCooldown(minTickFishing, maxTickFishing); } } @@ -212,7 +215,7 @@ private void doFishing(BlockPos blockPos) { for (int i = 1; i < itemStackHandler.getSlots(); i++) { ItemStack storedItemStack = itemStackHandler.getStackInSlot(i); if (itemStackHandler.getStackInSlot(i).isEmpty() || storedItemStack.getItem() == itemStack.getItem()) { - itemStackHandler.insertItem(i, itemStack, false); + itemStackHandler.setStackInSlot(i, new ItemStack(itemStack.getItem(), itemStackHandler.getStackInSlot(i).getCount() + 1)); break; } } diff --git a/src/main/java/growthcraft/trapper/block/entity/SpawnEggTrapBlockEntity.java b/src/main/java/growthcraft/trapper/block/entity/SpawnEggTrapBlockEntity.java index 5f1bda5..04e0b40 100644 --- a/src/main/java/growthcraft/trapper/block/entity/SpawnEggTrapBlockEntity.java +++ b/src/main/java/growthcraft/trapper/block/entity/SpawnEggTrapBlockEntity.java @@ -134,6 +134,8 @@ public void tick(Level level, BlockPos blockPos, BlockState blockState, SpawnEgg this.doTrapping(blockPos); tickTimer = 0; tickCooldown = TickUtils.getRandomTickCooldown(minTick, maxTick); + } else if(tickCooldown == 0 && canDoTrapping(level,blockPos)) { + tickCooldown = TickUtils.getRandomTickCooldown(minTick, maxTick); } } @@ -198,7 +200,7 @@ private void doTrapping(@NotNull BlockPos blockPos) { for (int i = 1; i < itemStackHandler.getSlots(); i++) { ItemStack storedItemStack = itemStackHandler.getStackInSlot(i); if (itemStackHandler.getStackInSlot(i).isEmpty() || storedItemStack.getItem() == itemStack.getItem()) { - itemStackHandler.insertItem(i, itemStack, false); + itemStackHandler.setStackInSlot(i, new ItemStack(itemStack.getItem(), itemStackHandler.getStackInSlot(i).getCount() + 1)); break; } } diff --git a/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperBlockEntities.java b/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperBlockEntities.java index 1e9e146..8e8056d 100644 --- a/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperBlockEntities.java +++ b/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperBlockEntities.java @@ -1,5 +1,6 @@ package growthcraft.trapper.init; +import growthcraft.trapper.block.entity.AnimalTrapBlockEntity; import growthcraft.trapper.block.entity.FishtrapBlockEntity; import growthcraft.trapper.block.entity.SpawnEggTrapBlockEntity; import growthcraft.trapper.shared.Reference; @@ -32,6 +33,16 @@ public class GrowthcraftTrapperBlockEntities { ).build(null) ); + public static final RegistryObject> ANIMAL_TRAP_BLOCK_ENTITY = BLOCK_ENTITIES.register( + Reference.UnlocalizedName.ANIMAL_TRAP, + () -> BlockEntityType.Builder.of(AnimalTrapBlockEntity::new, + GrowthcraftTrapperBlocks.ANIMAL_TRAP_IRON.get(), + GrowthcraftTrapperBlocks.ANIMAL_TRAP_COPPER.get(), + GrowthcraftTrapperBlocks.ANIMAL_TRAP_GOLD.get(), + GrowthcraftTrapperBlocks.ANIMAL_TRAP_DIAMOND.get() + ).build(null) + ); + public static final RegistryObject> SPAWNEGGTRAP_BLOCK_ENTITY = BLOCK_ENTITIES.register( Reference.UnlocalizedName.SPAWNEGGTRAP, () -> BlockEntityType.Builder.of(SpawnEggTrapBlockEntity::new, diff --git a/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperBlocks.java b/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperBlocks.java index 206b9aa..094eddc 100644 --- a/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperBlocks.java +++ b/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperBlocks.java @@ -1,5 +1,6 @@ package growthcraft.trapper.init; +import growthcraft.trapper.block.AnimalTrapBlock; import growthcraft.trapper.block.FishtrapBlock; import growthcraft.trapper.block.SpawnEggTrapBlock; import growthcraft.trapper.shared.Reference; @@ -18,6 +19,23 @@ public class GrowthcraftTrapperBlocks { public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, Reference.MODID); + public static final RegistryObject ANIMAL_TRAP_COPPER = registerBlock( + Reference.UnlocalizedName.ANIMAL_TRAP_COPPER, + () -> new AnimalTrapBlock(1) + ); + public static final RegistryObject ANIMAL_TRAP_DIAMOND = registerBlock( + Reference.UnlocalizedName.ANIMAL_TRAP_DIAMOND, + () -> new AnimalTrapBlock(4) + ); + public static final RegistryObject ANIMAL_TRAP_GOLD = registerBlock( + Reference.UnlocalizedName.ANIMAL_TRAP_GOLD, + () -> new AnimalTrapBlock(3) + ); + public static final RegistryObject ANIMAL_TRAP_IRON = registerBlock( + Reference.UnlocalizedName.ANIMAL_TRAP_IRON, + () -> new AnimalTrapBlock(2) + ); + public static final RegistryObject FISHTRAP_OAK = registerBlock( Reference.UnlocalizedName.FISHTRAP_OAK, FishtrapBlock::new diff --git a/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperMenus.java b/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperMenus.java index 1db9813..4928ba0 100644 --- a/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperMenus.java +++ b/src/main/java/growthcraft/trapper/init/GrowthcraftTrapperMenus.java @@ -1,9 +1,6 @@ package growthcraft.trapper.init; -import growthcraft.trapper.screen.FishtrapMenu; -import growthcraft.trapper.screen.FishtrapScreen; -import growthcraft.trapper.screen.SpawnEggTrapMenu; -import growthcraft.trapper.screen.SpawnEggTrapScreen; +import growthcraft.trapper.screen.*; import growthcraft.trapper.shared.Reference; import net.minecraft.client.gui.screens.MenuScreens; import net.minecraft.world.inventory.AbstractContainerMenu; @@ -20,6 +17,9 @@ public class GrowthcraftTrapperMenus { ForgeRegistries.MENU_TYPES, Reference.MODID ); + public static final RegistryObject> ANIMAL_TRAP_MENU = + registerMenuType(Reference.UnlocalizedName.ANIMAL_TRAP_CONTAINER, AnimalTrapMenu::new); + public static final RegistryObject> FISHTRAP_MENU = registerMenuType(Reference.UnlocalizedName.FISHTRAP, FishtrapMenu::new); @@ -32,6 +32,7 @@ private static RegistryObject> reg } public static void registerMenus() { + MenuScreens.register(ANIMAL_TRAP_MENU.get(), AnimalTrapScreen::new); MenuScreens.register(FISHTRAP_MENU.get(), FishtrapScreen::new); MenuScreens.register(SPAWNEGGTRAP_MENU.get(), SpawnEggTrapScreen::new); } diff --git a/src/main/java/growthcraft/trapper/screen/AnimalTrapMenu.java b/src/main/java/growthcraft/trapper/screen/AnimalTrapMenu.java new file mode 100644 index 0000000..adbbe2f --- /dev/null +++ b/src/main/java/growthcraft/trapper/screen/AnimalTrapMenu.java @@ -0,0 +1,130 @@ +package growthcraft.trapper.screen; + +import growthcraft.trapper.block.AnimalTrapBlock; +import growthcraft.trapper.block.entity.AnimalTrapBlockEntity; +import growthcraft.trapper.init.GrowthcraftTrapperMenus; +import growthcraft.trapper.screen.slot.ResultSlot; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ContainerLevelAccess; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.minecraftforge.items.SlotItemHandler; + +public class AnimalTrapMenu extends AbstractContainerMenu { + + private final AnimalTrapBlockEntity trapBlockEntity; + private final AnimalTrapBlock trapBlock; + + private final Level level; + + public AnimalTrapMenu(int containerId, Inventory inventory, FriendlyByteBuf extraData) { + this(containerId, inventory, inventory.player.level().getBlockEntity(extraData.readBlockPos())); + } + + public AnimalTrapMenu(int containerId, Inventory inventory, BlockEntity blockEntity) { + super(GrowthcraftTrapperMenus.ANIMAL_TRAP_MENU.get(), containerId); + + checkContainerSize(inventory, 7); + this.trapBlockEntity = (AnimalTrapBlockEntity) blockEntity; + + this.trapBlock = (AnimalTrapBlock) inventory.player.level().getBlockEntity(this.trapBlockEntity.getBlockPos()).getBlockState().getBlock(); + + this.level = inventory.player.level(); + + addPlayerInventory(inventory); + addPlayerHotbar(inventory); + + // Add our block's inventory slots. + this.trapBlockEntity.getCapability(ForgeCapabilities.ITEM_HANDLER).ifPresent(handler -> { + // 1 Input Slot + this.addSlot(new SlotItemHandler(handler, 0, 17, 20)); + // 6 Output Slots + for (int i = 0; i < 6; i++) { + this.addSlot(new ResultSlot(handler, i + 1, 44 + (i * 18), 20)); + } + } + ); + } + + // CREDIT GOES TO: diesieben07 | https://github.com/diesieben07/SevenCommons + // must assign a slot number to each of the slots used by the GUI. + // For this container, we can see both the tile inventory's slots as well as the player inventory slots and the hotbar. + // Each time we add a Slot to the container, it automatically increases the slotIndex, which means + // 0 - 8 = hotbar slots (which will map to the InventoryPlayer slot numbers 0 - 8) + // 9 - 35 = player inventory slots (which map to the InventoryPlayer slot numbers 9 - 35) + // 36 - 44 = TileInventory slots, which map to our TileEntity slot numbers 0 - 8) + private static final int HOTBAR_SLOT_COUNT = 9; + private static final int PLAYER_INVENTORY_ROW_COUNT = 3; + private static final int PLAYER_INVENTORY_COLUMN_COUNT = 9; + private static final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_COLUMN_COUNT * PLAYER_INVENTORY_ROW_COUNT; + private static final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT; + private static final int VANILLA_FIRST_SLOT_INDEX = 0; + private static final int TE_INVENTORY_FIRST_SLOT_INDEX = VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT; + + private static final int TE_INVENTORY_SLOT_COUNT = 7; // must be the number of slots you have! + + @Override + public ItemStack quickMoveStack(Player playerIn, int index) { + Slot sourceSlot = slots.get(index); + if (sourceSlot == null || !sourceSlot.hasItem()) return ItemStack.EMPTY; //EMPTY_ITEM + ItemStack sourceStack = sourceSlot.getItem(); + ItemStack copyOfSourceStack = sourceStack.copy(); + + // Check if the slot clicked is one of the vanilla container slots + if (index < VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT) { + // This is a vanilla container slot so merge the stack into the tile inventory + if (!moveItemStackTo(sourceStack, TE_INVENTORY_FIRST_SLOT_INDEX, TE_INVENTORY_FIRST_SLOT_INDEX + + TE_INVENTORY_SLOT_COUNT, false)) { + return ItemStack.EMPTY; // EMPTY_ITEM + } + } else if (index < TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT) { + // This is a TE slot so merge the stack into the players inventory + if (!moveItemStackTo(sourceStack, VANILLA_FIRST_SLOT_INDEX, VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT, false)) { + return ItemStack.EMPTY; + } + } else { + System.out.println("Invalid slotIndex:" + index); + return ItemStack.EMPTY; + } + // If stack size == 0 (the entire stack was moved) set slot contents to null + if (sourceStack.getCount() == 0) { + sourceSlot.set(ItemStack.EMPTY); + } else { + sourceSlot.setChanged(); + } + sourceSlot.onTake(playerIn, sourceStack); + return copyOfSourceStack; + } + + @Override + public boolean stillValid(Player player) { + return stillValid( + ContainerLevelAccess.create( + this.level, + this.trapBlockEntity.getBlockPos() + ), + player, + this.trapBlock + ); + } + + private void addPlayerInventory(Inventory playerInventory) { + for (int i = 0; i < 3; ++i) { + for (int l = 0; l < 9; ++l) { + this.addSlot(new Slot(playerInventory, l + i * 9 + 9, 8 + l * 18, 51 + i * 18)); + } + } + } + + private void addPlayerHotbar(Inventory playerInventory) { + for (int i = 0; i < 9; ++i) { + this.addSlot(new Slot(playerInventory, i, 8 + i * 18, 109)); + } + } +} diff --git a/src/main/java/growthcraft/trapper/screen/AnimalTrapScreen.java b/src/main/java/growthcraft/trapper/screen/AnimalTrapScreen.java new file mode 100644 index 0000000..0e0eefb --- /dev/null +++ b/src/main/java/growthcraft/trapper/screen/AnimalTrapScreen.java @@ -0,0 +1,47 @@ +package growthcraft.trapper.screen; + +import com.mojang.blaze3d.systems.RenderSystem; +import growthcraft.trapper.shared.Reference; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; +import net.minecraft.client.renderer.GameRenderer; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; + +public class AnimalTrapScreen extends AbstractContainerScreen { + + private static final ResourceLocation TEXTURE = new ResourceLocation(Reference.MODID, + "textures/gui/fishtrap_screen.png"); + + public AnimalTrapScreen(AnimalTrapMenu menu, Inventory inventory, Component component) { + super(menu, inventory, component); + } + + @Override + protected void renderBg(GuiGraphics poseStack, float partialTick, int mouseX, int mouseY) { + RenderSystem.setShader(GameRenderer::getPositionTexShader); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.setShaderTexture(0, TEXTURE); + + int x = (width - imageWidth) / 2; + int y = (height - imageHeight) / 2; + + poseStack.blit(TEXTURE, x, y, 0, 0, imageWidth, imageHeight); + } + + @Override + public void render(GuiGraphics poseStack, int mouseX, int mouseY, float delta) { + renderBackground(poseStack); + super.render(poseStack, mouseX, mouseY, delta); + renderTooltip(poseStack, mouseX, mouseY); + } + + @Override + protected void renderLabels(GuiGraphics guiGraphics, int p_97809_, int p_97810_) { + guiGraphics.drawString(this.font, this.title, + this.titleLabelX, this.titleLabelY, 4210752, false); + guiGraphics.drawString(this.font, this.playerInventoryTitle, + this.inventoryLabelX, this.inventoryLabelY - 32, 4210752, false); + } +} diff --git a/src/main/java/growthcraft/trapper/shared/Reference.java b/src/main/java/growthcraft/trapper/shared/Reference.java index 1be2d81..455de29 100644 --- a/src/main/java/growthcraft/trapper/shared/Reference.java +++ b/src/main/java/growthcraft/trapper/shared/Reference.java @@ -12,8 +12,15 @@ public class Reference { private Reference() { /* Prevent default public constructor */ } public static class UnlocalizedName { - public static final String FISHTRAP = "fishtrap"; + public static final String ANIMAL_TRAP = "animal_trap"; + public static final String ANIMAL_TRAP_CONTAINER = "animal_trap_container"; + + public static final String ANIMAL_TRAP_COPPER = "animal_trap_copper"; + public static final String ANIMAL_TRAP_DIAMOND = "animal_trap_diamond"; + public static final String ANIMAL_TRAP_GOLD = "animal_trap_gold"; + public static final String ANIMAL_TRAP_IRON = "animal_trap_iron"; + public static final String FISHTRAP = "fishtrap"; public static final String FISHTRAP_CONTAINER = "fishtrap_container"; public static final String FISHTRAP_OAK = "fishtrap_oak"; public static final String FISHTRAP_ACACIA = "fishtrap_acacia"; @@ -28,6 +35,7 @@ public static class UnlocalizedName { public static final String FISHTRAP_WARPED = "fishtrap_warped"; public static final String SPAWNEGGTRAP = "spawneggtrap"; + public static final String TAG_FISHING_BAIT = "fishing_bait"; public static final String SOUND_FISHTRAP_OPEN = "fishtrap_open"; @@ -38,10 +46,15 @@ private UnlocalizedName() { /* Disable default public constructor. */ } } public static class LootTables { - public static final ResourceLocation SPAWNEGGTRAP_WHEAT = new ResourceLocation(Reference.MODID, "gameplay/trapping/spawneggtrap_wheat"); + + public static final ResourceLocation ANIMAL_TRAP_CARROT = new ResourceLocation(Reference.MODID, "gameplay/trapping/animal_trap_carrot"); + public static final ResourceLocation ANIMAL_TRAP_LEAVES = new ResourceLocation(Reference.MODID, "gameplay/trapping/animal_trap_leaves"); + public static final ResourceLocation ANIMAL_TRAP_SEEDS = new ResourceLocation(Reference.MODID, "gameplay/trapping/animal_trap_seeds"); + public static final ResourceLocation ANIMAL_TRAP_WHEAT = new ResourceLocation(Reference.MODID, "gameplay/trapping/animal_trap_wheat"); public static final ResourceLocation FISHTRAP_BAIT = new ResourceLocation(Reference.MODID, "gameplay/trapping/fishtrap_bait"); public static final ResourceLocation FISHTRAP_BAIT_FORTUNE = new ResourceLocation(Reference.MODID, "gameplay/trapping/fishtrap_bait_fortune"); public static final ResourceLocation FISHTRAP_BAIT_JUNK = new ResourceLocation(Reference.MODID, "gameplay/trapping/fishtrap_bait_junk"); + public static final ResourceLocation SPAWNEGGTRAP_WHEAT = new ResourceLocation(Reference.MODID, "gameplay/trapping/spawneggtrap_wheat"); } } diff --git a/src/main/java/growthcraft/trapper/utils/BlockPropertiesUtils.java b/src/main/java/growthcraft/trapper/utils/BlockPropertiesUtils.java index 851b0ee..f8209fa 100644 --- a/src/main/java/growthcraft/trapper/utils/BlockPropertiesUtils.java +++ b/src/main/java/growthcraft/trapper/utils/BlockPropertiesUtils.java @@ -40,6 +40,15 @@ public static BlockBehaviour.Properties getInitProperties(String blockType, Bloc properties.isSuffocating(BlockPropertiesUtils::never); properties.isViewBlocking(BlockPropertiesUtils::never); } + case "animal_trap" -> { + properties.sound(SoundType.CHAIN); + properties.strength(2.0F, 3.0F); + properties.noOcclusion(); + properties.isValidSpawn(BlockPropertiesUtils::never); + properties.isRedstoneConductor(BlockPropertiesUtils::never); + properties.isSuffocating(BlockPropertiesUtils::never); + properties.isViewBlocking(BlockPropertiesUtils::never); + } default -> { // Do nothing. } diff --git a/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_copper.json b/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_copper.json new file mode 100644 index 0000000..bd06c0b --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_copper.json @@ -0,0 +1,27 @@ +{ + "variants": { + "facing=north": { + "model": "growthcraft_trapper:block/animal_trap_copper" + }, + "facing=south": { + "model": "growthcraft_trapper:block/animal_trap_copper", + "y": 180 + }, + "facing=west": { + "model": "growthcraft_trapper:block/animal_trap_copper", + "y": 270 + }, + "facing=east": { + "model": "growthcraft_trapper:block/animal_trap_copper", + "y": 90 + }, + "facing=up": { + "model": "growthcraft_trapper:block/animal_trap_copper", + "x": -90 + }, + "facing=down": { + "model": "growthcraft_trapper:block/animal_trap_copper", + "x": 90 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_diamond.json b/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_diamond.json new file mode 100644 index 0000000..adacf7a --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_diamond.json @@ -0,0 +1,27 @@ +{ + "variants": { + "facing=north": { + "model": "growthcraft_trapper:block/animal_trap_diamond" + }, + "facing=south": { + "model": "growthcraft_trapper:block/animal_trap_diamond", + "y": 180 + }, + "facing=west": { + "model": "growthcraft_trapper:block/animal_trap_diamond", + "y": 270 + }, + "facing=east": { + "model": "growthcraft_trapper:block/animal_trap_diamond", + "y": 90 + }, + "facing=up": { + "model": "growthcraft_trapper:block/animal_trap_diamond", + "x": -90 + }, + "facing=down": { + "model": "growthcraft_trapper:block/animal_trap_diamond", + "x": 90 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_gold.json b/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_gold.json new file mode 100644 index 0000000..d9a5c4e --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_gold.json @@ -0,0 +1,27 @@ +{ + "variants": { + "facing=north": { + "model": "growthcraft_trapper:block/animal_trap_gold" + }, + "facing=south": { + "model": "growthcraft_trapper:block/animal_trap_gold", + "y": 180 + }, + "facing=west": { + "model": "growthcraft_trapper:block/animal_trap_gold", + "y": 270 + }, + "facing=east": { + "model": "growthcraft_trapper:block/animal_trap_gold", + "y": 90 + }, + "facing=up": { + "model": "growthcraft_trapper:block/animal_trap_gold", + "x": -90 + }, + "facing=down": { + "model": "growthcraft_trapper:block/animal_trap_gold", + "x": 90 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_iron.json b/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_iron.json new file mode 100644 index 0000000..0020b30 --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/blockstates/animal_trap_iron.json @@ -0,0 +1,27 @@ +{ + "variants": { + "facing=north": { + "model": "growthcraft_trapper:block/animal_trap_iron" + }, + "facing=south": { + "model": "growthcraft_trapper:block/animal_trap_iron", + "y": 180 + }, + "facing=west": { + "model": "growthcraft_trapper:block/animal_trap_iron", + "y": 270 + }, + "facing=east": { + "model": "growthcraft_trapper:block/animal_trap_iron", + "y": 90 + }, + "facing=up": { + "model": "growthcraft_trapper:block/animal_trap_iron", + "x": -90 + }, + "facing=down": { + "model": "growthcraft_trapper:block/animal_trap_iron", + "x": 90 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/lang/en_us.json b/src/main/resources/assets/growthcraft_trapper/lang/en_us.json index 63a30d6..4aaea45 100644 --- a/src/main/resources/assets/growthcraft_trapper/lang/en_us.json +++ b/src/main/resources/assets/growthcraft_trapper/lang/en_us.json @@ -1,16 +1,22 @@ { - "block.growthcraft_trapper.fishtrap_oak": "Fishtrap (Oak)", + "block.growthcraft_trapper.animal_trap": "Animal Trap", + "block.growthcraft_trapper.animal_trap_copper": "Animal Trap (Copper)", + "block.growthcraft_trapper.animal_trap_diamond": "Animal Trap (Diamond)", + "block.growthcraft_trapper.animal_trap_gold": "Animal Trap (Gold)", + "block.growthcraft_trapper.animal_trap_iron": "Animal Trap (Iron)", "block.growthcraft_trapper.fishtrap_acacia": "Fishtrap (Acacia)", + "block.growthcraft_trapper.fishtrap_bamboo": "Fishtrap (Bamboo)", "block.growthcraft_trapper.fishtrap_birch": "Fishtrap (Birch)", + "block.growthcraft_trapper.fishtrap_cherry": "Fishtrap (Cherry)", + "block.growthcraft_trapper.fishtrap_crimson": "Fishtrap (Crimson)", "block.growthcraft_trapper.fishtrap_dark_oak": "Fishtrap (Dark Oak)", "block.growthcraft_trapper.fishtrap_jungle": "Fishtrap (Jungle)", - "block.growthcraft_trapper.fishtrap_spruce": "Fishtrap (Spruce)", - "block.growthcraft_trapper.fishtrap_bamboo": "Fishtrap (Bamboo)", - "block.growthcraft_trapper.fishtrap_crimson": "Fishtrap (Crimson)", - "block.growthcraft_trapper.fishtrap_cherry": "Fishtrap (Cherry)", "block.growthcraft_trapper.fishtrap_mangrove": "Fishtrap (Mangrove)", + "block.growthcraft_trapper.fishtrap_oak": "Fishtrap (Oak)", + "block.growthcraft_trapper.fishtrap_spruce": "Fishtrap (Spruce)", "block.growthcraft_trapper.fishtrap_warped": "Fishtrap (Warped)", "block.growthcraft_trapper.spawneggtrap": "Netherite Animal Trap", + "container.growthcraft_trapper.animal_trap": "Animal Trap", "container.growthcraft_trapper.fishtrap": "Fishtrap", "container.growthcraft_trapper.spawneggtrap": "Netherite Animal Trap", "item_group.growthcraft_trapper.tab": "Growthcraft Trapper", diff --git a/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_copper.json b/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_copper.json new file mode 100644 index 0000000..291e55c --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_copper.json @@ -0,0 +1,1274 @@ +{ + "parent": "block/block", + "render_type": "translucent", + "textures": { + "0": "growthcraft_trapper:block/animal_trap_copper", + "1": "growthcraft_trapper:block/animal_trap_copper_front", + "missing": "growthcraft_trapper:block/missing", + "particle": "growthcraft_trapper:block/animal_trap_copper" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 2, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 2, + 0 + ], + "to": [ + 16, + 14, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 1, + 2, + 2, + 14 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 2, + 0 + ], + "to": [ + 2, + 14, + 2 + ], + "faces": { + "north": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 2, + 15, + 14 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 0 + ], + "to": [ + 16, + 16, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 2, + 1 + ], + "to": [ + 14, + 14, + 1.5 + ], + "faces": { + "north": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "rotation": 180, + "texture": "#1" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 0, + 14 + ], + "to": [ + 16, + 2, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 14, + 2, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 2, + 14 + ], + "to": [ + 16, + 14, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 2, + 14 + ], + "to": [ + 2, + 14, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 14 + ], + "to": [ + 16, + 16, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 2, + 15 + ], + "to": [ + 14, + 14, + 15.5 + ], + "faces": { + "north": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "rotation": 180, + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 14, + 0, + 2 + ], + "to": [ + 16, + 2, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 14, + 2 + ], + "to": [ + 16, + 16, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14.5, + 2, + 2 + ], + "to": [ + 15.5, + 14, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 2 + ], + "to": [ + 2, + 16, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 0, + 0, + 2 + ], + "to": [ + 2, + 2, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 0.5, + 2, + 2 + ], + "to": [ + 1.5, + 14, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 2, + 0.5, + 2 + ], + "to": [ + 14, + 1.5, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 14.5, + 2 + ], + "to": [ + 14, + 15.5, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_diamond.json b/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_diamond.json new file mode 100644 index 0000000..535fea9 --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_diamond.json @@ -0,0 +1,1274 @@ +{ + "parent": "block/block", + "render_type": "translucent", + "textures": { + "0": "growthcraft_trapper:block/animal_trap_diamond", + "1": "growthcraft_trapper:block/animal_trap_diamond_front", + "missing": "growthcraft_trapper:block/missing", + "particle": "growthcraft_trapper:block/animal_trap_diamond" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 2, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 2, + 0 + ], + "to": [ + 16, + 14, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 1, + 2, + 2, + 14 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 2, + 0 + ], + "to": [ + 2, + 14, + 2 + ], + "faces": { + "north": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 2, + 15, + 14 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 0 + ], + "to": [ + 16, + 16, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 2, + 1 + ], + "to": [ + 14, + 14, + 1.5 + ], + "faces": { + "north": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "rotation": 180, + "texture": "#1" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 0, + 14 + ], + "to": [ + 16, + 2, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 14, + 2, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 2, + 14 + ], + "to": [ + 16, + 14, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 2, + 14 + ], + "to": [ + 2, + 14, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 14 + ], + "to": [ + 16, + 16, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 2, + 15 + ], + "to": [ + 14, + 14, + 15.5 + ], + "faces": { + "north": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "rotation": 180, + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 14, + 0, + 2 + ], + "to": [ + 16, + 2, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 14, + 2 + ], + "to": [ + 16, + 16, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14.5, + 2, + 2 + ], + "to": [ + 15.5, + 14, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 2 + ], + "to": [ + 2, + 16, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 0, + 0, + 2 + ], + "to": [ + 2, + 2, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 0.5, + 2, + 2 + ], + "to": [ + 1.5, + 14, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 2, + 0.5, + 2 + ], + "to": [ + 14, + 1.5, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 14.5, + 2 + ], + "to": [ + 14, + 15.5, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_gold.json b/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_gold.json new file mode 100644 index 0000000..1c226ff --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_gold.json @@ -0,0 +1,1274 @@ +{ + "parent": "block/block", + "render_type": "translucent", + "textures": { + "0": "growthcraft_trapper:block/animal_trap_gold", + "1": "growthcraft_trapper:block/animal_trap_gold_front", + "missing": "growthcraft_trapper:block/missing", + "particle": "growthcraft_trapper:block/animal_trap_gold" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 2, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 2, + 0 + ], + "to": [ + 16, + 14, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 1, + 2, + 2, + 14 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 2, + 0 + ], + "to": [ + 2, + 14, + 2 + ], + "faces": { + "north": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 2, + 15, + 14 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 0 + ], + "to": [ + 16, + 16, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 2, + 1 + ], + "to": [ + 14, + 14, + 1.5 + ], + "faces": { + "north": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "rotation": 180, + "texture": "#1" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 0, + 14 + ], + "to": [ + 16, + 2, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 14, + 2, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 2, + 14 + ], + "to": [ + 16, + 14, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 2, + 14 + ], + "to": [ + 2, + 14, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 14 + ], + "to": [ + 16, + 16, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 2, + 15 + ], + "to": [ + 14, + 14, + 15.5 + ], + "faces": { + "north": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "rotation": 180, + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 14, + 0, + 2 + ], + "to": [ + 16, + 2, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 14, + 2 + ], + "to": [ + 16, + 16, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14.5, + 2, + 2 + ], + "to": [ + 15.5, + 14, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 2 + ], + "to": [ + 2, + 16, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 0, + 0, + 2 + ], + "to": [ + 2, + 2, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 0.5, + 2, + 2 + ], + "to": [ + 1.5, + 14, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 2, + 0.5, + 2 + ], + "to": [ + 14, + 1.5, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 14.5, + 2 + ], + "to": [ + 14, + 15.5, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_iron.json b/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_iron.json new file mode 100644 index 0000000..aac6218 --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/models/block/animal_trap_iron.json @@ -0,0 +1,1274 @@ +{ + "parent": "block/block", + "render_type": "translucent", + "textures": { + "0": "growthcraft_trapper:block/animal_trap_iron", + "1": "growthcraft_trapper:block/animal_trap_iron_front", + "missing": "growthcraft_trapper:block/missing", + "particle": "growthcraft_trapper:block/animal_trap_iron" + }, + "elements": [ + { + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 2, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 2, + 0 + ], + "to": [ + 16, + 14, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 1, + 2, + 2, + 14 + ], + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 2, + 0 + ], + "to": [ + 2, + 14, + 2 + ], + "faces": { + "north": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 2, + 15, + 14 + ], + "texture": "#1" + }, + "south": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 1 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 0 + ], + "to": [ + 16, + 16, + 2 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 14, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 2, + 1 + ], + "to": [ + 14, + 14, + 1.5 + ], + "faces": { + "north": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#1" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "rotation": 180, + "texture": "#1" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 0, + 14 + ], + "to": [ + 16, + 2, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 14, + 2, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 2, + 14 + ], + "to": [ + 16, + 14, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 2, + 14 + ], + "to": [ + 2, + 14, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 14 + ], + "to": [ + 16, + 16, + 16 + ], + "rotation": { + "angle": 0, + "axis": "y", + "origin": [ + 8, + 8, + 23 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "west": { + "uv": [ + 14, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 14, + 16, + 16 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 2, + 15 + ], + "to": [ + 14, + 14, + 15.5 + ], + "faces": { + "north": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "east": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "rotation": 180, + "texture": "#0" + }, + "west": { + "uv": [ + 0, + 0, + 0.5, + 12 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 12, + 0.5 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 14, + 0, + 2 + ], + "to": [ + 16, + 2, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14, + 14, + 2 + ], + "to": [ + 16, + 16, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 14, + 2, + 16, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 14.5, + 2, + 2 + ], + "to": [ + 15.5, + 14, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 0, + 14, + 2 + ], + "to": [ + 2, + 16, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 3, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 0, + 0, + 2 + ], + "to": [ + 2, + 2, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 0, + 14, + 2 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 2, + 2 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 14, + 14, + 16 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 0, + 2, + 2, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 0.5, + 2, + 2 + ], + "to": [ + 1.5, + 14, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "south": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "up": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + }, + "down": { + "uv": [ + 0, + 0, + 1, + 12 + ], + "texture": "#missing" + } + } + }, + { + "from": [ + 2, + 0.5, + 2 + ], + "to": [ + 14, + 1.5, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + } + } + }, + { + "from": [ + 2, + 14.5, + 2 + ], + "to": [ + 14, + 15.5, + 14 + ], + "faces": { + "north": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "east": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "south": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "west": { + "uv": [ + 0, + 0, + 12, + 1 + ], + "texture": "#missing" + }, + "up": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + }, + "down": { + "uv": [ + 2, + 2, + 14, + 14 + ], + "texture": "#0" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_copper.json b/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_copper.json new file mode 100644 index 0000000..c2d0275 --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_copper.json @@ -0,0 +1,3 @@ +{ + "parent": "growthcraft_trapper:block/animal_trap_copper" +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_diamond.json b/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_diamond.json new file mode 100644 index 0000000..972e220 --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_diamond.json @@ -0,0 +1,3 @@ +{ + "parent": "growthcraft_trapper:block/animal_trap_diamond" +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_gold.json b/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_gold.json new file mode 100644 index 0000000..b7ebac5 --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_gold.json @@ -0,0 +1,3 @@ +{ + "parent": "growthcraft_trapper:block/animal_trap_gold" +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_iron.json b/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_iron.json new file mode 100644 index 0000000..1b95a6b --- /dev/null +++ b/src/main/resources/assets/growthcraft_trapper/models/item/animal_trap_iron.json @@ -0,0 +1,3 @@ +{ + "parent": "growthcraft_trapper:block/animal_trap_iron" +} \ No newline at end of file diff --git a/src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_copper.png b/src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_copper.png new file mode 100644 index 0000000000000000000000000000000000000000..7124688181e9b607185498cd97e6626ae6f4e9f6 GIT binary patch literal 494 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%Lh<0G|-o$4xnjiHX;$ql=4+V`F3U^70O4`z()gI8hQ-U0q#NRFsyMmXMIJ zDan0SfJJF(X<1oWW@ct~c6McDWnp1qRaI3@O-(^TK}JSKdV2Z*3-2D9f=;&ymD~`uq`U<49OM?7@{}T-u zlus_d0My1=;1OBOz`%DHgc*n+`kms=8vX8yw3d0ZoMGpiwxW1}tYd-Q&Lyyh#rAZr)gY{L< zwJxRa#F<^M&dAE1EB4}?xMudu(^ki`t7q$c@%|cTzUft%s7(Cl)2Ht-l;kH!-WOdk z_eS`Jm1-#y+&N~q{IPJE{@&i7`)}?3!&B^UGem{NS%LhP0G|-o$4xnjiHX;$ql=4+V`F3U^70O4`z()gI8hQ-U0q#NRFsyMmXMIJ zDan0SfJJF(X<1oWW@ct~c6McDWnp1qRaI3@O-(^TK}JSKdV2Zxc4{MkiHaJBr{>r;xG24N90oMKo-Amh&Z+O1>{wQg}6u#pV z7&F#dt(dx^?{3P16;i>uYcI3hKCiD?EP2}I*!yqk8!k+KwKFf}>Qb%cr>pC#Z~kYW zR=AeI_h!h36>2FHqB*)-YHqtuKmWbG)$ad0gQwTc8q%)TvYyj9?eR0At-E;slJ`$J uF4$NV&Hesuj{lJcoioh-zLRHif9AGWCFZ%>(y0XK6$VdNKbLh*2~7Y!JmM_? literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_diamond.png b/src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_diamond.png new file mode 100644 index 0000000000000000000000000000000000000000..ff847a9b4280b83a008a4589ab2cb1c5a638b49a GIT binary patch literal 493 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%Lh<0G|+7@3+qq6BBJ8JS{FRj*X4Y%gYlzbnNQ?Z`IY+|NsA=_wRL4QBhi2 zTI$!w2?+_MrKM$MWto|o+1c5Zm6e5sg;iBmH8nK_1qB%y8R_ZiDJdy2F)^vBsZmi; zadC0U$;l-pB{?}cwY9Z;yY^;fWtEqgCnY82=H}+-=SN3J16{G`>|QS*rCk!_7YwwK zNWh?ca`^?IHqHW%$YKTtzQZ8Qcszea3Q%yLr;B5VMzC(*!=gh90&M#i$w)cbD7Cei zT~}0<yjT8KJhev s*I>%A(A^`JRZ#fsR-va}ORv@6*(rKqipm5fpidY)UHx3vIVCg!05ACA7ytkO literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_diamond_front.png b/src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_diamond_front.png new file mode 100644 index 0000000000000000000000000000000000000000..fa31de381d7042b6ecd5aae7e5018c957c42f321 GIT binary patch literal 498 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%LhP0G|+7@3+qq6BBJ8JS{FRj*X4Y%gYlzbnNQ?Z`IY+|NsA=_wRL4QBhi2 zTI$!w2?+_MrKM$MWto|o+1c5Zm6e5sg;iBmH8nK_1qB%y8R_ZiDJdy2F)^vBsZmi; zadC0U$;tNi_BlB@wY9Z;yY|Y<%V%X}m6w+%B_-wN=H}<;M@L5k9g=ZnViu6nDGBlm z23kriU^sq_vj?b;v%n*=n1O-sFbFdq&tH)O6x{FW;uxY4Y}a1 zTzA*5I}|2(_W%F+nvZ8ppKUq0Se;>Bf|*oWb`LA#yUORy#pn19-^o5akZH5Yx3So6 zt}|nq^hD2+h?H+Ek5_jXO>_)C`0we|*Fn#Boq3sCF@MV!rJ}dut|_LxJ8EpcwTE9w z_}5rgb1ZJvscp@nD%uaCIkel0tW~1d#g|Le{QtY~l>hq!N=0uDtXk@&r*4`Pb?nUJ u6X|<*Fke$R#%TDPO-XH5l(JTDR`!0Qw_?T9ABBTrl)=;0&t;ucLK6U`K;nG> literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_gold.png b/src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_gold.png new file mode 100644 index 0000000000000000000000000000000000000000..41475e13dbcc98245fcfd9b336a28d0aace728fe GIT binary patch literal 493 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%Lh<0G|-ouV>T~6BB>#RW2?rj*X4Y%gehw&FKH%3Dwor|Nig&|Hi+ls3@&BNl8h$xw-lI`O(qQKv!ItkzWj?v`d2gg8vf@ z7?e*gzW~(6S>O=~)XsMpgc*@^f)*>QN|=W{#P@h29v2p|7=#;nTkrO{6wnR2Dg zFA^s%Ri3e~Lqqswsg}e&`yFdiHD3$a|6U)t_`cHhZ4+J1f<=AK|Gs>B#Vv_A2Wk6- zu3tNAnP+@gQu&X%Q~loCIIL(-;n?S literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_gold_front.png b/src/main/resources/assets/growthcraft_trapper/textures/block/animal_trap_gold_front.png new file mode 100644 index 0000000000000000000000000000000000000000..af6f116061a213edad13392d5cd196fd96675bbe GIT binary patch literal 498 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%LhP0G|-ouV>T~6BB>#RW2?rj*X4Y%gehw&FKH%3Dwor|Nig&|Hi+ls3y9~<>lo`NlCf6x%v6|(b3UBhrCYoeF&slBSEK+1_j|fHhG+!a_FW8OGURbx-@5Elo?lug$bVh|9`&b;~CRuTTU)kXPB2@CY6@m!^-%s@_BRdIex=;vJVer+HCS|EVi5L z%vdHp(X%8X2n;h-30@O1TaS?83{1OV0q;bi~- literal 0 HcmV?d00001 diff --git a/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_copper.json b/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_copper.json new file mode 100644 index 0000000..b14d39b --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_copper.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "growthcraft_trapper:animal_trap_copper" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_diamond.json b/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_diamond.json new file mode 100644 index 0000000..dc02df1 --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_diamond.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "growthcraft_trapper:animal_trap_diamond" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_gold.json b/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_gold.json new file mode 100644 index 0000000..7f8b863 --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_gold.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "growthcraft_trapper:animal_trap_gold" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_iron.json b/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_iron.json new file mode 100644 index 0000000..5dc6032 --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/loot_tables/blocks/animal_trap_iron.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "growthcraft_trapper:animal_trap_iron" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_carrot.json b/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_carrot.json new file mode 100644 index 0000000..0aca023 --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_carrot.json @@ -0,0 +1,36 @@ +{ + "type": "minecraft:generic", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "weight": 15, + "name": "minecraft:porkchop" + }, + { + "type": "minecraft:item", + "weight": 10, + "name": "minecraft:rabbit_hide" + }, + { + "type": "minecraft:item", + "weight": 15, + "name": "minecraft:rabbit" + }, + { + "type": "minecraft:item", + "weight": 10, + "name": "minecraft:rabbit_foot" + }, + { + "type": "minecraft:item", + "weight": 50, + "name": "minecraft:air" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_leaves.json b/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_leaves.json new file mode 100644 index 0000000..632eea7 --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_leaves.json @@ -0,0 +1,101 @@ +{ + "type": "minecraft:generic", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "weight": 39, + "name": "minecraft:mutton" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:black_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:blue_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:brown_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:cyan_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:light_gray_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:light_blue_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:magenta_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:yellow_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:purple_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:orange_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:white_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:green_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:pink_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:lime_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:gray_wool" + }, + { + "type": "minecraft:item", + "weight": 4, + "name": "minecraft:red_wool" + }, + { + "type": "minecraft:item", + "weight": 25, + "name": "minecraft:air" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_seeds.json b/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_seeds.json new file mode 100644 index 0000000..418ca5e --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_seeds.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:generic", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "weight": 10, + "name": "minecraft:feather" + }, + { + "type": "minecraft:item", + "weight": 30, + "name": "minecraft:chicken" + }, + { + "type": "minecraft:item", + "weight": 10, + "name": "minecraft:egg" + }, + { + "type": "minecraft:item", + "weight": 50, + "name": "minecraft:air" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_wheat.json b/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_wheat.json new file mode 100644 index 0000000..c7abd27 --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/loot_tables/gameplay/trapping/animal_trap_wheat.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:generic", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "weight": 10, + "name": "minecraft:leather" + }, + { + "type": "minecraft:item", + "weight": 40, + "name": "minecraft:beef" + }, + { + "type": "minecraft:item", + "weight": 50, + "name": "minecraft:air" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_copper.json b/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_copper.json new file mode 100644 index 0000000..b521284 --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_copper.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "fishtrap", + "pattern": [ + "ACA", + "CBC", + "ACA" + ], + "key": { + "A": { + "item": "minecraft:copper_ingot" + }, + "B": { + "item": "minecraft:bucket" + }, + "C": { + "item": "minecraft:iron_bars" + } + }, + "result": { + "item": "growthcraft_trapper:animal_trap_iron", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_diamond.json b/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_diamond.json new file mode 100644 index 0000000..bbaa11c --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_diamond.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "fishtrap", + "pattern": [ + "ACA", + "CBC", + "ACA" + ], + "key": { + "A": { + "item": "minecraft:diamond" + }, + "B": { + "item": "minecraft:bucket" + }, + "C": { + "item": "minecraft:iron_bars" + } + }, + "result": { + "item": "growthcraft_trapper:animal_trap_iron", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_gold.json b/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_gold.json new file mode 100644 index 0000000..b05a32b --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_gold.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "fishtrap", + "pattern": [ + "ACA", + "CBC", + "ACA" + ], + "key": { + "A": { + "item": "minecraft:gold_ingot" + }, + "B": { + "item": "minecraft:bucket" + }, + "C": { + "item": "minecraft:iron_bars" + } + }, + "result": { + "item": "growthcraft_trapper:animal_trap_iron", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_iron.json b/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_iron.json new file mode 100644 index 0000000..f2bd263 --- /dev/null +++ b/src/main/resources/data/growthcraft_trapper/recipes/animal_trap_iron.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "fishtrap", + "pattern": [ + "ACA", + "CBC", + "ACA" + ], + "key": { + "A": { + "item": "minecraft:iron_ingot" + }, + "B": { + "item": "minecraft:bucket" + }, + "C": { + "item": "minecraft:iron_bars" + } + }, + "result": { + "item": "growthcraft_trapper:animal_trap_iron", + "count": 1 + } +} \ No newline at end of file