From 104b5538e5d0957bef106e1a43c0c71ed98c8206 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 27 Dec 2018 13:57:23 +0100 Subject: [PATCH] added the adept hopper --- .../naturesaura/blocks/BlockGratedChute.java | 133 ++++++++++++++ .../ellpeck/naturesaura/blocks/ModBlocks.java | 1 + .../blocks/tiles/ItemStackHandlerNA.java | 6 +- .../blocks/tiles/TileEntityGratedChute.java | 140 ++++++++++++++ .../blocks/tiles/TileEntityHopperUpgrade.java | 15 +- .../naturesaura/blockstates/grated_chute.json | 35 ++++ .../assets/naturesaura/lang/en_US.lang | 1 + .../models/block/grated_chute_down.json | 173 ++++++++++++++++++ .../models/block/grated_chute_side.json | 173 ++++++++++++++++++ .../en_us/entries/devices/grated_chute.json | 21 +++ .../naturesaura/recipes/grated_chute.json | 23 +++ .../textures/blocks/grated_chute_inside.png | Bin 0 -> 398 bytes .../textures/blocks/grated_chute_outside.png | Bin 0 -> 297 bytes .../textures/blocks/grated_chute_top.png | Bin 0 -> 248 bytes 14 files changed, 715 insertions(+), 6 deletions(-) create mode 100644 src/main/java/de/ellpeck/naturesaura/blocks/BlockGratedChute.java create mode 100644 src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityGratedChute.java create mode 100644 src/main/resources/assets/naturesaura/blockstates/grated_chute.json create mode 100644 src/main/resources/assets/naturesaura/models/block/grated_chute_down.json create mode 100644 src/main/resources/assets/naturesaura/models/block/grated_chute_side.json create mode 100644 src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/devices/grated_chute.json create mode 100644 src/main/resources/assets/naturesaura/recipes/grated_chute.json create mode 100644 src/main/resources/assets/naturesaura/textures/blocks/grated_chute_inside.png create mode 100644 src/main/resources/assets/naturesaura/textures/blocks/grated_chute_outside.png create mode 100644 src/main/resources/assets/naturesaura/textures/blocks/grated_chute_top.png diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockGratedChute.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockGratedChute.java new file mode 100644 index 00000000..0b868a40 --- /dev/null +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockGratedChute.java @@ -0,0 +1,133 @@ +package de.ellpeck.naturesaura.blocks; + +import de.ellpeck.naturesaura.blocks.tiles.TileEntityGratedChute; +import net.minecraft.block.BlockHopper; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.PropertyDirection; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.*; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +import javax.annotation.Nullable; +import java.util.List; + +public class BlockGratedChute extends BlockContainerImpl { + + public static final PropertyDirection FACING = BlockHopper.FACING; + private static final AxisAlignedBB BASE_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.625D, 1.0D); + private static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.125D); + private static final AxisAlignedBB NORTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.875D, 1.0D, 1.0D, 1.0D); + private static final AxisAlignedBB WEST_AABB = new AxisAlignedBB(0.875D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); + private static final AxisAlignedBB EAST_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.125D, 1.0D, 1.0D); + + public BlockGratedChute() { + super(Material.IRON, "grated_chute", TileEntityGratedChute.class, "grated_chute"); + this.setHardness(3.0F); + this.setResistance(8.0F); + this.setSoundType(SoundType.METAL); + } + + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { + return FULL_BLOCK_AABB; + } + + @Override + public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List collidingBoxes, @Nullable Entity entityIn, boolean isActualState) { + addCollisionBoxToList(pos, entityBox, collidingBoxes, BASE_AABB); + addCollisionBoxToList(pos, entityBox, collidingBoxes, EAST_AABB); + addCollisionBoxToList(pos, entityBox, collidingBoxes, WEST_AABB); + addCollisionBoxToList(pos, entityBox, collidingBoxes, SOUTH_AABB); + addCollisionBoxToList(pos, entityBox, collidingBoxes, NORTH_AABB); + } + + @Override + public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { + EnumFacing newFacing = facing.getOpposite(); + if (newFacing == EnumFacing.UP) + newFacing = EnumFacing.DOWN; + return this.getDefaultState().withProperty(FACING, newFacing); + } + + @Override + public boolean isTopSolid(IBlockState state) { + return true; + } + + @Override + public EnumBlockRenderType getRenderType(IBlockState state) { + return EnumBlockRenderType.MODEL; + } + + @Override + public boolean isFullCube(IBlockState state) { + return false; + } + + @Override + public boolean isOpaqueCube(IBlockState state) { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) { + return true; + } + + @Override + public boolean hasComparatorInputOverride(IBlockState state) { + return true; + } + + @Override + public int getComparatorInputOverride(IBlockState blockState, World worldIn, BlockPos pos) { + return 0; //TODO Comparator + } + + @Override + @SideOnly(Side.CLIENT) + public BlockRenderLayer getRenderLayer() { + return BlockRenderLayer.CUTOUT_MIPPED; + } + + @Override + public IBlockState getStateFromMeta(int meta) { + return this.getDefaultState().withProperty(FACING, EnumFacing.byIndex(meta)); + } + + @Override + public int getMetaFromState(IBlockState state) { + return state.getValue(FACING).getIndex(); + } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot) { + return state.withProperty(FACING, rot.rotate(state.getValue(FACING))); + } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirrorIn) { + return state.withRotation(mirrorIn.toRotation(state.getValue(FACING))); + } + + @Override + protected BlockStateContainer createBlockState() { + return new BlockStateContainer(this, FACING); + } + + @Override + public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) { + return face == EnumFacing.UP ? BlockFaceShape.BOWL : BlockFaceShape.UNDEFINED; + } +} diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/ModBlocks.java b/src/main/java/de/ellpeck/naturesaura/blocks/ModBlocks.java index 1d0e1de5..5bbd98c6 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/ModBlocks.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/ModBlocks.java @@ -39,4 +39,5 @@ public final class ModBlocks { public static final Block SPAWN_LAMP = new BlockSpawnLamp(); public static final Block ANIMAL_GENERATOR = new BlockAnimalGenerator(); public static final Block END_FLOWER = new BlockEndFlower(); + public static final Block GRATED_CHUTE = new BlockGratedChute(); } diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/ItemStackHandlerNA.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/ItemStackHandlerNA.java index d12db094..63992713 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/ItemStackHandlerNA.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/ItemStackHandlerNA.java @@ -22,8 +22,10 @@ public class ItemStackHandlerNA extends ItemStackHandler { @Override protected void onContentsChanged(int slot) { - if (this.sendToClients && !this.tile.getWorld().isRemote) { - this.tile.sendToClients(); + if (this.tile != null) { + this.tile.markDirty(); + if (this.sendToClients && !this.tile.getWorld().isRemote) + this.tile.sendToClients(); } } diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityGratedChute.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityGratedChute.java new file mode 100644 index 00000000..86af2dc5 --- /dev/null +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityGratedChute.java @@ -0,0 +1,140 @@ +package de.ellpeck.naturesaura.blocks.tiles; + +import de.ellpeck.naturesaura.Helper; +import de.ellpeck.naturesaura.blocks.BlockGratedChute; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.item.EntityItemFrame; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.ITickable; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.IItemHandlerModifiable; + +import java.util.List; + +public class TileEntityGratedChute extends TileEntityImpl implements ITickable { + + private final ItemStackHandlerNA items = new ItemStackHandlerNA(1, this, false) { + @Override + protected boolean canExtract(ItemStack stack, int slot, int amount) { + return TileEntityGratedChute.this.redstonePower <= 0; + } + + @Override + protected boolean canInsert(ItemStack stack, int slot) { + return TileEntityGratedChute.this.isItemInFrame(stack); + } + }; + + private int cooldown; + + @Override + public void update() { + if (!this.world.isRemote) { + if (this.cooldown <= 0) { + this.cooldown = 6; + if (this.redstonePower > 0) + return; + + ItemStack curr = this.items.getStackInSlot(0); + push: + if (!curr.isEmpty()) { + IBlockState state = this.world.getBlockState(this.pos); + EnumFacing facing = state.getValue(BlockGratedChute.FACING); + TileEntity tile = this.world.getTileEntity(this.pos.offset(facing)); + if (tile == null || !tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, + facing.getOpposite())) + break push; + IItemHandler handler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, + facing.getOpposite()); + if (handler == null) + break push; + for (int i = 0; i < handler.getSlots(); i++) { + ItemStack theoreticalDrain = this.items.extractItem(0, 1, true); + if (!theoreticalDrain.isEmpty()) { + ItemStack left = handler.insertItem(i, theoreticalDrain, false); + if (left.isEmpty()) { + this.items.extractItem(0, 1, false); + break push; + } + } + } + } + pull: + if (curr.isEmpty() || curr.getCount() < curr.getMaxStackSize()) { + List items = this.world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB( + this.pos.getX(), this.pos.getY() + 0.5, this.pos.getZ(), + this.pos.getX() + 1, this.pos.getY() + 2, this.pos.getZ() + 1)); + for (EntityItem item : items) { + if (item.isDead) + continue; + ItemStack stack = item.getItem(); + if (stack.isEmpty()) + continue; + ItemStack left = this.items.insertItem(0, stack, false); + if (!ItemStack.areItemStacksEqual(stack, left)) { + if (left.isEmpty()) + item.setDead(); + else + item.setItem(left); + break pull; + } + } + + TileEntity tileUp = this.world.getTileEntity(this.pos.up()); + if (tileUp == null || !tileUp.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN)) + break pull; + IItemHandler handlerUp = tileUp.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN); + if (handlerUp == null) + break pull; + for (int i = 0; i < handlerUp.getSlots(); i++) { + ItemStack theoreticalDrain = handlerUp.extractItem(i, 1, true); + if (!theoreticalDrain.isEmpty()) { + ItemStack left = this.items.insertItem(0, theoreticalDrain, false); + if (left.isEmpty()) { + handlerUp.extractItem(i, 1, false); + break pull; + } + } + } + } + } else + this.cooldown--; + } + } + + private boolean isItemInFrame(ItemStack stack) { + List frames = Helper.getAttachedItemFrames(this.world, this.pos); + if (frames.isEmpty()) + return true; + for (EntityItemFrame frame : frames) { + ItemStack frameStack = frame.getDisplayedItem(); + if (Helper.areItemsEqual(stack, frameStack, true)) { + return true; + } + } + return false; + } + + @Override + public void writeNBT(NBTTagCompound compound, SaveType type) { + super.writeNBT(compound, type); + compound.setInteger("cooldown", this.cooldown); + } + + @Override + public void readNBT(NBTTagCompound compound, SaveType type) { + super.readNBT(compound, type); + this.cooldown = compound.getInteger("cooldown"); + } + + @Override + public IItemHandlerModifiable getItemHandler(EnumFacing facing) { + return this.items; + } +} diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityHopperUpgrade.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityHopperUpgrade.java index 0bbcbfd1..ae773d43 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityHopperUpgrade.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityHopperUpgrade.java @@ -24,12 +24,11 @@ public class TileEntityHopperUpgrade extends TileEntityImpl implements ITickable if (IAuraChunk.getAuraInArea(this.world, this.pos, 25) < 1000) return; TileEntity tile = this.world.getTileEntity(this.pos.down()); - if (!(tile instanceof TileEntityHopper) || !BlockHopper.isEnabled(tile.getBlockMetadata())) + if (!isValidHopper(tile)) return; - TileEntityHopper hopper = (TileEntityHopper) tile; - if (!hopper.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP)) + if (!tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP)) return; - IItemHandler handler = hopper.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP); + IItemHandler handler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.UP); if (handler == null) return; @@ -67,4 +66,12 @@ public class TileEntityHopperUpgrade extends TileEntityImpl implements ITickable } } } + + private static boolean isValidHopper(TileEntity tile) { + if (tile instanceof TileEntityHopper) + return BlockHopper.isEnabled(tile.getBlockMetadata()); + if (tile instanceof TileEntityGratedChute) + return ((TileEntityGratedChute) tile).redstonePower <= 0; + return false; + } } diff --git a/src/main/resources/assets/naturesaura/blockstates/grated_chute.json b/src/main/resources/assets/naturesaura/blockstates/grated_chute.json new file mode 100644 index 00000000..61b04cab --- /dev/null +++ b/src/main/resources/assets/naturesaura/blockstates/grated_chute.json @@ -0,0 +1,35 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "naturesaura:grated_chute_down", + "textures": { + "particle": "naturesaura:blocks/grated_chute_outside", + "top": "naturesaura:blocks/grated_chute_top", + "side": "naturesaura:blocks/grated_chute_outside", + "inside": "naturesaura:blocks/grated_chute_inside" + }, + "transform": "forge:default-block" + }, + "variants": { + "normal": [{}], + "inventory": [{}], + "facing=down": { + "model": "naturesaura:grated_chute_down" + }, + "facing=north": { + "model": "naturesaura:grated_chute_side" + }, + "facing=south": { + "model": "naturesaura:grated_chute_side", + "y": 180 + }, + "facing=west": { + "model": "naturesaura:grated_chute_side", + "y": 270 + }, + "facing=east": { + "model": "naturesaura:grated_chute_side", + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/lang/en_US.lang b/src/main/resources/assets/naturesaura/lang/en_US.lang index 1c4b2a0d..8adf8a3e 100644 --- a/src/main/resources/assets/naturesaura/lang/en_US.lang +++ b/src/main/resources/assets/naturesaura/lang/en_US.lang @@ -36,6 +36,7 @@ tile.naturesaura.pickup_stopper.name=Item Grounder tile.naturesaura.spawn_lamp.name=Lamp of Sanctuary tile.naturesaura.animal_generator.name=Disentangler of Mortals tile.naturesaura.end_flower.name=Rose of Oblivion +tile.naturesaura.grated_chute.name=Adept Hopper item.naturesaura.eye.name=Environmental Eye item.naturesaura.eye_improved.name=Environmental Ocular diff --git a/src/main/resources/assets/naturesaura/models/block/grated_chute_down.json b/src/main/resources/assets/naturesaura/models/block/grated_chute_down.json new file mode 100644 index 00000000..4ce5d645 --- /dev/null +++ b/src/main/resources/assets/naturesaura/models/block/grated_chute_down.json @@ -0,0 +1,173 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "from": [0, 10, 0], + "to": [16, 11, 16], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#inside" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [0, 11, 0], + "to": [2, 16, 16], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#top" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [14, 11, 0], + "to": [16, 16, 16], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#top" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [2, 11, 0], + "to": [14, 16, 2], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#top" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [2, 11, 14], + "to": [14, 16, 16], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#top" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [4, 4, 4], + "to": [12, 10, 12], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#side" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [6, 0, 6], + "to": [10, 4, 10], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#side" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/models/block/grated_chute_side.json b/src/main/resources/assets/naturesaura/models/block/grated_chute_side.json new file mode 100644 index 00000000..890ce5d8 --- /dev/null +++ b/src/main/resources/assets/naturesaura/models/block/grated_chute_side.json @@ -0,0 +1,173 @@ +{ + "ambientocclusion": false, + "elements": [ + { + "from": [0, 10, 0], + "to": [16, 11, 16], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#inside" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [0, 11, 0], + "to": [2, 16, 16], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#top" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [14, 11, 0], + "to": [16, 16, 16], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#top" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [2, 11, 0], + "to": [14, 16, 2], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#top" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [2, 11, 14], + "to": [14, 16, 16], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#top" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [4, 4, 4], + "to": [12, 10, 12], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#side" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + }, + { + "from": [6, 4, 0], + "to": [10, 8, 4], + "faces": { + "down": { + "texture": "#side" + }, + "up": { + "texture": "#side" + }, + "north": { + "texture": "#side" + }, + "south": { + "texture": "#side" + }, + "west": { + "texture": "#side" + }, + "east": { + "texture": "#side" + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/devices/grated_chute.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/devices/grated_chute.json new file mode 100644 index 00000000..8e7fd0ee --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/devices/grated_chute.json @@ -0,0 +1,21 @@ +{ + "name": "Adept Hopper", + "icon": "naturesaura:grated_chute", + "category": "devices", + "advancement": "naturesaura:infused_materials", + "pages": [ + { + "type": "text", + "text": "A lot of times when dealing with mechanical devices, $(thing)transporting items$() is of great importance and can become a nuisance if done on a large scale, especially because of the lack of $(thing)filtering$() abilities. The $(item)Adept Hopper$() creates the ability to filter items travelling through $(item)Hoppers$() with ease." + }, + { + "type": "text", + "text": "The $(item)Adept Hopper$() works just like a normal $(item)Hopper$(), except that it is a bit faster and that it can filter items as follows: Attaching any number of $(item)Item Frames$() to any side of it and placing items inside will cause $(thing)only those items$() to be let through. This counts both for pulling items from chests and the world and for having items inserted into it.$(p)It should additionally be noted that the $(l:using/hopper_upgrade)Hopper Enhancement$() can be combined with this to pick up only filtered items." + }, + { + "type": "crafting", + "text": "Creating the $(item)Adept Hopper$()", + "recipe": "naturesaura:grated_chute" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/recipes/grated_chute.json b/src/main/resources/assets/naturesaura/recipes/grated_chute.json new file mode 100644 index 00000000..87a0c32e --- /dev/null +++ b/src/main/resources/assets/naturesaura/recipes/grated_chute.json @@ -0,0 +1,23 @@ +{ + "type": "forge:ore_shaped", + "pattern": [ + "IHI", + "ICI", + " I " + ], + "key": { + "C": { + "type": "forge:ore_dict", + "ore": "chestWood" + }, + "I": { + "item": "naturesaura:infused_iron" + }, + "H": { + "item": "minecraft:hopper" + } + }, + "result": { + "item": "naturesaura:grated_chute" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/textures/blocks/grated_chute_inside.png b/src/main/resources/assets/naturesaura/textures/blocks/grated_chute_inside.png new file mode 100644 index 0000000000000000000000000000000000000000..6ac709b38aa2b353c5c6cbc385642154461ea7dc GIT binary patch literal 398 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DkxL735kHCP2GC{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QJXPV+30W_JB$J50z z#KM2>BwwyW4m_>Z+^nU^p?@4TL&ck#)B{*bAD%zt%02IBulNVIcQ(!6Kb+ok>(GT> zCy7aCsw+LyngWHAyZ;tVIkx%i9jE6!VuwFm;q8xA<$W-rZ$i`>Yv#FU8UyZ|JuMbv z*%Q?KAT@>Y>B?Sr+pfZ-mSr1^<2{WIEJ_h7_&AyM!<9u{M`y20U$)`2h*uiJ$BOvW z@7G%|Fwba;TGAs@^yO{kG^f;9W(Q@Sob0O?u7<|4EO7eGa=pgWyXhGVe}IO`wuK@# z$}`tq-TU%=w(G*uH<66rO*O(IBah!%xN^z2Jm>#kP514e%A~a{y(uAkVv}^xiKYW5 qW96J)$gsV2o}V(M$Jj}zo?&CaiFfPca$W+%j=|H_&t;ucLK6VnqMsK4 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/naturesaura/textures/blocks/grated_chute_outside.png b/src/main/resources/assets/naturesaura/textures/blocks/grated_chute_outside.png new file mode 100644 index 0000000000000000000000000000000000000000..d0f5dc4c54d4b8aadce30c3fc60ac7572423b22a GIT binary patch literal 297 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+L6~vJ#O${~L5ULAh?3y^w370~qEv>0#LT=By}Z;C1rt3(J<}BT2$0FkJzX3_ zEc~ZV*vQ4?$m8-^luIvTb#GZxy1H3jdTwrd_Uq}hpXwH8f3pykJDy^sIDPBo*EJP# zvf_&`1RV>wef*xIf3jlNwe9b3{n{t2$lhf&Z>6+`+rp&|cQ@?Gtvm9}vbG?W_r%2c zlNZjICUEd$k%g3Zs(1Ag!AG(iW`w*vwEIV@bA;ClS6%;Wjr(83y_A01wqZ-T!Oy)$ o7ov9L`pvqOHr+MC%GEFb?2k=lQp@iq0iDd?>FVdQ&MBb@03T#=SO5S3 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/naturesaura/textures/blocks/grated_chute_top.png b/src/main/resources/assets/naturesaura/textures/blocks/grated_chute_top.png new file mode 100644 index 0000000000000000000000000000000000000000..b5bdf81547493501b628fadddc9624718f2a5e85 GIT binary patch literal 248 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P@=>&q9iy!t)x7$D3zfgF*C13FE6!3!9>qc&osq70%UTTr;B5V zg@5t|&rAREr)07mGjqLG@Fw(aQ&Zw2gRKfYmrgSzPiS_mddSxC+w*^TSAZ&4^OYnC zhDi)eY)J+lx_1~R>_1`3uw;4>vxB0~I!1-PhYvP1_Oo{JE{FKV#JZF0VZB&Gsgz~JfX=d#Wzp$Pz&xKP&s literal 0 HcmV?d00001