From a667281619c4650e2856b8b9e8e09c9fa3b7cf61 Mon Sep 17 00:00:00 2001 From: stfwi Date: Thu, 31 Oct 2019 22:04:31 +0100 Subject: [PATCH] Small Block Breaker added, 1.14: Fluid handlers implemented. --- 1.12/meta/update.json | 3 +- 1.12/readme.md | 7 +- .../java/wile/engineersdecor/ModContent.java | 17 +- .../blocks/BlockDecorBreaker.java | 275 +++++++++++ .../blocks/BlockDecorCraftingTable.java | 32 +- .../engineersdecor/detail/TreeCutting.java | 4 +- .../blockstates/small_block_breaker.json | 12 + .../assets/engineersdecor/lang/en_us.lang | 24 +- .../assets/engineersdecor/lang/ru_ru.lang | 14 +- .../assets/engineersdecor/lang/zh_cn.lang | 5 + .../device/small_block_breaker_model.json | 383 +++++++++++++++ .../small_block_breaker_model_active.json | 461 ++++++++++++++++++ ...small_block_breaker_recipe_standalone.json | 37 ++ .../dependent/small_block_breaker_recipe.json | 41 ++ .../device/small_block_breaker_back.png | Bin 0 -> 573 bytes .../device/small_block_breaker_bottom.png | Bin 0 -> 543 bytes .../device/small_block_breaker_front.png | Bin 0 -> 450 bytes .../device/small_block_breaker_left.png | Bin 0 -> 489 bytes .../device/small_block_breaker_right.png | Bin 0 -> 488 bytes .../device/small_block_breaker_shaft.png | Bin 0 -> 423 bytes .../small_block_breaker_shaft_active.png | Bin 0 -> 672 bytes ...mall_block_breaker_shaft_active.png.mcmeta | 1 + .../blocks/device/small_block_breaker_top.png | Bin 0 -> 388 bytes 1.14/gradle.properties | 2 +- 1.14/meta/update.json | 3 +- 1.14/readme.md | 3 + .../java/wile/engineersdecor/ModContent.java | 31 +- .../blocks/BlockDecorBreaker.java | 282 +++++++++++ .../blocks/BlockDecorMineralSmelter.java | 82 ++-- .../BlockDecorPassiveFluidAccumulator.java | 313 ++++++------ .../blocks/BlockDecorPipeValve.java | 301 +++++------- .../wile/engineersdecor/detail/ModConfig.java | 6 + .../blockstates/small_block_breaker.json | 10 + .../assets/engineersdecor/lang/en_us.json | 6 +- .../assets/engineersdecor/lang/ru_ru.json | 1 + .../assets/engineersdecor/lang/zh_cn.json | 1 + .../device/small_block_breaker_model.json | 383 +++++++++++++++ .../small_block_breaker_model_active.json | 461 ++++++++++++++++++ .../models/item/small_block_breaker.json | 1 + .../block/device/small_block_breaker_back.png | Bin 0 -> 573 bytes .../device/small_block_breaker_bottom.png | Bin 0 -> 543 bytes .../device/small_block_breaker_front.png | Bin 0 -> 450 bytes .../block/device/small_block_breaker_left.png | Bin 0 -> 489 bytes .../device/small_block_breaker_right.png | Bin 0 -> 488 bytes .../device/small_block_breaker_shaft.png | Bin 0 -> 423 bytes .../small_block_breaker_shaft_active.png | Bin 0 -> 672 bytes ...mall_block_breaker_shaft_active.png.mcmeta | 1 + .../block/device/small_block_breaker_top.png | Bin 0 -> 388 bytes .../blocks/small_block_breaker.json | 26 + ...small_block_breaker_recipe_standalone.json | 33 ++ .../small_tree_cutter_recipe_standalone.json | 2 +- meta/update.json | 6 +- 52 files changed, 2849 insertions(+), 421 deletions(-) create mode 100644 1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorBreaker.java create mode 100644 1.12/src/main/resources/assets/engineersdecor/blockstates/small_block_breaker.json create mode 100644 1.12/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model.json create mode 100644 1.12/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model_active.json create mode 100644 1.12/src/main/resources/assets/engineersdecor/recipes/alternative/small_block_breaker_recipe_standalone.json create mode 100644 1.12/src/main/resources/assets/engineersdecor/recipes/dependent/small_block_breaker_recipe.json create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_back.png create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_bottom.png create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_front.png create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_left.png create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_right.png create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_shaft.png create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_shaft_active.png create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_shaft_active.png.mcmeta create mode 100644 1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_top.png create mode 100644 1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorBreaker.java create mode 100644 1.14/src/main/resources/assets/engineersdecor/blockstates/small_block_breaker.json create mode 100644 1.14/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model.json create mode 100644 1.14/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model_active.json create mode 100644 1.14/src/main/resources/assets/engineersdecor/models/item/small_block_breaker.json create mode 100644 1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_back.png create mode 100644 1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_bottom.png create mode 100644 1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_front.png create mode 100644 1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_left.png create mode 100644 1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_right.png create mode 100644 1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_shaft.png create mode 100644 1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_shaft_active.png create mode 100644 1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_shaft_active.png.mcmeta create mode 100644 1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_top.png create mode 100644 1.14/src/main/resources/data/engineersdecor/loot_tables/blocks/small_block_breaker.json create mode 100644 1.14/src/main/resources/data/engineersdecor/recipes/alternative/small_block_breaker_recipe_standalone.json diff --git a/1.12/meta/update.json b/1.12/meta/update.json index 8dca4a5..bbc0aa9 100644 --- a/1.12/meta/update.json +++ b/1.12/meta/update.json @@ -1,6 +1,7 @@ { "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "1.12.2": { + "1.0.15-b2": "[A] Added Small Block Breaker\n[M] Crafting Table: Allowing NBT \"Damage\" mismatch only items that are declared damagable (issue #56).\n[M] Tree Cutter: Loosened the strict mod namespace requirement for Dynamic Trees log detection (issue #52) to enable checking DT compat mod log blocks.", "1.0.15-b1": "[A] Added Floor Edge Light.\n[A] Added Factory Block Placer and Planter.", "1.0.14": "[R] Release based on v1.0.14-b1. Release-to-release changes: * Factory Hopper added. * Small Waste Incinerator improved. * Lang updates. * Recipe fixes.", "1.0.14-b1": "[A] Factory Hopper added (configurable hopper and item collector).\n[M] Small Waste Incinerator Fifo shifting improved.\n[M] Lang file zh_cn updated (scikirbypoke, PR#53).\n[F] Fixed conditional recipe constant for redstone pipe valve (thx @albert_ac).", @@ -64,6 +65,6 @@ }, "promos": { "1.12.2-recommended": "1.0.14", - "1.12.2-latest": "1.0.15-b1" + "1.12.2-latest": "1.0.15-b2" } } \ No newline at end of file diff --git a/1.12/readme.md b/1.12/readme.md index 35ba7d3..37d021c 100644 --- a/1.12/readme.md +++ b/1.12/readme.md @@ -10,7 +10,12 @@ Mod sources for Minecraft version 1.12.2. ---- ## Version history - ~ v1.0.15-b2 [A] + - v1.0.15-b2 [A] Added Small Block Breaker + [M] Crafting Table: Allowing NBT "Damage" mismatch only + items that are declared damagable (issue #56). + [M] Tree Cutter: Loosened the strict mod namespace + requirement for Dynamic Trees log detection (issue #52) + to enable checking DT compat mod log blocks. - v1.0.15-b1 [A] Added Floor Edge Light. [A] Added Factory Block Placer and Planter. diff --git a/1.12/src/main/java/wile/engineersdecor/ModContent.java b/1.12/src/main/java/wile/engineersdecor/ModContent.java index 3a54ead..9709e4a 100644 --- a/1.12/src/main/java/wile/engineersdecor/ModContent.java +++ b/1.12/src/main/java/wile/engineersdecor/ModContent.java @@ -152,6 +152,13 @@ public class ModContent ModAuxiliaries.getPixeledAABB(0,0,0, 16,8,16) ); + public static final BlockDecorBreaker SMALL_BLOCK_BREAKER = new BlockDecorBreaker( + "small_block_breaker", + BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_SHIFTCLICK, + Material.IRON, 1f, 15f, SoundType.METAL, + ModAuxiliaries.getPixeledAABB(0,0,0, 16,12,16) + ); + //-------------------------------------------------------------------------------------------------------------------- public static final BlockDecorPipeValve STRAIGHT_CHECK_VALVE = new BlockDecorPipeValve( @@ -482,6 +489,9 @@ public class ModContent private static final TileEntityRegistrationData SMALL_TREE_CUTTER_TEI = new TileEntityRegistrationData( BlockDecorTreeCutter.BTileEntity.class, "te_small_tree_cutter" ); + private static final TileEntityRegistrationData SMALL_BLOCK_BREAKER_TEI = new TileEntityRegistrationData( + BlockDecorBreaker.BTileEntity.class, "te_small_block_breaker" + ); private static final TileEntityRegistrationData TEST_BLOCK_TEI = new TileEntityRegistrationData( BlockDecorTest.BTileEntity.class, "te_testblock" ); @@ -497,12 +507,13 @@ public class ModContent FACTORY_HOPPER,FACTORY_HOPPER_TEI, FACTORY_DROPPER, FACTORY_DROPPER_TEI, FACTORY_PLACER, FACTORY_PLACER_TEI, + SMALL_BLOCK_BREAKER,SMALL_BLOCK_BREAKER_TEI, + SMALL_TREE_CUTTER,SMALL_TREE_CUTTER_TEI, SMALL_WASTE_INCINERATOR, WASTE_INCINERATOR_TEI, + SMALL_SOLAR_PANEL,SMALL_SOLAR_PANEL_TEI, + SMALL_MINERAL_SMELTER, SMALL_MINERAL_SMELTER_TEI, STRAIGHT_CHECK_VALVE, STRAIGHT_REDSTONE_VALVE, STRAIGHT_REDSTONE_ANALOG_VALVE, STRAIGHT_PIPE_VALVE_TEI, PASSIVE_FLUID_ACCUMULATOR, PASSIVE_FLUID_ACCUMULATOR_TEI, - SMALL_MINERAL_SMELTER, SMALL_MINERAL_SMELTER_TEI, - SMALL_SOLAR_PANEL,SMALL_SOLAR_PANEL_TEI, - SMALL_TREE_CUTTER,SMALL_TREE_CUTTER_TEI, CLINKER_BRICK_BLOCK, CLINKER_BRICK_SLAB, CLINKER_BRICK_STAIRS, diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorBreaker.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorBreaker.java new file mode 100644 index 0000000..30f08f1 --- /dev/null +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorBreaker.java @@ -0,0 +1,275 @@ +/* + * @file BlockDecorBreaker.java + * @author Stefan Wilhelm (wile) + * @copyright (C) 2019 Stefan Wilhelm + * @license MIT (see https://opensource.org/licenses/MIT) + * + * Small Block Breaker + */ +package wile.engineersdecor.blocks; + +import wile.engineersdecor.ModEngineersDecor; +import net.minecraft.world.World; +import net.minecraft.block.Block; +import net.minecraft.block.properties.PropertyBool; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.item.ItemStack; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.init.Blocks; +import net.minecraft.init.SoundEvents; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.*; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.energy.CapabilityEnergy; +import net.minecraftforge.energy.IEnergyStorage; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.HashSet; +import java.util.Random; + + +public class BlockDecorBreaker extends BlockDecorDirected +{ + public static final PropertyBool ACTIVE = PropertyBool.create("active"); + + public BlockDecorBreaker(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB) + { + super(registryName, config, material, hardness, resistance, sound, unrotatedAABB); + setLightOpacity(0); + } + + @Override + protected BlockStateContainer createBlockState() + { return new BlockStateContainer(this, FACING, ACTIVE); } + + @Override + public IBlockState getStateFromMeta(int meta) + { return getDefaultState().withProperty(FACING, EnumFacing.byHorizontalIndex(meta & 0x7)).withProperty(ACTIVE, (meta & 0x8)!=0); } + + @Override + public int getMetaFromState(IBlockState state) + { return (state.getValue(FACING).getHorizontalIndex() & 0x7) | (state.getValue(ACTIVE) ? 8 : 0); } + + @Override + public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) + { return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand).withProperty(ACTIVE, false); } + + @Override + public boolean hasTileEntity(IBlockState state) + { return true; } + + @Override + @Nullable + public TileEntity createTileEntity(World world, IBlockState state) + { return new BTileEntity(); } + + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rnd) + { + if((state.getBlock()!=this) || (!state.getValue(ACTIVE))) return; + final double rv = rnd.nextDouble(); + if(rv > 0.8) return; + final double x=0.5+pos.getX(), y=0.5+pos.getY(), z=0.5+pos.getZ(); + final double xc=0.52, xr=rnd.nextDouble()*0.4-0.2, yr=(y-0.3+rnd.nextDouble()*0.2); + switch(state.getValue(FACING)) { + case WEST: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x-xc, yr, z+xr, 0.0, 0.0, 0.0); break; + case EAST: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x+xc, yr, z+xr, 0.0, 0.0, 0.0); break; + case NORTH: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x+xr, yr, z-xc, 0.0, 0.0, 0.0); break; + default: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x+xr, yr, z+xc, 0.0, 0.0, 0.0); break; + } + } + + @Override + public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos neighborPos) + { + if(!(world instanceof World) || (((World) world).isRemote)) return; + TileEntity te = world.getTileEntity(pos); + if(!(te instanceof BTileEntity)) return; + ((BTileEntity)te).block_updated(); + } + + //-------------------------------------------------------------------------------------------------------------------- + // Tile entity + //-------------------------------------------------------------------------------------------------------------------- + + public static class BTileEntity extends TileEntity implements ITickable, IEnergyStorage + { + public static final int IDLE_TICK_INTERVAL = 40; + public static final int TICK_INTERVAL = 5; + public static final int BOOST_FACTOR = 8; + public static final int DEFAULT_BOOST_ENERGY = 64; + public static final int DEFAULT_BREAKING_RELUCTANCE = 17; + public static final int DEFAULT_MIN_BREAKING_TIME = 15; + public static final int MAX_BREAKING_TIME = 800; + private static int boost_energy_consumption = DEFAULT_BOOST_ENERGY; + private static int breaking_reluctance = DEFAULT_BREAKING_RELUCTANCE; + private static int min_breaking_time = DEFAULT_MIN_BREAKING_TIME; + private int tick_timer_; + private int proc_time_elapsed_; + private int boost_energy_; + + public static void on_config(int boost_energy_per_tick, int breaking_time_per_hardness, int min_breaking_time_ticks) + { + boost_energy_consumption = TICK_INTERVAL * MathHelper.clamp(boost_energy_per_tick, 16, 512); + breaking_reluctance = MathHelper.clamp(breaking_time_per_hardness, 5, 50); + min_breaking_time = MathHelper.clamp(min_breaking_time_ticks, 10, 100); + ModEngineersDecor.logger.info("Config block breaker: Boost energy consumption:" + boost_energy_consumption + "rf/t, reluctance=" + breaking_reluctance + "/hrdn, break time offset=" + min_breaking_time ); + } + + public BTileEntity() + {} + + public void block_updated() + { if(tick_timer_ > 2) tick_timer_ = 2; } + + // TileEntity ------------------------------------------------------------------------------ + + @Override + public boolean shouldRefresh(World world, BlockPos pos, IBlockState os, IBlockState ns) + { return (os.getBlock() != ns.getBlock()) || (!(ns.getBlock() instanceof BlockDecorBreaker)); } + + // IEnergyStorage ---------------------------------------------------------------------------- + + @Override + public boolean canExtract() + { return false; } + + @Override + public boolean canReceive() + { return true; } + + @Override + public int getMaxEnergyStored() + { return boost_energy_consumption; } + + @Override + public int getEnergyStored() + { return boost_energy_; } + + @Override + public int extractEnergy(int maxExtract, boolean simulate) + { return 0; } + + @Override + public int receiveEnergy(int maxReceive, boolean simulate) + { + if((boost_energy_ >= boost_energy_consumption) || (maxReceive < boost_energy_consumption)) return 0; + if(!simulate) boost_energy_ = boost_energy_consumption; + return boost_energy_consumption; + } + + // Capability export ---------------------------------------------------------------------------- + + @Override + public boolean hasCapability(Capability cap, EnumFacing facing) + { return ((cap==CapabilityEnergy.ENERGY)) || super.hasCapability(cap, facing); } + + @Override + @SuppressWarnings("unchecked") + @Nullable + public T getCapability(Capability capability, @Nullable EnumFacing facing) + { + if(capability == CapabilityEnergy.ENERGY) { + return (T)this; + } else { + return super.getCapability(capability, facing); + } + } + + // ITickable ------------------------------------------------------------------------------------ + + private static HashSet blacklist = new HashSet<>(); + static { + blacklist.add(Blocks.AIR); + blacklist.add(Blocks.BEDROCK); + blacklist.add(Blocks.FIRE); + blacklist.add(Blocks.END_PORTAL); + blacklist.add(Blocks.END_GATEWAY); + blacklist.add(Blocks.END_PORTAL_FRAME); + } + + private static boolean isBreakable(IBlockState state, BlockPos pos, World world) + { + final Block block = state.getBlock(); + if(blacklist.contains(block)) return false; + if(state.getMaterial().isLiquid()) return false; + if(block.isAir(state, world, pos)) return false; + float bh = state.getBlockHardness(world, pos); + if((bh<0) || (bh>55)) return false; + return true; + } + + private boolean breakBlock(IBlockState state, BlockPos pos, World world) + { + if(world.isRemote || world.restoringBlockSnapshots) return false; // retry next cycle + NonNullList drops = NonNullList.create(); + state.getBlock().getDrops(drops, world, pos, state, 0); + world.setBlockToAir(pos); + for(ItemStack drop:drops) spawnAsEntity(world, pos, drop); + SoundType stype = state.getBlock().getSoundType(state, world, pos, null); + if(stype != null) world.playSound(null, pos, stype.getPlaceSound(), SoundCategory.BLOCKS, stype.getVolume()*0.6f, stype.getPitch()); + return true; + } + + @Override + @SuppressWarnings("deprecation") + public void update() + { + if(--tick_timer_ > 0) return; + if(world.isRemote) { + IBlockState state = world.getBlockState(pos); + if(!state.getValue(ACTIVE)) { + tick_timer_ = TICK_INTERVAL; + } else { + tick_timer_ = 1; + // not sure if is so cool to do this each tick ... may be simplified/removed again. + SoundEvent sound = SoundEvents.BLOCK_WOOD_HIT; + SoundType stype = world.getBlockState(pos.offset(state.getValue(FACING))).getBlock().getSoundType(); + if((stype == SoundType.CLOTH) || (stype == SoundType.PLANT) || (stype == SoundType.SNOW)) { + sound = SoundEvents.BLOCK_CLOTH_HIT; + } else if((stype == SoundType.GROUND) || (stype == SoundType.SAND)) { + sound = SoundEvents.BLOCK_GRAVEL_HIT; + } + world.playSound(pos.getX(), pos.getY(), pos.getZ(), sound, SoundCategory.BLOCKS, 0.1f, 1.2f, false); + } + } else { + tick_timer_ = TICK_INTERVAL; + final IBlockState device_state = world.getBlockState(pos); + final BlockPos target_pos = pos.offset(device_state.getValue(FACING)); + final IBlockState target_state = world.getBlockState(target_pos); + if((world.isBlockPowered(pos)) || (!isBreakable(target_state, target_pos, world))) { + if(device_state.getValue(ACTIVE)) world.setBlockState(pos, device_state.withProperty(ACTIVE, false), 1|2); + proc_time_elapsed_ = 0; + tick_timer_ = IDLE_TICK_INTERVAL; + return; + } + proc_time_elapsed_ += TICK_INTERVAL; + boolean active = true; + int time_needed = (int)(target_state.getBlockHardness(world, pos) * breaking_reluctance) + min_breaking_time; + if(boost_energy_ >= boost_energy_consumption) { + boost_energy_ = 0; + proc_time_elapsed_ += TICK_INTERVAL * BOOST_FACTOR; + time_needed += min_breaking_time * (3*BOOST_FACTOR/5); + } + time_needed = MathHelper.clamp(time_needed, min_breaking_time, MAX_BREAKING_TIME); + if(proc_time_elapsed_ >= time_needed) { + proc_time_elapsed_ = 0; + breakBlock(target_state, target_pos, world); + active = false; + } + if(device_state.getValue(ACTIVE) != active) { + world.setBlockState(pos, device_state.withProperty(ACTIVE, active), 1|2); + } + } + } + } +} diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorCraftingTable.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorCraftingTable.java index 1de8749..72afa46 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorCraftingTable.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorCraftingTable.java @@ -900,7 +900,7 @@ public class BlockDecorCraftingTable extends BlockDecorDirected // first iteration: fillup existing stacks for(int i = slot_begin; i < slot_end; ++i) { final ItemStack stack = inventory.getStackInSlot(i); - if((stack.isEmpty()) || (!stack.isItemEqual(mvstack))) continue; + if((stack.isEmpty()) || (!isItemExactlyEqual(stack,mvstack))) continue; int nmax = stack.getMaxStackSize() - stack.getCount(); if(mvstack.getCount() <= nmax) { stack.setCount(stack.getCount()+mvstack.getCount()); @@ -936,6 +936,24 @@ public class BlockDecorCraftingTable extends BlockDecorDirected return mvstack; } + private boolean isItemExactlyEqual(ItemStack stack1, ItemStack stack2) + { + if(!stack1.isItemEqual(stack2)) return false; + if(stack1.hasTagCompound()) { + final NBTTagCompound nbt = stack1.getTagCompound(); + int n = stack1.getTagCompound().getSize(); + if((n > 0) && stack1.getItem().isDamageable() && (stack1.getTagCompound().hasKey("Damage"))) --n; + if(n > 0) return false; + } + if(stack2.hasTagCompound()) { + final NBTTagCompound nbt = stack2.getTagCompound(); + int n = stack2.getTagCompound().getSize(); + if((n > 0) && stack2.getItem().isDamageable() && (stack2.getTagCompound().hasKey("Damage"))) --n; + if(n > 0) return false; + } + return true; + } + /** * Moves as much items from the slots in range [first_slot, last_slot] of the inventory into a new stack. * Implicitly shrinks the inventory stacks and the `request_stack`. @@ -950,16 +968,10 @@ public class BlockDecorCraftingTable extends BlockDecorDirected int smallest_stack_index = -1; for(int i = slot_begin; i < slot_end; ++i) { final ItemStack stack = inventory.getStackInSlot(i); - if((!stack.isEmpty()) && (stack.isItemEqual(request_stack))) { + if((!stack.isEmpty()) && (isItemExactlyEqual(stack, request_stack))) { // Never automatically place stuff with nbt (except a few allowed like "Damage"), // as this could be a full crate, a valuable tool item, etc. For these recipes // the user has to place this item manually. - if(stack.hasTagCompound()) { - final NBTTagCompound nbt = stack.getTagCompound(); - int n = stack.getTagCompound().getSize(); - if((n > 0) && (stack.getTagCompound().hasKey("Damage"))) --n; - if(n > 0) continue; - } fetched_stack = stack.copy(); // copy exact stack with nbt and tool damage, otherwise we have an automagical repair of items. fetched_stack.setCount(0); int n = stack.getCount(); @@ -1067,12 +1079,12 @@ public class BlockDecorCraftingTable extends BlockDecorDirected for(int i=0; i<9; ++i) { final ItemStack grid_stack = getStackInSlot(i + CRAFTING_SLOTS_BEGIN); final ItemStack refab_stack = to_refab.isEmpty() ? ItemStack.EMPTY : to_refab.get(i).copy(); - if((!grid_stack.isEmpty()) && (grid_stack.isItemEqual(to_distribute))) { + if((!grid_stack.isEmpty()) && (isItemExactlyEqual(grid_stack, to_distribute))) { matching_grid_stack_sizes[i] = grid_stack.getCount(); total_num_missing_stacks += grid_stack.getMaxStackSize()-grid_stack.getCount(); if(max_matching_stack_size < matching_grid_stack_sizes[i]) max_matching_stack_size = matching_grid_stack_sizes[i]; if(min_matching_stack_size > matching_grid_stack_sizes[i]) min_matching_stack_size = matching_grid_stack_sizes[i]; - } else if((!refab_stack.isEmpty()) && (refab_stack.isItemEqual(to_distribute))) { + } else if((!refab_stack.isEmpty()) && (isItemExactlyEqual(refab_stack,to_distribute))) { matching_grid_stack_sizes[i] = 0; total_num_missing_stacks += grid_stack.getMaxStackSize(); if(max_matching_stack_size < matching_grid_stack_sizes[i]) max_matching_stack_size = matching_grid_stack_sizes[i]; diff --git a/1.12/src/main/java/wile/engineersdecor/detail/TreeCutting.java b/1.12/src/main/java/wile/engineersdecor/detail/TreeCutting.java index ce9bd8b..ddc5128 100644 --- a/1.12/src/main/java/wile/engineersdecor/detail/TreeCutting.java +++ b/1.12/src/main/java/wile/engineersdecor/detail/TreeCutting.java @@ -39,7 +39,7 @@ public class TreeCutting choppable_states.clear(); if(ModAuxiliaries.isModLoaded("dynamictrees")) { ForgeRegistries.BLOCKS.getKeys().forEach((regname)->{ - if("dynamictrees".equals(regname.getNamespace())) { + //if("dynamictrees".equals(regname.getNamespace())) { ... let's see if that also work with dyntrees compat mods if(!regname.getPath().contains("branch")) return; try { Block block = ForgeRegistries.BLOCKS.getValue(regname); @@ -56,7 +56,7 @@ public class TreeCutting LOGGER.warn("Failed to register chopping for " + regname.toString()); return; } - } + //} }); } LOGGER.info("Dynamic Trees chopping compat: " + choppable_states.size() + " choppable states found."); diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/small_block_breaker.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/small_block_breaker.json new file mode 100644 index 0000000..3696ceb --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/small_block_breaker.json @@ -0,0 +1,12 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:device/small_block_breaker_model" + }, + "variants": { + "normal": [{}], + "inventory": [{}], + "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} }, + "active": { "true":{ "model": "engineersdecor:device/small_block_breaker_model_active" }, "false":{}} + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang b/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang index 7d49338..97eba33 100644 --- a/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang +++ b/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang @@ -153,11 +153,11 @@ tile.engineersdecor.passive_fluid_accumulator.help=§6Vacuum suction based fluid #----------------------------------------------------------------------------------------------------------- tile.engineersdecor.factory_dropper.name=Factory Dropper tile.engineersdecor.factory_dropper.help=§6Dropper suitable for advanced factory automation.§r Has twelve round-robin selected slots. \ - Drop force, angle, stack size, and cool-down delay adjustable in the GUI. Three stack compare \ - slots with logical AND or OR can be used as internal trigger source. Internal trigger can be \ - AND'ed or OR'ed with the external redstone signal trigger. Trigger simulation buttons for testing. \ - Pre-opens shutter door when internal trigger conditions are met. Drops all matching stacks \ - simultaneously. Click on all elements in the GUI to see how it works. + Drop force, angle, stack size, and cool-down delay adjustable using sliders in the GUI. Three stack compare \ + slots (below the inventory slots) with logical AND or OR can be used as internal trigger source. The \ + internal trigger can be AND'ed or OR'ed with the external redstone signal trigger. Trigger simulation \ + buttons for testing. Pre-opens shutter door when internal trigger conditions are met. Drops all matching \ + stacks simultaneously. Simply click on all elements in the GUI to see how it works. tile.engineersdecor.factory_hopper.name=Factory Hopper tile.engineersdecor.factory_hopper.help=§6Hopper suitable for advanced factory automation.§r Can transfer half-stacks, max collection range 9x9.\n\ GUI Slider controls: Collection range (0 to 4), insertion delay (0.5s to 10s), insertion stack size (1 to 32).\n\ @@ -166,11 +166,19 @@ tile.engineersdecor.factory_placer.name=Factory Block Placer tile.engineersdecor.factory_placer.help=§6Allows placing blocks and planting crops or trees.§r\n\ GUI Redstone controls: Not inverted / inverted (default), pulse mode / continuous mode (default).\n\ Also supports spike planing from underneath the soil. Spits out items that it cannot place or plant. +tile.engineersdecor.small_block_breaker.name=Small Block Breaker +tile.engineersdecor.small_block_breaker.help=§6Breaks blocks in front of it.§r\n\ + Can be disabled by applying a redstone signal. \ + The time needed to destroy a block depends on the hardness of that block. \ + Provide RF/FE power to speed up the breaking process (massively). tile.engineersdecor.small_mineral_smelter.name=Small Mineral Melting Furnace tile.engineersdecor.small_mineral_smelter.help=§6High temperature, high insulation electrical stone melting furnace.§r\n\ - Heats up mineral blocks to magma blocks, and finally to lava. Due to the \ - miniturized device size the process is rather inefficient - much time and \ - energy is needed to liquefy a stone block. + Heats up mineral blocks to magma blocks, and finally to lava. Click with a \ + mineral block (stone, cobble, etc) or use item insertion to place a block in \ + the melter. Use bucket or fluid extraction to retrieve the lava. When cooling \ + down lava, obsidian is generated. Remove the RF power or apply a redstone \ + signal to disable the furnace. For automation, use a redstone comparator to \ + see in which melting phase the mineral is a moment. tile.engineersdecor.small_solar_panel.name=Small Solar Panel tile.engineersdecor.small_solar_panel.help=§6Produces a small amount of power when exposed to sunlight.§r\n\ Useful for charging LF capacitors in remote systems with low consumption. The \ diff --git a/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang b/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang index 62bea02..2472fce 100644 --- a/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang +++ b/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang @@ -162,11 +162,19 @@ tile.engineersdecor.factory_placer.name=Factory Block Placer #tile.engineersdecor.factory_placer.help=§6Allows placing blocks and planting crops or trees.§r\n\ GUI Redstone controls: Not inverted / inverted (default), pulse mode / continuous mode (default).\n\ Also supports spike planing from underneath the soil. Spits out items that it cannot place or plant. +tile.engineersdecor.small_block_breaker.name=Factory Block Breaker +#tile.engineersdecor.small_block_breaker.help=§6Breaks blocks in front of it.§r\n\ + Can be disabled by applying a redstone signal. \ + The time needed to destroy a block depends on the hardness of that block. \ + Provide RF/FE power to speed up the breaking process (massively). tile.engineersdecor.small_mineral_smelter.name=Small Mineral Melting Furnace #tile.engineersdecor.small_mineral_smelter.help=§6High temperature, high insulation electrical stone melting furnace.§r\n\ - Heats up mineral blocks to magma blocks, and finally to lava. Due to the \ - miniturized device size the process is rather inefficient - much time and \ - energy is needed to liquefy a stone block. + Heats up mineral blocks to magma blocks, and finally to lava. Click with a \ + mineral block (stone, cobble, etc) or use item insertion to place a block in \ + the melter. Use bucket or fluid extraction to retrieve the lava. When cooling \ + down lava, obsidian is generated. Remove the RF power or apply a redstone \ + signal to disable the furnace. For automation, use a redstone comparator to \ + see in which melting phase the mineral is a moment. tile.engineersdecor.small_solar_panel.name=Small Solar Panel #tile.engineersdecor.small_solar_panel.help=§6Produces a small amount of power when exposed to sunlight.§r\n\ Useful for charging LF capacitors in remote systems with low consumption. The \ diff --git a/1.12/src/main/resources/assets/engineersdecor/lang/zh_cn.lang b/1.12/src/main/resources/assets/engineersdecor/lang/zh_cn.lang index c7ba933..2320b54 100644 --- a/1.12/src/main/resources/assets/engineersdecor/lang/zh_cn.lang +++ b/1.12/src/main/resources/assets/engineersdecor/lang/zh_cn.lang @@ -165,6 +165,11 @@ tile.engineersdecor.factory_placer.name=Factory Block Placer #tile.engineersdecor.factory_placer.help=§6Allows placing blocks and planting crops or trees.§r\n\ GUI Redstone controls: Not inverted / inverted (default), pulse mode / continuous mode (default).\n\ Also supports spike planing from underneath the soil. Spits out items that it cannot place or plant. +tile.engineersdecor.small_block_breaker.name=Factory Block Breaker +#tile.engineersdecor.small_block_breaker.help=§6Breaks blocks in front of it.§r\n\ + Can be disabled by applying a redstone signal. \ + The time needed to destroy a block depends on the hardness of that block. \ + Provide RF/FE power to speed up the breaking process (massively). tile.engineersdecor.small_mineral_smelter.name=小型矿物熔炼炉 tile.engineersdecor.small_mineral_smelter.help=§6高温、高绝缘电熔石炉。§r\n\ 把矿物块加热成岩浆块,最后变成熔岩。由于\ diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model.json new file mode 100644 index 0000000..2392cae --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model.json @@ -0,0 +1,383 @@ +{ + "parent": "block/cube", + "textures": { + "t": "engineersdecor:blocks/device/small_block_breaker_top", + "b": "engineersdecor:blocks/device/small_block_breaker_bottom", + "l": "engineersdecor:blocks/device/small_block_breaker_left", + "particle": "engineersdecor:blocks/device/small_block_breaker_left", + "k": "engineersdecor:blocks/device/small_block_breaker_back", + "r": "engineersdecor:blocks/device/small_block_breaker_right", + "f": "engineersdecor:blocks/device/small_block_breaker_front", + "sh": "engineersdecor:blocks/device/small_block_breaker_shaft" + }, + "elements": [ + { + "from": [0, 0, 4], + "to": [1, 12, 16], + "faces": { + "north": {"uv": [15, 4, 16, 16], "texture": "#f"}, + "east": {"uv": [4, 0, 16, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [0, 4, 1, 16], "texture": "#k"}, + "west": {"uv": [4, 4, 16, 16], "texture": "#l"}, + "up": {"uv": [0, 4, 1, 16], "texture": "#t"}, + "down": {"uv": [0, 0, 1, 12], "texture": "#b"} + } + }, + { + "from": [15, 0, 4], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [23, 8, 8]}, + "faces": { + "north": {"uv": [0, 4, 1, 16], "texture": "#f"}, + "east": {"uv": [0, 4, 12, 16], "texture": "#r"}, + "south": {"uv": [15, 4, 16, 16], "texture": "#k"}, + "west": {"uv": [0, 0, 12, 12], "texture": "#l"}, + "up": {"uv": [15, 4, 16, 16], "texture": "#t"}, + "down": {"uv": [15, 0, 16, 12], "texture": "#b"} + } + }, + { + "from": [7.5, 4, 6], + "to": [8.5, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [15.5, 12, -5]}, + "faces": { + "north": {"uv": [7, 4, 8, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 11, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [7.5, 4, 8.5, 12], "texture": "#t"}, + "west": {"uv": [5, 4, 7, 12], "texture": "#f"}, + "up": {"uv": [12, 7, 13, 9], "texture": "#t"}, + "down": {"uv": [7.5, 9, 8.5, 11], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [8.5, 4, 6], + "to": [9, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [16.5, 12, -5]}, + "faces": { + "north": {"uv": [7, 4, 7.5, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 10, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [8.5, 4, 9, 12], "texture": "#t"}, + "west": {"uv": [6, 4, 7, 12], "texture": "#l"}, + "up": {"uv": [8.5, 7, 9, 8], "texture": "#t"}, + "down": {"uv": [8.5, 9, 9, 10], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [7, 4, 6], + "to": [7.5, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 12, -5]}, + "faces": { + "north": {"uv": [8.5, 4, 9, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 10, 12], "rotation": 180, "texture": "#l"}, + "south": {"uv": [7, 4, 7.5, 12], "texture": "#t"}, + "west": {"uv": [6, 4, 7, 12], "texture": "#f"}, + "up": {"uv": [7.5, 7, 8.5, 8], "texture": "#t"}, + "down": {"uv": [7, 9, 7.5, 10], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [15, 0, 0], + "to": [16, 5, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [23, -2, 8]}, + "faces": { + "north": {"uv": [0, 11, 1, 16], "texture": "#f"}, + "east": {"uv": [12, 11, 16, 16], "texture": "#r"}, + "south": {"uv": [15, 11, 16, 16], "texture": "#t"}, + "west": {"uv": [0, 11, 4, 16], "texture": "#l"}, + "up": {"uv": [15, 0, 16, 4], "texture": "#t"}, + "down": {"uv": [15, 12, 16, 16], "texture": "#b"} + } + }, + { + "from": [0, 0, 0], + "to": [1, 5, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [8, -2, 8]}, + "faces": { + "north": {"uv": [15, 11, 16, 16], "texture": "#f"}, + "east": {"uv": [12, 11, 16, 16], "texture": "#l"}, + "south": {"uv": [0, 11, 1, 16], "texture": "#t"}, + "west": {"uv": [0, 11, 4, 16], "texture": "#l"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#t"}, + "down": {"uv": [0, 12, 1, 16], "texture": "#b"} + } + }, + { + "from": [1, 0, 0], + "to": [15, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 24]}, + "faces": { + "north": {"uv": [1, 12, 15, 16], "texture": "#f"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#l"}, + "south": {"uv": [1, 12, 15, 16], "texture": "#k"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#l"}, + "up": {"uv": [1, 0, 15, 16], "texture": "#t"}, + "down": {"uv": [1, 0, 15, 16], "texture": "#b"} + } + }, + { + "from": [1, 4, 7], + "to": [15, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 24]}, + "faces": { + "north": {"uv": [1, 4, 15, 12], "texture": "#f"}, + "east": {"uv": [0, 4, 9, 12], "texture": "#l"}, + "south": {"uv": [1, 4, 15, 12], "texture": "#k"}, + "west": {"uv": [7, 4, 16, 12], "texture": "#l"}, + "up": {"uv": [1, 7, 15, 16], "texture": "#t"}, + "down": {"uv": [1, 0, 15, 9], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [4, 9.5, 5], + "to": [5, 10.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 2.5, 12.5]}, + "faces": { + "north": {"uv": [11, 5.5, 12, 6.5], "texture": "#sh"}, + "east": {"uv": [9.5, 5.5, 11, 6.5], "texture": "#sh"}, + "south": {"uv": [4, 5.5, 5, 6.5], "texture": "#sh"}, + "west": {"uv": [5, 5.5, 6.5, 6.5], "texture": "#sh"}, + "up": {"uv": [4, 5, 5, 6.5], "texture": "#sh"}, + "down": {"uv": [4, 9.5, 5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 6, 6.5], + "to": [6.5, 10, 7.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12.5, 1, 13.5]}, + "faces": { + "north": {"uv": [12, 12, 16, 16], "texture": "#sh"}, + "east": {"uv": [15.5, 6, 16, 10], "texture": "#sh"}, + "south": {"uv": [2.5, 6, 6.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 6, 0.5, 10], "texture": "#sh"}, + "up": {"uv": [2, 6, 6, 7], "texture": "#sh"}, + "down": {"uv": [2.5, 15.5, 6.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 9, 5], + "to": [3.5, 10, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10.5, 2, 12.5]}, + "faces": { + "north": {"uv": [12, 6, 13, 7], "texture": "#sh"}, + "east": {"uv": [9.5, 6, 11, 7], "texture": "#sh"}, + "south": {"uv": [2.5, 6, 3.5, 7], "texture": "#sh"}, + "west": {"uv": [5, 6, 6.5, 7], "texture": "#sh"}, + "up": {"uv": [2, 5, 3, 6.5], "texture": "#sh"}, + "down": {"uv": [2.5, 9.5, 3.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2, 7.5, 5], + "to": [3, 8.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 0.5, 12.5]}, + "faces": { + "north": {"uv": [13, 7.5, 14, 8.5], "texture": "#sh"}, + "east": {"uv": [9.5, 7.5, 11, 8.5], "texture": "#sh"}, + "south": {"uv": [2, 7.5, 3, 8.5], "texture": "#sh"}, + "west": {"uv": [5, 7.5, 6.5, 8.5], "texture": "#sh"}, + "up": {"uv": [2, 5, 3, 6.5], "texture": "#sh"}, + "down": {"uv": [2, 9.5, 3, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 6, 5], + "to": [3.5, 7, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10.5, -1, 12.5]}, + "faces": { + "north": {"uv": [12, 9, 13, 10], "texture": "#sh"}, + "east": {"uv": [9.5, 9, 11, 10], "texture": "#sh"}, + "south": {"uv": [2.5, 9, 3.5, 10], "texture": "#sh"}, + "west": {"uv": [5, 9, 6.5, 10], "texture": "#sh"}, + "up": {"uv": [2.5, 5, 3.5, 6.5], "texture": "#sh"}, + "down": {"uv": [2.5, 9.5, 3.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [4, 5.5, 5], + "to": [5, 6.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12, -1.5, 12.5]}, + "faces": { + "north": {"uv": [11, 9.5, 12, 10.5], "texture": "#sh"}, + "east": {"uv": [9.5, 9.5, 11, 10.5], "texture": "#sh"}, + "south": {"uv": [4, 9.5, 5, 10.5], "texture": "#sh"}, + "west": {"uv": [5, 9.5, 6.5, 10.5], "texture": "#sh"}, + "up": {"uv": [4, 5, 5, 6.5], "texture": "#sh"}, + "down": {"uv": [4, 9.5, 5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [5.5, 6, 5], + "to": [6.5, 7, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, -1, 12.5]}, + "faces": { + "north": {"uv": [9, 9, 10, 10], "texture": "#sh"}, + "east": {"uv": [9.5, 9, 11, 10], "texture": "#sh"}, + "south": {"uv": [5.5, 9, 6.5, 10], "texture": "#sh"}, + "west": {"uv": [5, 9, 6.5, 10], "texture": "#sh"}, + "up": {"uv": [5, 5, 6, 6.5], "texture": "#sh"}, + "down": {"uv": [5.5, 9.5, 6.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [5.5, 9, 5], + "to": [6.5, 10, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, 2, 12.5]}, + "faces": { + "north": {"uv": [9, 6, 10, 7], "texture": "#sh"}, + "east": {"uv": [9.5, 6, 11, 7], "texture": "#sh"}, + "south": {"uv": [5.5, 6, 6.5, 7], "texture": "#sh"}, + "west": {"uv": [5, 6, 6.5, 7], "texture": "#sh"}, + "up": {"uv": [5, 5, 6, 6.5], "texture": "#sh"}, + "down": {"uv": [5.5, 9.5, 6.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [6, 7.5, 5], + "to": [7, 8.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0.5, 12.5]}, + "faces": { + "north": {"uv": [9, 7.5, 10, 8.5], "texture": "#sh"}, + "east": {"uv": [9.5, 7.5, 11, 8.5], "texture": "#sh"}, + "south": {"uv": [6, 7.5, 7, 8.5], "texture": "#sh"}, + "west": {"uv": [5, 7.5, 6.5, 8.5], "texture": "#sh"}, + "up": {"uv": [6, 5, 7, 6.5], "texture": "#sh"}, + "down": {"uv": [6, 9.5, 7, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 6, 6.5], + "to": [13.5, 10, 7.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19.5, 1, 13.5]}, + "faces": { + "north": {"uv": [10, 12, 14, 16], "texture": "#sh"}, + "east": {"uv": [15.5, 6, 16, 10], "texture": "#sh"}, + "south": {"uv": [9.5, 6, 13.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 6, 0.5, 10], "texture": "#sh"}, + "up": {"uv": [10, 7, 14, 8], "texture": "#sh"}, + "down": {"uv": [9.5, 15.5, 13.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [12.5, 9, 5], + "to": [13.5, 10, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [20.5, 2, 12.5]}, + "faces": { + "north": {"uv": [2, 6, 3, 7], "texture": "#sh"}, + "east": {"uv": [9.5, 6, 11, 7], "texture": "#sh"}, + "south": {"uv": [12.5, 6, 13.5, 7], "texture": "#sh"}, + "west": {"uv": [5, 6, 6.5, 7], "texture": "#sh"}, + "up": {"uv": [12, 5, 13, 6.5], "texture": "#sh"}, + "down": {"uv": [12.5, 9.5, 13.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [11, 9.5, 5], + "to": [12, 10.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19, 2.5, 12.5]}, + "faces": { + "north": {"uv": [4, 5.5, 5, 6.5], "texture": "#sh"}, + "east": {"uv": [9.5, 5.5, 11, 6.5], "texture": "#sh"}, + "south": {"uv": [11, 5.5, 12, 6.5], "texture": "#sh"}, + "west": {"uv": [5, 5.5, 6.5, 6.5], "texture": "#sh"}, + "up": {"uv": [11, 5, 12, 6.5], "texture": "#sh"}, + "down": {"uv": [11, 9.5, 12, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 9, 5], + "to": [10.5, 10, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17.5, 2, 12.5]}, + "faces": { + "north": {"uv": [5, 6, 6, 7], "texture": "#sh"}, + "east": {"uv": [9.5, 6, 11, 7], "texture": "#sh"}, + "south": {"uv": [9.5, 6, 10.5, 7], "texture": "#sh"}, + "west": {"uv": [5, 6, 6.5, 7], "texture": "#sh"}, + "up": {"uv": [9, 5, 10, 6.5], "texture": "#sh"}, + "down": {"uv": [9.5, 9.5, 10.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9, 7.5, 5], + "to": [10, 8.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17, 0.5, 12.5]}, + "faces": { + "north": {"uv": [6, 7.5, 7, 8.5], "texture": "#sh"}, + "east": {"uv": [9.5, 7.5, 11, 8.5], "texture": "#sh"}, + "south": {"uv": [9, 7.5, 10, 8.5], "texture": "#sh"}, + "west": {"uv": [5, 7.5, 6.5, 8.5], "texture": "#sh"}, + "up": {"uv": [9, 5, 10, 6.5], "texture": "#sh"}, + "down": {"uv": [9, 9.5, 10, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 6, 5], + "to": [10.5, 7, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17.5, -1, 12.5]}, + "faces": { + "north": {"uv": [5, 9, 6, 10], "texture": "#sh"}, + "east": {"uv": [9.5, 9, 11, 10], "texture": "#sh"}, + "south": {"uv": [9.5, 9, 10.5, 10], "texture": "#sh"}, + "west": {"uv": [5, 9, 6.5, 10], "texture": "#sh"}, + "up": {"uv": [9, 5, 10, 6.5], "texture": "#sh"}, + "down": {"uv": [9.5, 9.5, 10.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [11, 5.5, 5], + "to": [12, 6.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19, -1.5, 12.5]}, + "faces": { + "north": {"uv": [4, 9.5, 5, 10.5], "texture": "#sh"}, + "east": {"uv": [9.5, 9.5, 11, 10.5], "texture": "#sh"}, + "south": {"uv": [11, 9.5, 12, 10.5], "texture": "#sh"}, + "west": {"uv": [5, 9.5, 6.5, 10.5], "texture": "#sh"}, + "up": {"uv": [11, 5, 12, 6.5], "texture": "#sh"}, + "down": {"uv": [11, 9.5, 12, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [12.5, 6, 5], + "to": [13.5, 7, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [20.5, -1, 12.5]}, + "faces": { + "north": {"uv": [2, 9, 3, 10], "texture": "#sh"}, + "east": {"uv": [9.5, 9, 11, 10], "texture": "#sh"}, + "south": {"uv": [12.5, 9, 13.5, 10], "texture": "#sh"}, + "west": {"uv": [5, 9, 6.5, 10], "texture": "#sh"}, + "up": {"uv": [12, 5, 13, 6.5], "texture": "#sh"}, + "down": {"uv": [12.5, 9.5, 13.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [13, 7.5, 5], + "to": [14, 8.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [21, 0.5, 12.5]}, + "faces": { + "north": {"uv": [2, 7.5, 3, 8.5], "texture": "#sh"}, + "east": {"uv": [9.5, 7.5, 11, 8.5], "texture": "#sh"}, + "south": {"uv": [13, 7.5, 14, 8.5], "texture": "#sh"}, + "west": {"uv": [5, 7.5, 6.5, 8.5], "texture": "#sh"}, + "up": {"uv": [13, 5, 14, 6.5], "texture": "#sh"}, + "down": {"uv": [13, 9.5, 14, 11], "rotation": 270, "texture": "#sh"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [85, 3, -10], + "translation": [1.75, -0.75, -2.25], + "scale": [0.35, 0.35, 0.35] + }, + "ground": { + "translation": [0, -0.75, 0], + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model_active.json b/1.12/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model_active.json new file mode 100644 index 0000000..6567073 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model_active.json @@ -0,0 +1,461 @@ +{ + "parent": "block/cube", + "textures": { + "t": "engineersdecor:blocks/device/small_block_breaker_top", + "b": "engineersdecor:blocks/device/small_block_breaker_bottom", + "l": "engineersdecor:blocks/device/small_block_breaker_left", + "particle": "engineersdecor:blocks/device/small_block_breaker_left", + "k": "engineersdecor:blocks/device/small_block_breaker_back", + "r": "engineersdecor:blocks/device/small_block_breaker_right", + "f": "engineersdecor:blocks/device/small_block_breaker_front", + "sh": "engineersdecor:blocks/device/small_block_breaker_shaft_active" + }, + "elements": [ + { + "from": [0, 0, 4], + "to": [1, 12, 16], + "faces": { + "north": {"uv": [15, 4, 16, 16], "texture": "#f"}, + "east": {"uv": [4, 0, 16, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [0, 4, 1, 16], "texture": "#k"}, + "west": {"uv": [4, 4, 16, 16], "texture": "#l"}, + "up": {"uv": [0, 4, 1, 16], "texture": "#t"}, + "down": {"uv": [0, 0, 1, 12], "texture": "#b"} + } + }, + { + "from": [15, 0, 4], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [23, 8, 8]}, + "faces": { + "north": {"uv": [0, 4, 1, 16], "texture": "#f"}, + "east": {"uv": [0, 4, 12, 16], "texture": "#r"}, + "south": {"uv": [15, 4, 16, 16], "texture": "#k"}, + "west": {"uv": [0, 0, 12, 12], "texture": "#l"}, + "up": {"uv": [15, 4, 16, 16], "texture": "#t"}, + "down": {"uv": [15, 0, 16, 12], "texture": "#b"} + } + }, + { + "from": [7.5, 4, 6], + "to": [8.5, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [15.5, 12, -5]}, + "faces": { + "north": {"uv": [7.5, 4, 8.5, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 11, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [7.5, 4, 8.5, 12], "texture": "#t"}, + "west": {"uv": [5, 4, 7, 12], "texture": "#f"}, + "up": {"uv": [12, 7, 13, 9], "texture": "#t"}, + "down": {"uv": [7.5, 9, 8.5, 11], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [8.5, 4, 6], + "to": [9, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [16.5, 12, -5]}, + "faces": { + "north": {"uv": [7, 4, 7.5, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 10, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [8.5, 4, 9, 12], "texture": "#t"}, + "west": {"uv": [6, 4, 7, 12], "texture": "#l"}, + "up": {"uv": [8, 7, 9.5, 8], "texture": "#t"}, + "down": {"uv": [8.5, 9, 9, 10], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [7, 4, 6], + "to": [7.5, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 12, -5]}, + "faces": { + "north": {"uv": [8.5, 4, 9, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 10, 12], "rotation": 180, "texture": "#l"}, + "south": {"uv": [7, 4, 7.5, 12], "texture": "#t"}, + "west": {"uv": [6, 4, 7, 12], "texture": "#f"}, + "up": {"uv": [7, 7, 7.5, 8], "texture": "#t"}, + "down": {"uv": [7, 9, 7.5, 10], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [15, 0, 0], + "to": [16, 5, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [23, -2, 8]}, + "faces": { + "north": {"uv": [0, 11, 1, 16], "texture": "#f"}, + "east": {"uv": [12, 11, 16, 16], "texture": "#r"}, + "south": {"uv": [15, 11, 16, 16], "texture": "#t"}, + "west": {"uv": [0, 11, 4, 16], "texture": "#l"}, + "up": {"uv": [15, 0, 16, 4], "texture": "#t"}, + "down": {"uv": [15, 12, 16, 16], "texture": "#b"} + } + }, + { + "from": [0, 0, 0], + "to": [1, 5, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [8, -2, 8]}, + "faces": { + "north": {"uv": [15, 11, 16, 16], "texture": "#f"}, + "east": {"uv": [12, 11, 16, 16], "texture": "#l"}, + "south": {"uv": [0, 11, 1, 16], "texture": "#t"}, + "west": {"uv": [0, 11, 4, 16], "texture": "#l"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#t"}, + "down": {"uv": [0, 12, 1, 16], "texture": "#b"} + } + }, + { + "from": [1, 0, 0], + "to": [15, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 24]}, + "faces": { + "north": {"uv": [1, 12, 15, 16], "texture": "#f"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#l"}, + "south": {"uv": [1, 12, 15, 16], "texture": "#k"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#l"}, + "up": {"uv": [1, 0, 15, 16], "texture": "#t"}, + "down": {"uv": [1, 0, 15, 16], "texture": "#b"} + } + }, + { + "from": [1, 4, 7], + "to": [15, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 24]}, + "faces": { + "north": {"uv": [1, 4, 15, 12], "texture": "#f"}, + "east": {"uv": [0, 4, 9, 12], "texture": "#l"}, + "south": {"uv": [1, 4, 15, 12], "texture": "#k"}, + "west": {"uv": [7, 4, 16, 12], "texture": "#l"}, + "up": {"uv": [1, 7, 15, 16], "texture": "#t"}, + "down": {"uv": [1, 0, 15, 9], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [4, 9.5, -2], + "to": [5, 10.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 2.5, 5.5]}, + "faces": { + "north": {"uv": [11, 5.5, 12, 6.5], "texture": "#sh"}, + "east": {"uv": [16, 5.5, 16, 6.5], "texture": "#sh"}, + "south": {"uv": [4, 5.5, 5, 6.5], "texture": "#sh"}, + "west": {"uv": [0, 5.5, 0, 6.5], "texture": "#sh"}, + "up": {"uv": [4, 0, 5, 0], "texture": "#sh"}, + "down": {"uv": [4, 16, 5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [3, 7, 0.5], + "to": [3.5, 9, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [2.5, 1, 5]}, + "faces": { + "north": {"uv": [12.5, 7, 13, 9], "texture": "#sh"}, + "east": {"uv": [9, 7, 15.5, 9], "texture": "#sh"}, + "south": {"uv": [3, 7, 3.5, 9], "texture": "#sh"}, + "west": {"uv": [1, 0, 7.5, 2], "texture": "#sh"}, + "up": {"uv": [3, 0.5, 9.5, 2], "rotation": 90, "texture": "#sh"}, + "down": {"uv": [3, 9, 3.5, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 6, -0.5], + "to": [6.5, 10, 0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12.5, 1, 6.5]}, + "faces": { + "north": {"uv": [11, 11, 15, 15], "texture": "#sh"}, + "east": {"uv": [15.5, 6, 16, 10], "texture": "#sh"}, + "south": {"uv": [2.5, 6, 6.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 6, 0.5, 10], "texture": "#sh"}, + "up": {"uv": [3, 2, 7, 2.5], "texture": "#sh"}, + "down": {"uv": [2.5, 15.5, 6.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 9, -2], + "to": [3.5, 10, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10.5, 2, 5.5]}, + "faces": { + "north": {"uv": [12.5, 6, 13.5, 7], "texture": "#sh"}, + "east": {"uv": [16, 6, 16, 7], "texture": "#sh"}, + "south": {"uv": [2.5, 6, 3.5, 7], "texture": "#sh"}, + "west": {"uv": [0, 6, 0, 7], "texture": "#sh"}, + "up": {"uv": [3, 2, 4, 3], "texture": "#sh"}, + "down": {"uv": [2.5, 16, 3.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2, 7.5, -2], + "to": [3, 8.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 0.5, 5.5]}, + "faces": { + "north": {"uv": [13, 7.5, 14, 8.5], "texture": "#sh"}, + "east": {"uv": [16, 7.5, 16, 8.5], "texture": "#sh"}, + "south": {"uv": [2, 7.5, 3, 8.5], "texture": "#sh"}, + "west": {"uv": [0, 7.5, 0, 8.5], "texture": "#sh"}, + "up": {"uv": [2, 0, 3, 0], "texture": "#sh"}, + "down": {"uv": [2, 16, 3, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 6, -2], + "to": [3.5, 7, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10.5, -1, 5.5]}, + "faces": { + "north": {"uv": [12.5, 9, 13.5, 10], "texture": "#sh"}, + "east": {"uv": [16, 9, 16, 10], "texture": "#sh"}, + "south": {"uv": [2.5, 9, 3.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 9, 0, 10], "texture": "#sh"}, + "up": {"uv": [2.5, 0, 3.5, 0], "texture": "#sh"}, + "down": {"uv": [2.5, 16, 3.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [4, 5.5, -2], + "to": [5, 6.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12, -1.5, 5.5]}, + "faces": { + "north": {"uv": [11, 9.5, 12, 10.5], "texture": "#sh"}, + "east": {"uv": [16, 9.5, 16, 10.5], "texture": "#sh"}, + "south": {"uv": [4, 9.5, 5, 10.5], "texture": "#sh"}, + "west": {"uv": [0, 9.5, 0, 10.5], "texture": "#sh"}, + "up": {"uv": [4, 0, 5, 0], "texture": "#sh"}, + "down": {"uv": [4, 16, 5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [5.5, 6, -2], + "to": [6.5, 7, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, -1, 5.5]}, + "faces": { + "north": {"uv": [9.5, 9, 10.5, 10], "texture": "#sh"}, + "east": {"uv": [16, 9, 16, 10], "texture": "#sh"}, + "south": {"uv": [5.5, 9, 6.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 9, 0, 10], "texture": "#sh"}, + "up": {"uv": [5.5, 0, 6.5, 0], "texture": "#sh"}, + "down": {"uv": [5.5, 16, 6.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [5.5, 9, -2], + "to": [6.5, 10, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, 2, 5.5]}, + "faces": { + "north": {"uv": [9.5, 6, 10.5, 7], "texture": "#sh"}, + "east": {"uv": [16, 6, 16, 7], "texture": "#sh"}, + "south": {"uv": [5.5, 6, 6.5, 7], "texture": "#sh"}, + "west": {"uv": [0, 6, 0, 7], "texture": "#sh"}, + "up": {"uv": [5.5, 0, 6.5, 0], "texture": "#sh"}, + "down": {"uv": [5.5, 16, 6.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [6, 7.5, -2], + "to": [7, 8.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0.5, 5.5]}, + "faces": { + "north": {"uv": [9, 7.5, 10, 8.5], "texture": "#sh"}, + "east": {"uv": [16, 7.5, 16, 8.5], "texture": "#sh"}, + "south": {"uv": [6, 7.5, 7, 8.5], "texture": "#sh"}, + "west": {"uv": [0, 7.5, 0, 8.5], "texture": "#sh"}, + "up": {"uv": [6, 0, 7, 0], "texture": "#sh"}, + "down": {"uv": [6, 16, 7, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [5.5, 7, 0.5], + "to": [6, 9, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [5.5, 1, 5]}, + "faces": { + "north": {"uv": [10, 7, 10.5, 9], "texture": "#sh"}, + "east": {"uv": [8, 7, 14.5, 9], "texture": "#sh"}, + "south": {"uv": [5.5, 7, 6, 9], "texture": "#sh"}, + "west": {"uv": [0.5, 7, 7, 9], "texture": "#sh"}, + "up": {"uv": [5, 2, 11.5, 2.5], "texture": "#sh"}, + "down": {"uv": [5.5, 9, 6, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [3.5, 6.5, 0.5], + "to": [5.5, 9.5, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [4.5, 1, 5]}, + "faces": { + "north": {"uv": [10.5, 6.5, 12.5, 9.5], "texture": "#sh"}, + "east": {"uv": [9, 6.5, 15.5, 9.5], "texture": "#sh"}, + "south": {"uv": [3.5, 6.5, 5.5, 9.5], "texture": "#sh"}, + "west": {"uv": [0.5, 6.5, 7, 9.5], "texture": "#sh"}, + "up": {"uv": [4, 1, 11, 3.5], "rotation": 90, "texture": "#sh"}, + "down": {"uv": [3.5, 9, 5.5, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [12.5, 7, 0.5], + "to": [13, 9, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [12.5, 1, 5]}, + "faces": { + "north": {"uv": [3, 7, 3.5, 9], "texture": "#sh"}, + "east": {"uv": [9, 7, 15.5, 9], "texture": "#sh"}, + "south": {"uv": [12.5, 7, 13, 9], "texture": "#sh"}, + "west": {"uv": [0.5, 7, 7, 9], "texture": "#sh"}, + "up": {"uv": [3, 0, 11.5, 0.5], "rotation": 90, "texture": "#sh"}, + "down": {"uv": [12.5, 9, 13, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [10.5, 6.5, 0.5], + "to": [12.5, 9.5, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [11.5, 1, 5]}, + "faces": { + "north": {"uv": [3.5, 6.5, 5.5, 9.5], "texture": "#sh"}, + "east": {"uv": [9, 6.5, 15.5, 9.5], "texture": "#sh"}, + "south": {"uv": [10.5, 6.5, 12.5, 9.5], "texture": "#sh"}, + "west": {"uv": [0.5, 6.5, 7, 9.5], "texture": "#sh"}, + "up": {"uv": [6, 0, 12, 2.5], "rotation": 90, "texture": "#sh"}, + "down": {"uv": [10.5, 9, 12.5, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [10, 7, 0.5], + "to": [10.5, 9, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [9.5, 1, 5]}, + "faces": { + "north": {"uv": [5.5, 7, 6, 9], "texture": "#sh"}, + "east": {"uv": [9, 7, 15.5, 9], "texture": "#sh"}, + "south": {"uv": [10, 7, 10.5, 9], "texture": "#sh"}, + "west": {"uv": [0.5, 7, 7, 9], "texture": "#sh"}, + "up": {"uv": [10, 0.5, 15.5, 1], "rotation": 90, "texture": "#sh"}, + "down": {"uv": [10, 9, 10.5, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 6, -0.5], + "to": [13.5, 10, 0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19.5, 1, 6.5]}, + "faces": { + "north": {"uv": [10, 12, 14, 16], "texture": "#sh"}, + "east": {"uv": [15.5, 6, 16, 10], "texture": "#sh"}, + "south": {"uv": [9.5, 6, 13.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 6, 0.5, 10], "texture": "#sh"}, + "up": {"uv": [9.5, 0, 13.5, 0.5], "texture": "#sh"}, + "down": {"uv": [9.5, 15.5, 13.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [12.5, 9, -2], + "to": [13.5, 10, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [20.5, 2, 5.5]}, + "faces": { + "north": {"uv": [2.5, 6, 3.5, 7], "texture": "#sh"}, + "east": {"uv": [16, 6, 16, 7], "texture": "#sh"}, + "south": {"uv": [12.5, 6, 13.5, 7], "texture": "#sh"}, + "west": {"uv": [0, 6, 0, 7], "texture": "#sh"}, + "up": {"uv": [12.5, 0, 13.5, 0], "texture": "#sh"}, + "down": {"uv": [12.5, 16, 13.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [11, 9.5, -2], + "to": [12, 10.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19, 2.5, 5.5]}, + "faces": { + "north": {"uv": [4, 5.5, 5, 6.5], "texture": "#sh"}, + "east": {"uv": [16, 5.5, 16, 6.5], "texture": "#sh"}, + "south": {"uv": [11, 5.5, 12, 6.5], "texture": "#sh"}, + "west": {"uv": [0, 5.5, 0, 6.5], "texture": "#sh"}, + "up": {"uv": [11, 0, 12, 0], "texture": "#sh"}, + "down": {"uv": [11, 16, 12, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 9, -2], + "to": [10.5, 10, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17.5, 2, 5.5]}, + "faces": { + "north": {"uv": [5.5, 6, 6.5, 7], "texture": "#sh"}, + "east": {"uv": [16, 6, 16, 7], "texture": "#sh"}, + "south": {"uv": [9.5, 6, 10.5, 7], "texture": "#sh"}, + "west": {"uv": [0, 6, 0, 7], "texture": "#sh"}, + "up": {"uv": [9.5, 0, 10.5, 0], "texture": "#sh"}, + "down": {"uv": [9.5, 16, 10.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9, 7.5, -2], + "to": [10, 8.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17, 0.5, 5.5]}, + "faces": { + "north": {"uv": [6, 7.5, 7, 8.5], "texture": "#sh"}, + "east": {"uv": [16, 7.5, 16, 8.5], "texture": "#sh"}, + "south": {"uv": [9, 7.5, 10, 8.5], "texture": "#sh"}, + "west": {"uv": [0, 7.5, 0, 8.5], "texture": "#sh"}, + "up": {"uv": [9, 0, 10, 0], "texture": "#sh"}, + "down": {"uv": [9, 16, 10, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 6, -2], + "to": [10.5, 7, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17.5, -1, 5.5]}, + "faces": { + "north": {"uv": [5.5, 9, 6.5, 10], "texture": "#sh"}, + "east": {"uv": [16, 9, 16, 10], "texture": "#sh"}, + "south": {"uv": [9.5, 9, 10.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 9, 0, 10], "texture": "#sh"}, + "up": {"uv": [9.5, 0, 10.5, 0], "texture": "#sh"}, + "down": {"uv": [9.5, 16, 10.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [11, 5.5, -2], + "to": [12, 6.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19, -1.5, 5.5]}, + "faces": { + "north": {"uv": [4, 9.5, 5, 10.5], "texture": "#sh"}, + "east": {"uv": [16, 9.5, 16, 10.5], "texture": "#sh"}, + "south": {"uv": [11, 9.5, 12, 10.5], "texture": "#sh"}, + "west": {"uv": [0, 9.5, 0, 10.5], "texture": "#sh"}, + "up": {"uv": [11, 0, 12, 0], "texture": "#sh"}, + "down": {"uv": [11, 16, 12, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [12.5, 6, -2], + "to": [13.5, 7, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [20.5, -1, 5.5]}, + "faces": { + "north": {"uv": [2.5, 9, 3.5, 10], "texture": "#sh"}, + "east": {"uv": [16, 9, 16, 10], "texture": "#sh"}, + "south": {"uv": [12.5, 9, 13.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 9, 0, 10], "texture": "#sh"}, + "up": {"uv": [12.5, 0, 13.5, 0], "texture": "#sh"}, + "down": {"uv": [12.5, 16, 13.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [13, 7.5, -2], + "to": [14, 8.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [21, 0.5, 5.5]}, + "faces": { + "north": {"uv": [2, 7.5, 3, 8.5], "texture": "#sh"}, + "east": {"uv": [16, 7.5, 16, 8.5], "texture": "#sh"}, + "south": {"uv": [13, 7.5, 14, 8.5], "texture": "#sh"}, + "west": {"uv": [0, 7.5, 0, 8.5], "texture": "#sh"}, + "up": {"uv": [13, 0, 14, 0], "texture": "#sh"}, + "down": {"uv": [13, 16, 14, 16], "rotation": 270, "texture": "#sh"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [85, 3, -10], + "translation": [1.75, -0.75, -2.25], + "scale": [0.35, 0.35, 0.35] + }, + "ground": { + "translation": [0, -0.75, 0], + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/alternative/small_block_breaker_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/alternative/small_block_breaker_recipe_standalone.json new file mode 100644 index 0000000..fba61b9 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/alternative/small_block_breaker_recipe_standalone.json @@ -0,0 +1,37 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:small_block_breaker", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "PPP", + "PAO", + "PRP" + ], + "key": { + "O": { + "item": "minecraft:observer", + "data": 0 + }, + "P": { + "item": "#ingotIron", + "data": 0 + }, + "A": { + "item": "minecraft:iron_pickaxe", + "data": 0 + }, + "R": { + "item": "minecraft:redstone_block", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:small_block_breaker", + "count": 1 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/dependent/small_block_breaker_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/dependent/small_block_breaker_recipe.json new file mode 100644 index 0000000..bd646c4 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/dependent/small_block_breaker_recipe.json @@ -0,0 +1,41 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:small_block_breaker", + "required": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "PPP", + "PAO", + "CRC" + ], + "key": { + "O": { + "item": "minecraft:observer", + "data": 0 + }, + "P": { + "item": "#plateAnyFerroMetal", + "data": 0 + }, + "A": { + "item": "minecraft:iron_pickaxe", + "data": 0 + }, + "R": { + "item": "minecraft:redstone_block", + "data": 0 + }, + "C": { + "item": "#anyMechanicalComponent", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:small_block_breaker", + "count": 1 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_back.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_back.png new file mode 100644 index 0000000000000000000000000000000000000000..3c1f608629a21ed49abce64225e5ac8b1c9f9e75 GIT binary patch literal 573 zcmV-D0>b@?P)T&(=KJOF1y`sP<~H8Gs#Te zujR94XXY&7`udvZ=V#1pXkVHapokbiH#avtJw5UI`ihDO4-XG)w_AGexck`er7S@1 z&fVP|+wGQ!phN`g^_uhZbN>APg$Ia$sp1i2La}+o-Gj(v^X)rVS63Vk2g;&bL{Jgd zt539Wsv0oMh)8-SQIunkF$pu90o)xkBN6`Y-^k1pV9rcD@ROgW@DJl^m6@TcBL@H_Gr739V6|GY+wCy3A*r=C8khS5a(Q{l@p$AP5XN7rH`-wjpf{O6koa&C-XcB$(_;dteU;BY%Wu9kNjAD8eK?PRzRrPR< zwL7gls>0G8T}RENs1P~sd+(G|27;M!d3nk6^D|$*{lMLaRH}%`rgCOdYb7GMy}f0( z+p*v8(cU``4-Y&&J&iq^9k}0G+YXbNp{mBHRM_= hr40A3udi8_g}<)*lG%mnUUvWh002ovPDHLkV1h*C`zQba literal 0 HcmV?d00001 diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_front.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_front.png new file mode 100644 index 0000000000000000000000000000000000000000..187468bcac1e2606b31511a4964ce162f58a5f3d GIT binary patch literal 450 zcmV;z0X_bSP)~-=RTLD5Ve)E4Zz-L8JH1=kvitg#CU`?;Uqv3Ax#9aQ9J|lL3}x0l-vsd`RIE zY9h%GLh(ME1DP?7onPFyw#w=hKi^$K$TI;Y4Sl!BO?(W0BSu5jDq{^9`tE$pk8+RiG zwasS3@p$CAvE*&}?4!Ar202&~1KAKFEs{jB107*qoM6N<$g0(xr&;S4c literal 0 HcmV?d00001 diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_left.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/device/small_block_breaker_left.png new file mode 100644 index 0000000000000000000000000000000000000000..7d579a4be7a34d9e51d3c4855d21b641e7e02dee GIT binary patch literal 489 zcmVdzYjS#|@5;H?Y5Z}~VzuIt_ zzCs8+A7kvXJRT212&9z0RCw(FPo>_1suFX~%;$4vvl-(!l5=La+x5LObw&}k+bxU5 z0udp4Z=M7=9*QGx3>#E5C>9KR;v~3^}0*_Yz-ji%x1IU z`FtWNrLMrtNGTCx?9+GoziT`v&Jbgy*7{ZK_K66p+O74=)>?Z5_<(vkZuh=h_&*76$hGAeBhCXHYT0}aaFEgXoO05+U@zx{LG*L=HRXa;5<P)z%x(@At?FrT~y93M2ea;nXx_Nxbyj}B7$=c?>zvvS5*LltL zuU0G8>oqY(LamkC?Z!Bc{Qdpmy>A&A$>nn4e!tWAJs|{CwUroh&TO|^a?TBGRvE$J za6nagzu(PX(<+#!zo4b9w)WmPcT{!8n7`H}HbV$sKwJMhB^G5lmR+};zb>ijT!Q^r zcG~Z-=+Eb~WgsH63nD_!c~*7Nnag)jN@26vwDX)ZpU-F3pzAtLr_)!@o6-O&rFK?I zA*IAH408sm%H?ul97p=TZ-S{RDJ5cz?SaJ@0k~eT|NFu@$1n^4Ow-itS=MQqOw&Xu eh23t~MEwU<2nlE-8DSLw0000r2`#06 z*#CcSAk9_YhcMnGy9Q%qq|waCw)gv8UauE@-}8Jv`FuVAlv23g?|i>sa?UKvLf3T+ z!$8wCtm}%I;Q;PVDFt`0#X7YC=6MDn=L|qfX$Kg`kx~ldI1&-$oGGQSZ5zi1+5&2t z1~)U>w%zHtUf-hI%;j(M&I|l2kIa*6$?l?UDuu1+-|oWKvdUt zt?sM9-Tz2XJWUgolPDgipyI1H0$Y{^cXu9-M|D{e%#55f5mBXx;jy6~XYB6C)MMgx z0=kcgUx0O8s~2tCo(dwOPDRWl_4JUm1hj423E(J2v0rJbKmhuE|GkHl5-B<&U|E(b6asM_&pBr( zVlc zx{A%|blL$(bzRqzeHy6hpAdL{zuzdFNYPh;#>dNhlcyDGOfOTC_)vJ(BTX6*fZg{^ z4qpNGaiZy<(asn(1^pRnvx|^26qshu`mxJkN85?6+TDjR2setG^H)YOMu-TSrm6Cweq8%`$9fOL z@JH$d-L~x`r2qB4A1KFUn;EoiTL382hmVE_^j}uZy$xC}LI_p&`9(u2lQ~o0iJbd< zwme-*yYv8=rIfxZjkAE|q8_|HL}Y&#e7St*`LkD~5BndbhxdpFRI*9{0000D=JRRm_Gwlc$$0I3xJ{pZN>-gWmRCpXTh7auSn? zoG7z%-Re+Lr6$R{ybJ-MGj5h0s|`Ka|M=LhBC~Q;6s;=`=QRK^K-? z(ld85`h?xxdu-J^K6B$8)<(s#3LK5AvY3NIcUUVid4&i@imvEfwa$BqZKMm!lr63) z$p)+{6`_j8f`Z!Nk*SwbKCL+>)7DW_(!sGOPJhL#X*Q7sXEvX4NjnrO`n)o4x^Z!1 z0Z{9aO|hY+H&0X^d&7IKW>v=lW8ruI`hTrA{T^H}H`miK{n7Td#dq)4n|)GH61)3; zd+_{~6NP)<&tL1s#!#^P?u3~;?!S+=e_>ww>-TDY4}0UpwE1=`v~1>|Pvt%M!gQ{J gx3RO!n*Q%>t8avttle?C5g3RJp00i_>zopr0PhW*jsO4v literal 0 HcmV?d00001 diff --git a/1.14/gradle.properties b/1.14/gradle.properties index 5bbdffb..2179017 100644 --- a/1.14/gradle.properties +++ b/1.14/gradle.properties @@ -5,4 +5,4 @@ version_minecraft=1.14.4 version_forge_minecraft=1.14.4-28.1.68 version_fml_mappings=20190719-1.14.3 version_jei=1.14.4:6.0.0.10 -version_engineersdecor=1.0.15-b2 +version_engineersdecor=1.0.15-b3 diff --git a/1.14/meta/update.json b/1.14/meta/update.json index 3e5d602..52c47a0 100644 --- a/1.14/meta/update.json +++ b/1.14/meta/update.json @@ -1,6 +1,7 @@ { "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "1.14.4": { + "1.0.15-b3": "[A] Added Small Block Breaker.\n[M] Mineral Smelter fluid handler/transfer added.", "1.0.15-b2": "[!] Forge version requirement set to 1.14.4-28.1.68 or higher.\n[A] Added Factory Block Placer and Planter.\n[A] Added Small Tree Cutter.", "1.0.15-b1": "[A] Added Floor Edge Light.\n[U] Updated to Forge1.14.4-28.1.68/20190719-1.14.3.", "1.0.14-b1": "[U] Updated to Forge 1.14.4-28.1.40/20190719-1.14.3.\n[A] Factory Hopper added (configurable hopper and item collector).\n[M] Switched to integrated loot table generation.\n[M] Lang file zh_cn updated (scikirbypoke, PR#53).", @@ -29,6 +30,6 @@ }, "promos": { "1.14.4-recommended": "", - "1.14.4-latest": "1.0.15-b2" + "1.14.4-latest": "1.0.15-b3" } } \ No newline at end of file diff --git a/1.14/readme.md b/1.14/readme.md index 037ccc9..45ecf05 100644 --- a/1.14/readme.md +++ b/1.14/readme.md @@ -11,6 +11,9 @@ Mod sources for Minecraft version 1.14.4. ## Version history + - v1.0.15-b3 [A] Added Small Block Breaker. + [M] Mineral Smelter fluid handler/transfer added. + - v1.0.15-b2 [!] Forge version requirement set to 1.14.4-28.1.68 or higher. [A] Added Factory Block Placer and Planter. [A] Added Small Tree Cutter. diff --git a/1.14/src/main/java/wile/engineersdecor/ModContent.java b/1.14/src/main/java/wile/engineersdecor/ModContent.java index 4518bb3..42422b5 100644 --- a/1.14/src/main/java/wile/engineersdecor/ModContent.java +++ b/1.14/src/main/java/wile/engineersdecor/ModContent.java @@ -374,6 +374,12 @@ public class ModContent ModAuxiliaries.getPixeledAABB(2,2,2, 14,14,14) )).setRegistryName(new ResourceLocation(ModEngineersDecor.MODID, "factory_placer")); + public static final BlockDecorBreaker SMALL_BLOCK_BREAKER = (BlockDecorBreaker)(new BlockDecorBreaker( + BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_SHIFTCLICK, + Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(2f, 15f).sound(SoundType.METAL), + ModAuxiliaries.getPixeledAABB(0,0,0, 16,12,16) + )).setRegistryName(new ResourceLocation(ModEngineersDecor.MODID, "small_block_breaker")); + public static final BlockDecorHopper FACTORY_HOPPER = (BlockDecorHopper)(new BlockDecorHopper( BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_OPPOSITE_PLACEMENT|BlockDecor.CFG_REDSTONE_CONTROLLED, Block.Properties.create(Material.IRON, MaterialColor.IRON).hardnessAndResistance(2f, 15f).sound(SoundType.METAL), @@ -482,14 +488,15 @@ public class ModContent private static final Block modBlocks[] = { TREATED_WOOD_CRAFTING_TABLE, SMALL_LAB_FURNACE, + SMALL_ELECTRICAL_FURNACE, + FACTORY_HOPPER, FACTORY_DROPPER, FACTORY_PLACER, - FACTORY_HOPPER, - SMALL_ELECTRICAL_FURNACE, - SMALL_WASTE_INCINERATOR, - SMALL_MINERAL_SMELTER, + SMALL_BLOCK_BREAKER, SMALL_TREE_CUTTER, SMALL_SOLAR_PANEL, + SMALL_WASTE_INCINERATOR, + SMALL_MINERAL_SMELTER, CLINKER_BRICK_BLOCK, CLINKER_BRICK_SLAB, CLINKER_BRICK_STAIRS, @@ -586,6 +593,11 @@ public class ModContent .build(null) .setRegistryName(ModEngineersDecor.MODID, "te_factory_placer"); + public static final TileEntityType TET_SMALL_BLOCK_BREAKER = TileEntityType.Builder + .create(BlockDecorBreaker.BTileEntity::new, SMALL_BLOCK_BREAKER) + .build(null) + .setRegistryName(ModEngineersDecor.MODID, "te_small_block_breaker"); + public static final TileEntityType TET_FACTORY_HOPPER = TileEntityType.Builder .create(BlockDecorHopper.BTileEntity::new, FACTORY_HOPPER) .build(null) @@ -625,16 +637,17 @@ public class ModContent private static final TileEntityType tile_entity_types[] = { TET_TREATED_WOOD_CRAFTING_TABLE, TET_SMALL_LAB_FURNACE, + TET_SMALL_ELECTRICAL_FURNACE, + TET_FACTORY_HOPPER, TET_FACTORY_DROPPER, TET_FACTORY_PLACER, - TET_FACTORY_HOPPER, - TET_SMALL_ELECTRICAL_FURNACE, + TET_SMALL_BLOCK_BREAKER, + TET_SMALL_TREE_CUTTER, TET_WASTE_INCINERATOR, - TET_STRAIGHT_PIPE_VALVE, - TET_PASSIVE_FLUID_ACCUMULATOR, TET_MINERAL_SMELTER, TET_SMALL_SOLAR_PANEL, - TET_SMALL_TREE_CUTTER + TET_STRAIGHT_PIPE_VALVE, + TET_PASSIVE_FLUID_ACCUMULATOR, }; //-------------------------------------------------------------------------------------------------------------------- diff --git a/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorBreaker.java b/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorBreaker.java new file mode 100644 index 0000000..7dcdea8 --- /dev/null +++ b/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorBreaker.java @@ -0,0 +1,282 @@ +/* + * @file BlockDecorBreaker.java + * @author Stefan Wilhelm (wile) + * @copyright (C) 2019 Stefan Wilhelm + * @license MIT (see https://opensource.org/licenses/MIT) + * + * Small Block Breaker + */ +package wile.engineersdecor.blocks; + +import wile.engineersdecor.ModContent; +import wile.engineersdecor.ModEngineersDecor; +import net.minecraft.block.Blocks; +import net.minecraft.block.SoundType; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemStack; +import net.minecraft.world.server.ServerWorld; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.*; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.energy.CapabilityEnergy; +import net.minecraftforge.energy.IEnergyStorage; +import javax.annotation.Nullable; +import java.util.HashSet; +import java.util.List; +import java.util.Random; + + +public class BlockDecorBreaker extends BlockDecorDirectedHorizontal +{ + public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); + + public BlockDecorBreaker(long config, Block.Properties builder, final AxisAlignedBB unrotatedAABB) + { super(config, builder, unrotatedAABB); } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) + { super.fillStateContainer(builder); builder.add(ACTIVE); } + + @Override + @Nullable + public BlockState getStateForPlacement(BlockItemUseContext context) + { return super.getStateForPlacement(context).with(ACTIVE, false); } + + @Override + public boolean hasTileEntity(BlockState state) + { return true; } + + @Override + @Nullable + public TileEntity createTileEntity(BlockState state, IBlockReader world) + { return new BTileEntity(); } + + @OnlyIn(Dist.CLIENT) + public void animateTick(BlockState state, World world, BlockPos pos, Random rnd) + { + if((state.getBlock()!=this) || (!state.get(ACTIVE))) return; + final double rv = rnd.nextDouble(); + if(rv > 0.8) return; + final double x=0.5+pos.getX(), y=0.5+pos.getY(), z=0.5+pos.getZ(); + final double xc=0.52, xr=rnd.nextDouble()*0.4-0.2, yr=(y-0.3+rnd.nextDouble()*0.2); + switch(state.get(HORIZONTAL_FACING)) { + case WEST: world.addParticle(ParticleTypes.SMOKE, x-xc, yr, z+xr, 0.0, 0.0, 0.0); break; + case EAST: world.addParticle(ParticleTypes.SMOKE, x+xc, yr, z+xr, 0.0, 0.0, 0.0); break; + case NORTH: world.addParticle(ParticleTypes.SMOKE, x+xr, yr, z-xc, 0.0, 0.0, 0.0); break; + default: world.addParticle(ParticleTypes.SMOKE, x+xr, yr, z+xc, 0.0, 0.0, 0.0); break; + } + } + + @Override + @SuppressWarnings("deprecation") + public void neighborChanged(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean unused) + { + if(!(world instanceof World) || (((World) world).isRemote)) return; + TileEntity te = world.getTileEntity(pos); + if(!(te instanceof BTileEntity)) return; + ((BTileEntity)te).block_updated(); + } + + @Override + @SuppressWarnings("deprecation") + public boolean canProvidePower(BlockState state) + { return true; } + + @Override + @SuppressWarnings("deprecation") + public int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side) + { return 0; } + + @Override + @SuppressWarnings("deprecation") + public int getStrongPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side) + { return 0; } + + //-------------------------------------------------------------------------------------------------------------------- + // Tile entity + //-------------------------------------------------------------------------------------------------------------------- + + public static class BTileEntity extends TileEntity implements ITickableTileEntity, IEnergyStorage + { + public static final int IDLE_TICK_INTERVAL = 40; + public static final int TICK_INTERVAL = 5; + public static final int BOOST_FACTOR = 8; + public static final int DEFAULT_BOOST_ENERGY = 64; + public static final int DEFAULT_BREAKING_RELUCTANCE = 17; + public static final int DEFAULT_MIN_BREAKING_TIME = 15; + public static final int MAX_BREAKING_TIME = 800; + private static int boost_energy_consumption = DEFAULT_BOOST_ENERGY; + private static int breaking_reluctance = DEFAULT_BREAKING_RELUCTANCE; + private static int min_breaking_time = DEFAULT_MIN_BREAKING_TIME; + private int tick_timer_; + private int proc_time_elapsed_; + private int boost_energy_; + + public static void on_config(int boost_energy_per_tick, int breaking_time_per_hardness, int min_breaking_time_ticks) + { + boost_energy_consumption = TICK_INTERVAL * MathHelper.clamp(boost_energy_per_tick, 16, 512); + breaking_reluctance = MathHelper.clamp(breaking_time_per_hardness, 5, 50); + min_breaking_time = MathHelper.clamp(min_breaking_time_ticks, 10, 100); + ModEngineersDecor.logger().info("Config block breaker: Boost energy consumption:" + boost_energy_consumption + "rf/t, reluctance=" + breaking_reluctance + "/hrdn, break time offset=" + min_breaking_time ); + } + + public BTileEntity() + { super(ModContent.TET_SMALL_BLOCK_BREAKER); } + + public BTileEntity(TileEntityType te_type) + { super(te_type); } + + public void block_updated() + { if(tick_timer_ > 2) tick_timer_ = 2; } + + + // IEnergyStorage ---------------------------------------------------------------------------- + + protected LazyOptional energy_handler_ = LazyOptional.of(() -> (IEnergyStorage)this); + + @Override + public boolean canExtract() + { return false; } + + @Override + public boolean canReceive() + { return true; } + + @Override + public int getMaxEnergyStored() + { return boost_energy_consumption; } + + @Override + public int getEnergyStored() + { return boost_energy_; } + + @Override + public int extractEnergy(int maxExtract, boolean simulate) + { return 0; } + + @Override + public int receiveEnergy(int maxReceive, boolean simulate) + { // only speedup support, no buffering, not in nbt -> no markdirty + if((boost_energy_ >= boost_energy_consumption) || (maxReceive < boost_energy_consumption)) return 0; + if(!simulate) boost_energy_ = boost_energy_consumption; + return boost_energy_consumption; + } + + // Capability export ---------------------------------------------------------------------------- + + @Override + public LazyOptional getCapability(net.minecraftforge.common.capabilities.Capability capability, @Nullable Direction facing) + { + if(!this.removed && (facing != null)) { + if(capability== CapabilityEnergy.ENERGY) { + return energy_handler_.cast(); + } + } + return super.getCapability(capability, facing); + } + + // ITickable ------------------------------------------------------------------------------------ + + + private static HashSet blacklist = new HashSet<>(); + static { + blacklist.add(Blocks.AIR); + blacklist.add(Blocks.BEDROCK); + blacklist.add(Blocks.FIRE); + blacklist.add(Blocks.END_PORTAL); + blacklist.add(Blocks.END_GATEWAY); + blacklist.add(Blocks.END_PORTAL_FRAME); + blacklist.add(Blocks.NETHER_PORTAL); + blacklist.add(Blocks.BARRIER); + } + + private static boolean isBreakable(BlockState state, BlockPos pos, World world) + { + final Block block = state.getBlock(); + if(blacklist.contains(block)) return false; + if(state.getMaterial().isLiquid()) return false; + if(block.isAir(state, world, pos)) return false; + float bh = state.getBlockHardness(world, pos); + if((bh<0) || (bh>55)) return false; + return true; + } + + private boolean breakBlock(BlockState state, BlockPos pos, World world) + { + if(world.isRemote || (!(world instanceof ServerWorld)) || world.restoringBlockSnapshots) return false; // retry next cycle + List drops = Block.getDrops(state, (ServerWorld)world, pos, world.getTileEntity(pos)); + world.removeBlock(pos, false); + for(ItemStack drop:drops) spawnAsEntity(world, pos, drop); + SoundType stype = state.getBlock().getSoundType(state, world, pos, null); + if(stype != null) world.playSound(null, pos, stype.getPlaceSound(), SoundCategory.BLOCKS, stype.getVolume()*0.6f, stype.getPitch()); + return true; + } + + @Override + @SuppressWarnings("deprecation") + public void tick() + { + if(--tick_timer_ > 0) return; + if(world.isRemote) { + BlockState state = world.getBlockState(pos); + if(!state.get(ACTIVE)) { + tick_timer_ = TICK_INTERVAL; + } else { + tick_timer_ = 1; + // not sure if is so cool to do this each tick ... may be simplified/removed again. + SoundEvent sound = SoundEvents.BLOCK_WOOD_HIT; + BlockState target_state = world.getBlockState(pos.offset(state.get(HORIZONTAL_FACING))); + SoundType stype = target_state.getBlock().getSoundType(target_state); + if((stype == SoundType.CLOTH) || (stype == SoundType.PLANT) || (stype == SoundType.SNOW)) { + sound = SoundEvents.BLOCK_WOOL_HIT; + } else if((stype == SoundType.GROUND) || (stype == SoundType.SAND)) { + sound = SoundEvents.BLOCK_GRAVEL_HIT; + } + world.playSound(pos.getX(), pos.getY(), pos.getZ(), sound, SoundCategory.BLOCKS, 0.1f, 1.2f, false); + } + } else { + tick_timer_ = TICK_INTERVAL; + final BlockState device_state = world.getBlockState(pos); + final BlockPos target_pos = pos.offset(device_state.get(HORIZONTAL_FACING)); + final BlockState target_state = world.getBlockState(target_pos); + if((world.isBlockPowered(pos)) || (!isBreakable(target_state, target_pos, world))) { + if(device_state.get(ACTIVE)) world.setBlockState(pos, device_state.with(ACTIVE, false), 1|2); + proc_time_elapsed_ = 0; + tick_timer_ = IDLE_TICK_INTERVAL; + return; + } + proc_time_elapsed_ += TICK_INTERVAL; + boolean active = true; + int time_needed = (int)(target_state.getBlockHardness(world, pos) * breaking_reluctance) + min_breaking_time; + if(boost_energy_ >= boost_energy_consumption) { + boost_energy_ = 0; + proc_time_elapsed_ += TICK_INTERVAL * BOOST_FACTOR; + time_needed += min_breaking_time * (3*BOOST_FACTOR/5); + } + time_needed = MathHelper.clamp(time_needed, min_breaking_time, MAX_BREAKING_TIME); + if(proc_time_elapsed_ >= time_needed) { + proc_time_elapsed_ = 0; + breakBlock(target_state, target_pos, world); + active = false; + } + if(device_state.get(ACTIVE) != active) { + world.setBlockState(pos, device_state.with(ACTIVE, active), 1|2); + } + } + } + } +} diff --git a/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorMineralSmelter.java b/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorMineralSmelter.java index 94433ef..ba0d14d 100644 --- a/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorMineralSmelter.java +++ b/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorMineralSmelter.java @@ -11,7 +11,6 @@ package wile.engineersdecor.blocks; import wile.engineersdecor.ModContent; import wile.engineersdecor.ModEngineersDecor; -//import wile.engineersdecor.detail.ModConfig; import net.minecraft.entity.LivingEntity; import net.minecraft.inventory.ISidedInventory; import net.minecraft.inventory.ItemStackHelper; @@ -40,10 +39,8 @@ import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; -//import net.minecraftforge.fluids.FluidStack; -//import net.minecraftforge.fluids.capability.IFluidHandler; -//import net.minecraftforge.fluids.capability.IFluidTankProperties; -//import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.api.distmarker.Dist; @@ -146,7 +143,7 @@ public class BlockDecorMineralSmelter extends BlockDecorDirectedHorizontal } } } - } else if(stack.getItem() == Items.AIR) { + } else if(stack.isEmpty()) { final ItemStack istack = te.getStackInSlot(1).copy(); if(te.phase() > BTileEntity.PHASE_WARMUP) player.setFire(1); if(!istack.isEmpty()) { @@ -468,46 +465,39 @@ public class BlockDecorMineralSmelter extends BlockDecorDirectedHorizontal // IFluidHandler -------------------------------------------------------------------------------- -// private LazyOptional fluid_handler_ = LazyOptional.of(() -> (IFluidHandler)new BFluidHandler(this)); -// -// // @todo: REPLACE lava=null with whatever will work -// private static class BFluidHandler implements IFluidHandler, IFluidTankProperties -// { -// private final FluidStack lava; -// private final BTileEntity te; -// private final IFluidTankProperties[] props_ = {this}; -// BFluidHandler(BTileEntity te) { -// this.te = te; -// //lava = new FluidStack(ForgeRegistries.FLUIDS.getValue(new ResourceLocation("minecraft:lava")), 1); -// // lava = new FluidStack(Blocks.LAVA.getFluidState(Blocks.LAVA.getDefaultState()).getFluid(), 1); -// // lava = new FluidStack(Fluids.EMPTY, 1); -// //new net.minecraftforge.fluids.FluidStack(net.minecraft.fluid.Fluids.LAVA, 1); -//lava=null; -// } -// @Override @Nullable public FluidStack getContents() { return new FluidStack(lava, te.fluid_level()); } -// @Override public IFluidTankProperties[] getTankProperties() { return props_; } -// @Override public int fill(FluidStack resource, boolean doFill) { return 0; } -// @Override public int getCapacity() { return 1000; } -// @Override public boolean canFill() { return false; } -// @Override public boolean canDrain() { return true; } -// @Override public boolean canFillFluidType(FluidStack fluidStack) { return false; } -// @Override public boolean canDrainFluidType(FluidStack fluidStack) { return fluidStack.isFluidEqual(lava); } -// -// @Override @Nullable public FluidStack drain(FluidStack resource, boolean doDrain) -// { -// if((te.fluid_level() <= 0) || (!resource.isFluidEqual(lava))) return null; -// FluidStack fs = getContents(); -// if(doDrain) te.fluid_level_drain(fs.amount); -// return fs; -// } -// -// @Override @Nullable public FluidStack drain(int maxDrain, boolean doDrain) -// { -// if(te.fluid_level() <= 0) return null; -// maxDrain = (doDrain) ? (te.fluid_level_drain(maxDrain)) : (Math.min(maxDrain, te.fluid_level())); -// return new FluidStack(lava, maxDrain); -// } -// } + private LazyOptional fluid_handler_ = LazyOptional.of(() -> (IFluidHandler)new BFluidHandler(this)); + + private static class BFluidHandler implements IFluidHandler + { + private final FluidStack lava; + private final BTileEntity te; + + BFluidHandler(BTileEntity te) + { this.te = te; lava = new net.minecraftforge.fluids.FluidStack(net.minecraft.fluid.Fluids.LAVA, 1); } + + @Override public int getTanks() { return 1; } + @Override public FluidStack getFluidInTank(int tank) { return new FluidStack(lava, te.fluid_level()); } + @Override public int getTankCapacity(int tank) { return 1000; } + @Override public boolean isFluidValid(int tank, @Nonnull FluidStack stack) { return (tank==0) && (stack.isFluidEqual(lava)); } + @Override public int fill(FluidStack resource, FluidAction action) { return 0; } + + @Override + public FluidStack drain(FluidStack resource, FluidAction action) + { + if(!resource.isFluidEqual(lava) || (te.fluid_level() <= 0)) return FluidStack.EMPTY; + FluidStack stack = new FluidStack(lava, te.fluid_level()); + if(action == FluidAction.EXECUTE) te.fluid_level_drain(te.fluid_level()); + return stack; + } + + @Override + public FluidStack drain(int maxDrain, FluidAction action) + { + if(te.fluid_level() <= 0) return FluidStack.EMPTY; + maxDrain = (action==FluidAction.EXECUTE) ? (te.fluid_level_drain(maxDrain)) : (Math.min(maxDrain, te.fluid_level())); + return new FluidStack(lava, maxDrain); + } + } // IEnergyStorage ---------------------------------------------------------------------------- diff --git a/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorPassiveFluidAccumulator.java b/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorPassiveFluidAccumulator.java index 0e2db31..679bfa3 100644 --- a/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorPassiveFluidAccumulator.java +++ b/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorPassiveFluidAccumulator.java @@ -15,6 +15,7 @@ package wile.engineersdecor.blocks; import wile.engineersdecor.ModContent; import wile.engineersdecor.detail.ModAuxiliaries; +import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.tileentity.TileEntityType; @@ -28,13 +29,12 @@ import net.minecraft.world.World; import net.minecraft.util.Direction; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; -//import net.minecraftforge.common.util.LazyOptional; -//import net.minecraftforge.common.capabilities.ICapabilityProvider; -//import net.minecraftforge.fluids.capability.CapabilityFluidHandler; -//import net.minecraftforge.fluids.capability.IFluidHandler; -//import net.minecraftforge.fluids.capability.IFluidTankProperties; +import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fluids.FluidStack; - +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction; +import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -80,9 +80,8 @@ public class BlockDecorPassiveFluidAccumulator extends BlockDecorDirected { protected static int tick_idle_interval = 20; // ca 1000ms, simulates suction delay and saves CPU when not drained. protected static int max_flowrate = 1000; - //private final IFluidTankProperties[] fluid_props_ = {this}; private Direction block_facing_ = Direction.NORTH; - private FluidStack tank_ = null; + private FluidStack tank_ = FluidStack.EMPTY; private int last_drain_request_amount_ = 0; private int vacuum_ = 0; private int tick_timer_ = 0; @@ -93,33 +92,62 @@ public class BlockDecorPassiveFluidAccumulator extends BlockDecorDirected public void send_device_stats(PlayerEntity player) { - int t_vol = (tank_==null) ? 0 : (tank_.getAmount()); + int t_vol = tank_.getAmount(); ModAuxiliaries.playerChatMessage(player,"" + t_vol + "mB"); } public void block_changed() { initialized_ = false; tick_timer_ = MathHelper.clamp(tick_timer_ , 0, tick_idle_interval); } + // Output flow handler --------------------------------------------------------------------- + + private static class InputFillHandler implements IFluidHandler + { + private final BTileEntity parent_; + InputFillHandler(BTileEntity parent) { parent_ = parent; } + @Override public int getTanks() { return 0; } + @Override public FluidStack getFluidInTank(int tank) { return FluidStack.EMPTY; } + @Override public int getTankCapacity(int tank) { return max_flowrate; } + @Override public boolean isFluidValid(int tank, @Nonnull FluidStack stack) { return true; } + @Override public int fill(FluidStack resource, FluidAction action) { return 0; } + @Override public FluidStack drain(FluidStack resource, FluidAction action) { return FluidStack.EMPTY.copy(); } + @Override public FluidStack drain(int maxDrain, FluidAction action) { return FluidStack.EMPTY.copy(); } + } + + // Input flow handler --------------------------------------------------------------------- + + private static class OutputFlowHandler implements IFluidHandler + { + private final BTileEntity te; + OutputFlowHandler(BTileEntity parent) { te = parent; } + @Override public int getTanks() { return 1; } + @Override public FluidStack getFluidInTank(int tank) { return te.tank_.copy(); } + @Override public int getTankCapacity(int tank) { return max_flowrate; } + @Override public boolean isFluidValid(int tank, @Nonnull FluidStack stack) { return true; } + @Override public int fill(FluidStack resource, FluidAction action) { return 0; } + + @Override public FluidStack drain(FluidStack resource, FluidAction action) + { + if((resource==null) || (te.tank_.isEmpty())) return FluidStack.EMPTY.copy(); + return (!(te.tank_.isFluidEqual(resource))) ? (FluidStack.EMPTY.copy()) : drain(resource.getAmount(), action); + } + + @Override public FluidStack drain(int maxDrain, FluidAction action) + { + if(!te.initialized_) FluidStack.EMPTY.copy(); + if((action==FluidAction.EXECUTE) && (maxDrain > 0)) te.last_drain_request_amount_ = maxDrain; + if(te.tank_.isEmpty()) return FluidStack.EMPTY.copy(); + maxDrain = MathHelper.clamp(maxDrain ,0 , te.tank_.getAmount()); + FluidStack res = te.tank_.copy(); + if(action!=FluidAction.EXECUTE) return res; + res.setAmount(maxDrain); + te.tank_.setAmount(te.tank_.getAmount()-maxDrain); + if(te.tank_.getAmount() <= 0) te.tank_ = FluidStack.EMPTY.copy(); + te.total_volume_drained_ += res.getAmount(); + return res; + } + } -// // Output flow handler --------------------------------------------------------------------- -// -// private static class InputFillHandler implements IFluidHandler, IFluidTankProperties -// { -// private final BTileEntity parent_; -// private final IFluidTankProperties[] props_ = {this}; -// InputFillHandler(BTileEntity parent) { parent_ = parent; } -// @Override public int fill(FluidStack resource, boolean doFill) { return 0; } -// @Override @Nullable public FluidStack drain(FluidStack resource, boolean doDrain) { return null; } -// @Override @Nullable public FluidStack drain(int maxDrain, boolean doDrain) { return null; } -// @Override @Nullable public FluidStack getContents() { return null; } -// @Override public IFluidTankProperties[] getTankProperties() { return props_; } -// @Override public int getCapacity() { return max_flowrate; } -// @Override public boolean canFill() { return true; } -// @Override public boolean canDrain() { return false; } -// @Override public boolean canFillFluidType(FluidStack fluidStack) { return true; } -// @Override public boolean canDrainFluidType(FluidStack fluidStack) { return false; } -// } -// // TileEntity ------------------------------------------------------------------------------ public BTileEntity() @@ -128,143 +156,98 @@ public class BlockDecorPassiveFluidAccumulator extends BlockDecorDirected public BTileEntity(TileEntityType te_type) { super(te_type); } -// @Override -// public void read(CompoundNBT nbt) -// { -// super.read(nbt); -// tank_ = (!nbt.contains("tank")) ? (null) : (FluidStack.loadFluidStackFromNBT(nbt.getCompound("tank"))); -// } -// -// @Override -// public CompoundNBT write(CompoundNBT nbt) -// { -// super.write(nbt); -// if(tank_ != null) nbt.put("tank", tank_.writeToNBT(new CompoundNBT())); -// return nbt; -// } -// -// // ICapabilityProvider -------------------------------------------------------------------- -// -// private final LazyOptional fluid_handler_ = LazyOptional.of(() -> (IFluidHandler)this); -// private final LazyOptional fill_handler_ = LazyOptional.of(() -> new InputFillHandler(this)); -// -// @Override -// public LazyOptional getCapability(net.minecraftforge.common.capabilities.Capability capability, @Nullable Direction facing) -// { -// if((initialized_) && (!this.removed) && (facing != null)) { -// if(capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { -// if(facing == block_facing_) return fluid_handler_.cast(); -// return fill_handler_.cast(); -// } -// } -// return super.getCapability(capability, facing); -// } -// -// // IFluidHandler of the output port -------------------------------------------------------- -// -// @Override -// public IFluidTankProperties[] getTankProperties() -// { return fluid_props_; } -// -// @Override -// public int fill(FluidStack resource, boolean doFill) -// { return 0; } -// -// @Override -// @Nullable -// public FluidStack drain(FluidStack resource, boolean doDrain) -// { -// if((resource==null) || (tank_==null)) return null; -// return (!(tank_.isFluidEqual(resource))) ? (null) : drain(resource.amount, doDrain); -// } -// -// @Override -// @Nullable -// public FluidStack drain(int maxDrain, boolean doDrain) -// { -// if(!initialized_) return null; -// if(doDrain && (maxDrain > 0)) last_drain_request_amount_ = maxDrain; -// if(tank_==null) return null; -// maxDrain = MathHelper.clamp(maxDrain ,0 , tank_.amount); -// if(!doDrain) return tank_.copy(); -// FluidStack res = tank_.copy(); -// res.amount = maxDrain; -// tank_.amount -= maxDrain; -// if(tank_.amount <= 0) tank_= null; -// total_volume_drained_ += res.amount; -// return res; -// } -// -// // IFluidTankProperties -------------------------------------------------------------------- -// -// @Override @Nullable public FluidStack getContents() { return (tank_==null) ? (null) : (tank_.copy()); } -// @Override public int getCapacity() { return max_flowrate; } -// @Override public boolean canFill() { return false; } -// @Override public boolean canDrain() { return true; } -// @Override public boolean canFillFluidType(FluidStack fluidStack) { return false; } -// @Override public boolean canDrainFluidType(FluidStack fluidStack) { return true; } -// -// // ITickable-------------------------------------------------------------------------------- -// -// public void tick() -// { -// if((world.isRemote) || (--tick_timer_ > 0)) return; -// tick_timer_ = tick_idle_interval; -// if(!initialized_) { -// initialized_ = true; -// BlockState state = world.getBlockState(pos); -// if((state==null) || (!(state.getBlock() instanceof BlockDecorPassiveFluidAccumulator))) return; -// block_facing_ = state.get(FACING); -// } -// int n_requested = last_drain_request_amount_; -// last_drain_request_amount_ = 0; -// if(n_requested > 0) { -// vacuum_ += 2; -// if(vacuum_ > 5) vacuum_ = 5; -// } else { -// if((--vacuum_) <= 0) { -// vacuum_ = 0; -// if(tank_!=null) { -// return; // nothing to do, noone's draining. -// } else { -// n_requested = 10; // drip in -// } -// } -// } -// boolean has_refilled = false; -// n_requested += (vacuum_ * 50); -// int tank_buffer_needed = n_requested; -// if(tank_buffer_needed > max_flowrate) tank_buffer_needed = max_flowrate; -// for(int i=0; i<6; ++i) { -// if(++round_robin_ > 5) round_robin_ = 0; -// if(n_requested <= 0) break; -// if(((tank_!=null) && (tank_.amount >= tank_buffer_needed))) break; -// final Direction f = Direction.byIndex(round_robin_); -// if(f == block_facing_) continue; -// final TileEntity te = world.getTileEntity(pos.offset(f)); -// if((te==null) || (te instanceof BTileEntity)) continue; -// final IFluidHandler fh = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, f.getOpposite()).orElse(null); -// if(fh==null) continue; -// if(tank_==null) { -// FluidStack res = fh.drain(n_requested, true); -// if((res == null) || (res.amount==0)) continue; -// total_volume_filled_ += res.amount; -// tank_ = res.copy(); -// has_refilled = true; -// } else { -// if((tank_.amount + n_requested) > max_flowrate) n_requested = (max_flowrate - tank_.amount); -// FluidStack rq = tank_.copy(); -// rq.amount = n_requested; -// FluidStack res = fh.drain(rq, true); -// if(res == null) continue; -// tank_.amount += res.amount; -// total_volume_filled_ += res.amount; -// has_refilled = true; -// if(tank_.amount >= max_flowrate) break; -// } -// } -// if(has_refilled) tick_timer_ = 0; -// } + @Override + public void read(CompoundNBT nbt) + { + super.read(nbt); + tank_ = (!nbt.contains("tank")) ? (FluidStack.EMPTY.copy()) : (FluidStack.loadFluidStackFromNBT(nbt.getCompound("tank"))); + } + @Override + public CompoundNBT write(CompoundNBT nbt) + { + super.write(nbt); + if(!tank_.isEmpty()) nbt.put("tank", tank_.writeToNBT(new CompoundNBT())); + return nbt; + } + + // ICapabilityProvider -------------------------------------------------------------------- + + private final LazyOptional fluid_handler_ = LazyOptional.of(() -> new OutputFlowHandler(this)); + private final LazyOptional fill_handler_ = LazyOptional.of(() -> new InputFillHandler(this)); + + @Override + public LazyOptional getCapability(net.minecraftforge.common.capabilities.Capability capability, @Nullable Direction facing) + { + if((initialized_) && (!this.removed) && (facing != null)) { + if(capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { + if(facing == block_facing_) return fluid_handler_.cast(); + return fill_handler_.cast(); + } + } + return super.getCapability(capability, facing); + } + + // ITickable-------------------------------------------------------------------------------- + + public void tick() + { + if((world.isRemote) || (--tick_timer_ > 0)) return; + tick_timer_ = tick_idle_interval; + if(!initialized_) { + initialized_ = true; + BlockState state = world.getBlockState(pos); + if((state==null) || (!(state.getBlock() instanceof BlockDecorPassiveFluidAccumulator))) return; + block_facing_ = state.get(FACING); + } + int n_requested = last_drain_request_amount_; + last_drain_request_amount_ = 0; + if(n_requested > 0) { + vacuum_ += 2; + if(vacuum_ > 5) vacuum_ = 5; + } else { + if((--vacuum_) <= 0) { + vacuum_ = 0; + if(!tank_.isEmpty()) { + return; // nothing to do, noone's draining. + } else { + n_requested = 10; // drip in + } + } + } + boolean has_refilled = false; + n_requested += (vacuum_ * 50); + int tank_buffer_needed = n_requested; + if(tank_buffer_needed > max_flowrate) tank_buffer_needed = max_flowrate; + for(int i=0; i<6; ++i) { + if(++round_robin_ > 5) round_robin_ = 0; + if(n_requested <= 0) break; + if((tank_.getAmount() >= tank_buffer_needed)) break; + final Direction f = Direction.byIndex(round_robin_); + if(f == block_facing_) continue; + final TileEntity te = world.getTileEntity(pos.offset(f)); + if((te==null) || (te instanceof BTileEntity)) continue; + final IFluidHandler fh = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, f.getOpposite()).orElse(null); + if(fh==null) continue; + if(tank_.isEmpty()) { + FluidStack res = fh.drain(n_requested, FluidAction.EXECUTE).copy(); + if(res.getAmount()==0) continue; + total_volume_filled_ += res.getAmount(); + tank_ = res.copy(); + has_refilled = true; + } else { + if((tank_.getAmount() + n_requested) > max_flowrate) n_requested = (max_flowrate - tank_.getAmount()); + FluidStack rq = tank_.copy(); + rq.setAmount(n_requested); + FluidStack res = fh.drain(rq, FluidAction.EXECUTE); + if(res.isEmpty()) continue; + tank_.setAmount(tank_.getAmount()+res.getAmount()); + total_volume_filled_ += res.getAmount(); + has_refilled = true; + if(tank_.getAmount() >= max_flowrate) break; + } + } + if(has_refilled) tick_timer_ = 0; + } } } diff --git a/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorPipeValve.java b/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorPipeValve.java index b751872..8be54d9 100644 --- a/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorPipeValve.java +++ b/1.14/src/main/java/wile/engineersdecor/blocks/BlockDecorPipeValve.java @@ -9,9 +9,10 @@ */ package wile.engineersdecor.blocks; -import net.minecraft.block.IWaterLoggable; import wile.engineersdecor.ModContent; import wile.engineersdecor.ModEngineersDecor; +import net.minecraft.block.IWaterLoggable; +import net.minecraft.nbt.CompoundNBT; import net.minecraft.state.BooleanProperty; import net.minecraft.world.IWorld; import net.minecraft.item.BlockItemUseContext; @@ -28,12 +29,12 @@ import net.minecraft.util.math.MathHelper; import net.minecraft.util.Direction; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; -//import net.minecraftforge.common.util.LazyOptional; -//import net.minecraftforge.common.capabilities.ICapabilityProvider; -//import net.minecraftforge.fluids.capability.CapabilityFluidHandler; -//import net.minecraftforge.fluids.capability.IFluidHandler; -//import net.minecraftforge.fluids.capability.IFluidTankProperties; -//import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.common.capabilities.ICapabilityProvider; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -141,7 +142,7 @@ public class BlockDecorPipeValve extends BlockDecorDirected implements IWaterLog // Tile entity //-------------------------------------------------------------------------------------------------------------------- - public static class BTileEntity extends TileEntity // implements IFluidHandler, IFluidTankProperties, ICapabilityProvider, IFluidPipe + public static class BTileEntity extends TileEntity implements ICapabilityProvider //, IFluidPipe { protected static int fluid_maxflow_mb = 1000; protected static int redstone_flow_slope_mb = 1000/15; @@ -178,164 +179,132 @@ public class BlockDecorPipeValve extends BlockDecorDirected implements IWaterLog } // TileEntity ------------------------------------------------------------------------------ -// -// @Override -// public void onLoad() -// { -// if(!hasWorld()) return; -// final BlockState state = world.getBlockState(pos); -// if((!(state.getBlock() instanceof BlockDecorPipeValve))) return; -// block_reconfigure(state.get(FACING), block_config_); -// world.notifyNeighborsOfStateChange(pos, state.getBlock()); -// } -// -// @Override -// public void read(CompoundNBT nbt) -// { -// super.read(nbt); -// int i = nbt.getInt("facing"); -// if((i>=0) || (i<6)) block_facing_ = Direction.byIndex(i); -// block_config_ = nbt.getLong("conf"); -// } -// -// @Override -// public CompoundNBT write(CompoundNBT nbt) -// { -// super.write(nbt); -// nbt.putInt("facing", block_facing_.getIndex()); -// nbt.putLong("conf", block_config_); -// return nbt; -// } -// -// // ICapabilityProvider -------------------------------------------------------------------- -// -// private static final BackFlowHandler back_flow_handler_singleton_ = new BackFlowHandler(); -// private LazyOptional back_flow_handler_ = LazyOptional.of(() -> (IFluidHandler)back_flow_handler_singleton_); -// private LazyOptional fluid_handler_ = LazyOptional.of(() -> (IFluidHandler)this); -// -// @Override -// public LazyOptional getCapability(net.minecraftforge.common.capabilities.Capability capability, @Nullable Direction facing) -// { -// if(!this.removed && (facing != null)) { -// if(capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { -// if(facing == block_facing_) return fluid_handler_.cast(); -// if(facing == block_facing_.getOpposite()) return back_flow_handler_.cast(); -// } -// } -// return super.getCapability(capability, facing); -// } -// -// // IFluidHandler/IFluidTankProperties --------------------------------------------------------------- -// -// @Nullable -// private IFluidHandler forward_fluid_handler() -// { -// final TileEntity te = world.getTileEntity(pos.offset(block_facing_)); -// if(te == null) return null; -// return te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, block_facing_.getOpposite()).orElse(null); -// } -// -// @Override -// public int fill(FluidStack resource, boolean doFill) -// { -// if((filling_) || (!filling_enabled_)) return 0; -// if((block_config_ & CFG_REDSTONE_CONTROLLED) != 0) { -// int rs = world.getRedstonePowerFromNeighbors(pos); -// if(rs <= 0) return 0; -// if(((block_config_ & CFG_ANALOG) != 0) && (rs < 15)) resource.amount = MathHelper.clamp(rs * redstone_flow_slope_mb, 1, resource.amount); -// } -// FluidStack res = resource.copy(); -// if(res.amount > fluid_maxflow_mb) res.amount = fluid_maxflow_mb; -// final IFluidHandler fh = forward_fluid_handler(); -// if(fh==null) return 0; -// filling_ = true; // in case someone does not check the cap, but just "forwards back" what is beeing filled right now. -// if(res.amount > 50) { -// final TileEntity te = world.getTileEntity(pos.offset(block_facing_)); -// if(te instanceof IFluidPipe) { -// // forward pressureized tag -// if(res.tag == null) res.tag = new CompoundNBT(); -// res.tag.putBoolean("pressurized", true); -// } -// } -// int n_filled = forward_fluid_handler().fill(res, doFill); -// filling_ = false; -// return n_filled; -// } -// -// @Override -// @Nullable -// public FluidStack drain(FluidStack resource, boolean doDrain) -// { return null; } -// -// @Override -// @Nullable -// public FluidStack drain(int maxDrain, boolean doDrain) -// { return null; } -// -// @Override -// public IFluidTankProperties[] getTankProperties() -// { return fluid_props_; } -// -// // IFluidTankProperties -- -// -// @Override -// @Nullable -// public FluidStack getContents() -// { return null; } -// -// public int getCapacity() -// { return 1000; } -// -// @Override -// public boolean canFill() -// { return true; } -// -// @Override -// public boolean canDrain() -// { return false; } -// -// @Override -// public boolean canFillFluidType(FluidStack fluidStack) -// { return true; } -// -// @Override -// public boolean canDrainFluidType(FluidStack fluidStack) -// { return false; } -// -// // Back flow prevention handler -- -// -// private static class BackFlowHandler implements IFluidHandler, IFluidTankProperties -// { -// private final IFluidTankProperties[] props_ = {this}; -// @Override public IFluidTankProperties[] getTankProperties() { return props_; } -// @Override public int fill(FluidStack resource, boolean doFill) { return 0; } -// @Override @Nullable public FluidStack drain(FluidStack resource, boolean doDrain) { return null; } -// @Override @Nullable public FluidStack drain(int maxDrain, boolean doDrain) { return null; } -// @Override @Nullable public FluidStack getContents() { return null; } -// @Override public int getCapacity() { return 0; } -// @Override public boolean canFill() { return false; } -// @Override public boolean canDrain() { return false; } -// @Override public boolean canFillFluidType(FluidStack fluidStack) { return false; } -// @Override public boolean canDrainFluidType(FluidStack fluidStack) { return false; } -// } -// -// // IFluidPipe -// -// @Override -// public boolean hasOutputConnection(Direction side) -// { return (side == block_facing_); } -// -// @Override -// public boolean canOutputPressurized(boolean consumePower) -// { -// if(getlocked_ || (!filling_enabled_)) return false; -// final TileEntity te = world.getTileEntity(pos.offset(block_facing_)); -// if(!(te instanceof IFluidPipe)) return false; -// getlocked_ = true; // not sure if IE explicitly pre-detects loops, so let's lock recurion here, too. -// boolean r = ((IFluidPipe)te).canOutputPressurized(consumePower); -// getlocked_ = false; -// return r; -// } + + @Override + public void onLoad() + { + if(!hasWorld()) return; + final BlockState state = world.getBlockState(pos); + if((!(state.getBlock() instanceof BlockDecorPipeValve))) return; + block_reconfigure(state.get(FACING), block_config_); + world.notifyNeighborsOfStateChange(pos, state.getBlock()); + } + + @Override + public void read(CompoundNBT nbt) + { + super.read(nbt); + int i = nbt.getInt("facing"); + if((i>=0) || (i<6)) block_facing_ = Direction.byIndex(i); + block_config_ = nbt.getLong("conf"); + } + + @Override + public CompoundNBT write(CompoundNBT nbt) + { + super.write(nbt); + nbt.putInt("facing", block_facing_.getIndex()); + nbt.putLong("conf", block_config_); + return nbt; + } + + // ICapabilityProvider -------------------------------------------------------------------- + + private LazyOptional back_flow_handler_ = LazyOptional.of(() -> (IFluidHandler)new BackFlowHandler()); + private LazyOptional fluid_handler_ = LazyOptional.of(() -> (IFluidHandler)new MainFlowHandler(this)); + + @Override + public LazyOptional getCapability(net.minecraftforge.common.capabilities.Capability capability, @Nullable Direction facing) + { + if(!this.removed && (facing != null)) { + if(capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { + if(facing == block_facing_) return fluid_handler_.cast(); + if(facing == block_facing_.getOpposite()) return back_flow_handler_.cast(); + } + } + return super.getCapability(capability, facing); + } + + // IFluidHandlers + + @Nullable + private IFluidHandler forward_fluid_handler() + { + final TileEntity te = world.getTileEntity(pos.offset(block_facing_)); + if(te == null) return null; + return te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, block_facing_.getOpposite()).orElse(null); + } + + // Forward flow handler -- + + private static class MainFlowHandler implements IFluidHandler + { + private BTileEntity te; + public MainFlowHandler(BTileEntity te) { this.te = te; } + @Override public int getTanks() { return 0; } + @Override public FluidStack getFluidInTank(int tank) { return FluidStack.EMPTY; } + @Override public int getTankCapacity(int tank) { return fluid_maxflow_mb; } + @Override public FluidStack drain(FluidStack resource, FluidAction action) { return FluidStack.EMPTY.copy(); } + @Override public FluidStack drain(int maxDrain, FluidAction action) { return FluidStack.EMPTY.copy(); } + @Override public boolean isFluidValid(int tank, @Nonnull FluidStack stack) { return true; } + + @Override public int fill(FluidStack resource, FluidAction action) + { + if((te.filling_) || (!te.filling_enabled_)) return 0; + if((te.block_config_ & CFG_REDSTONE_CONTROLLED) != 0) { + int rs = te.world.getRedstonePowerFromNeighbors(te.pos); + if(rs <= 0) return 0; + if(((te.block_config_ & CFG_ANALOG) != 0) && (rs < 15)) resource.setAmount(MathHelper.clamp(rs * redstone_flow_slope_mb, 1, resource.getAmount())); + } + FluidStack res = resource.copy(); + if(res.getAmount() > fluid_maxflow_mb) res.setAmount(fluid_maxflow_mb); + final IFluidHandler fh = te.forward_fluid_handler(); + if(fh==null) return 0; + te.filling_ = true; // in case someone does not check the cap, but just "forwards back" what is beeing filled right now. + //if(res.amount > 50) { + //final TileEntity te = te.world.getTileEntity(te.pos.offset(te.block_facing_)); + //if(te instanceof IFluidPipe) { + // // forward pressureized tag + // if(res.tag == null) res.tag = new CompoundNBT(); + // res.tag.putBoolean("pressurized", true); + //} + //} + int n_filled = fh.fill(res, action); + te.filling_ = false; + return n_filled; + } + } + + // Back flow prevention handler -- + + private static class BackFlowHandler implements IFluidHandler + { + @Override public int getTanks() { return 0; } + @Override public FluidStack getFluidInTank(int tank) { return FluidStack.EMPTY; } + @Override public int getTankCapacity(int tank) { return 0; } + @Override public boolean isFluidValid(int tank, @Nonnull FluidStack stack) { return false; } + @Override public int fill(FluidStack resource, FluidAction action) { return 0; } + @Override public FluidStack drain(FluidStack resource, FluidAction action) { return FluidStack.EMPTY.copy(); } + @Override public FluidStack drain(int maxDrain, FluidAction action) { return FluidStack.EMPTY.copy(); } + } + + // IFluidPipe + + // @Override + // public boolean hasOutputConnection(Direction side) + // { return (side == block_facing_); } + // + // @Override + // public boolean canOutputPressurized(boolean consumePower) + // { + // if(getlocked_ || (!filling_enabled_)) return false; + // final TileEntity te = world.getTileEntity(pos.offset(block_facing_)); + // if(!(te instanceof IFluidPipe)) return false; + // getlocked_ = true; // not sure if IE explicitly pre-detects loops, so let's lock recurion here, too. + // boolean r = ((IFluidPipe)te).canOutputPressurized(consumePower); + // getlocked_ = false; + // return r; + // } } } diff --git a/1.14/src/main/java/wile/engineersdecor/detail/ModConfig.java b/1.14/src/main/java/wile/engineersdecor/detail/ModConfig.java index 765df19..fbe48cd 100644 --- a/1.14/src/main/java/wile/engineersdecor/detail/ModConfig.java +++ b/1.14/src/main/java/wile/engineersdecor/detail/ModConfig.java @@ -110,6 +110,7 @@ public class ModConfig public final ForgeConfigSpec.BooleanValue without_sign_plates; public final ForgeConfigSpec.BooleanValue without_factory_dropper; public final ForgeConfigSpec.BooleanValue without_factory_placer; + public final ForgeConfigSpec.BooleanValue without_factory_breaker; public final ForgeConfigSpec.BooleanValue without_slabs; public final ForgeConfigSpec.BooleanValue without_halfslabs; public final ForgeConfigSpec.BooleanValue without_direct_slab_pickup; @@ -252,6 +253,10 @@ public class ModConfig .translation(ModEngineersDecor.MODID + ".config.without_factory_placer") .comment("Disable the factory placer.") .define("without_factory_placer", false); + without_factory_breaker = builder + .translation(ModEngineersDecor.MODID + ".config.without_factory_breaker") + .comment("Disable the small block breaker.") + .define("without_factory_breaker", false); without_slabs = builder .translation(ModEngineersDecor.MODID + ".config.without_slabs") .comment("Disable horizontal half-block slab.") @@ -425,6 +430,7 @@ public class ModConfig if(block instanceof BlockDecorWasteIncinerator) return COMMON.without_waste_incinerator.get(); if(block instanceof BlockDecorDropper) return COMMON.without_factory_dropper.get(); if(block instanceof BlockDecorPlacer) return COMMON.without_factory_placer.get(); + if(block instanceof BlockDecorBreaker) return COMMON.without_factory_breaker.get(); if(block instanceof BlockDecorHalfSlab) return COMMON.without_halfslabs.get(); if(block instanceof BlockDecorLadder) return COMMON.without_ladders.get(); if(block instanceof BlockDecorWindow) return COMMON.without_windows.get(); diff --git a/1.14/src/main/resources/assets/engineersdecor/blockstates/small_block_breaker.json b/1.14/src/main/resources/assets/engineersdecor/blockstates/small_block_breaker.json new file mode 100644 index 0000000..92a61b4 --- /dev/null +++ b/1.14/src/main/resources/assets/engineersdecor/blockstates/small_block_breaker.json @@ -0,0 +1,10 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:block/device/small_block_breaker_model" + }, + "variants": { + "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90} }, + "active": { "true":{ "model": "engineersdecor:block/device/small_block_breaker_model_active" }, "false":{}} + } +} diff --git a/1.14/src/main/resources/assets/engineersdecor/lang/en_us.json b/1.14/src/main/resources/assets/engineersdecor/lang/en_us.json index bfada25..d471d25 100644 --- a/1.14/src/main/resources/assets/engineersdecor/lang/en_us.json +++ b/1.14/src/main/resources/assets/engineersdecor/lang/en_us.json @@ -156,13 +156,15 @@ "block.engineersdecor.passive_fluid_accumulator": "Passive Fluid Accumulator", "block.engineersdecor.passive_fluid_accumulator.help": "§6Vacuum suction based fluid collector.§r Has one output, all other sides are input. Drains fluids from adjacent tanks when being drained from the output port by a pump.", "block.engineersdecor.factory_dropper": "Factory Dropper", - "block.engineersdecor.factory_dropper.help": "§6Dropper suitable for advanced factory automation.§r Has twelve round-robin selected slots. Drop force, angle, stack size, and cool-down delay adjustable in the GUI. Three stack compare slots with logical AND or OR can be used as internal trigger source. Internal trigger can be AND'ed or OR'ed with the external redstone signal trigger. Trigger simulation buttons for testing. Pre-opens shutter door when internal trigger conditions are met. Drops all matching stacks simultaneously. Click on all elements in the GUI to see how it works.", + "block.engineersdecor.factory_dropper.help": "§6Dropper suitable for advanced factory automation.§r Has twelve round-robin selected slots. Drop force, angle, stack size, and cool-down delay adjustable using sliders in the GUI. Three stack compare slots (below the inventory slots) with logical AND or OR can be used as internal trigger source. The internal trigger can be AND'ed or OR'ed with the external redstone signal trigger. Trigger simulation buttons for testing. Pre-opens shutter door when internal trigger conditions are met. Drops all matching stacks simultaneously. Simply click on all elements in the GUI to see how it works.", "block.engineersdecor.factory_hopper": "Factory Hopper", "block.engineersdecor.factory_hopper.help": "§6Hopper suitable for advanced factory automation.§r Can transfer half-stacks, max collection range 9x9.\n GUI Slider controls: Collection range (0 to 4), insertion delay (0.5s to 10s), insertion stack size (1 to 32).\\n GUI Redstone controls: Not inverted / inverted (default), pulse mode / continuous mode (default).", "block.engineersdecor.factory_placer": "Factory Block Placer", "block.engineersdecor.factory_placer.help": "§6Allows placing blocks and planting crops or trees.§r\n GUI Redstone controls: Not inverted / inverted (default), pulse mode / continuous mode (default).\\n Also supports spike planing from underneath the soil. Spits out items that it cannot place or plant.", + "block.engineersdecor.small_block_breaker": "Small Block Breaker", + "block.engineersdecor.small_block_breaker.help": "§6Breaks blocks in front of it.§r\n Can be disabled by applying a redstone signal. The time needed to destroy a block depends on the hardness of that block. Provide RF/FE power to speed up the breaking process (massively).", "block.engineersdecor.small_mineral_smelter": "Small Mineral Melting Furnace", - "block.engineersdecor.small_mineral_smelter.help": "§6High temperature, high insulation electrical stone melting furnace.§r\n Heats up mineral blocks to magma blocks, and finally to lava. Due to the miniturized device size the process is rather inefficient - much time and energy is needed to liquefy a stone block.", + "block.engineersdecor.small_mineral_smelter.help": "§6High temperature, high insulation electrical stone melting furnace.§r\n Heats up mineral blocks to magma blocks, and finally to lava. Click with a mineral block (stone, cobble, etc) or use item insertion to place a block in the melter. Use bucket or fluid extraction to retrieve the lava. When cooling down lava, obsidian is generated. Remove the RF power or apply a redstone signal to disable the furnace. For automation, use a redstone comparator to see in which melting phase the mineral is a moment.", "block.engineersdecor.small_solar_panel": "Small Solar Panel", "block.engineersdecor.small_solar_panel.help": "§6Produces a small amount of power when exposed to sunlight.§r\n Useful for charging LF capacitors in remote systems with low consumption. The internal charge pump circuit accumulates and frequently transfers RF. Production depends on day time and the weather.", "block.engineersdecor.small_tree_cutter": "Small Tree Cutter", diff --git a/1.14/src/main/resources/assets/engineersdecor/lang/ru_ru.json b/1.14/src/main/resources/assets/engineersdecor/lang/ru_ru.json index 5a4c147..d416314 100644 --- a/1.14/src/main/resources/assets/engineersdecor/lang/ru_ru.json +++ b/1.14/src/main/resources/assets/engineersdecor/lang/ru_ru.json @@ -155,6 +155,7 @@ "block.engineersdecor.factory_dropper.help": "§6Выбрасыватель подходит для продвинутой автоматизации производства.§r Имеет 12 выборочных слотов. Сила броска, угол, размер стопки и задержка настраиваются в GUI. 3 слота сравнения стека с логическим И или ИЛИ могут использоваться в качестве внутреннего источника запуска. Внутренний триггер может быть И или ИЛИ с внешним триггерным сигналом красного камня. Триггерные кнопки симуляции для тестирования. Предварительно открывает дверцу затвора, когда выполняются условия внутреннего запуска. Сбрасывает все соответствующие стеки одновременно. Нажмите на все элементы в GUI, чтобы увидеть, как это работает.", "block.engineersdecor.factory_hopper": "Factory Hopper", "block.engineersdecor.factory_placer": "Factory Block Placer", + "block.engineersdecor.small_block_breaker": "Factory Block Breaker", "block.engineersdecor.small_mineral_smelter": "Small Mineral Melting Furnace", "block.engineersdecor.small_solar_panel": "Small Solar Panel", "block.engineersdecor.small_tree_cutter": "Small Tree Cutter", diff --git a/1.14/src/main/resources/assets/engineersdecor/lang/zh_cn.json b/1.14/src/main/resources/assets/engineersdecor/lang/zh_cn.json index 3c34032..857a08b 100644 --- a/1.14/src/main/resources/assets/engineersdecor/lang/zh_cn.json +++ b/1.14/src/main/resources/assets/engineersdecor/lang/zh_cn.json @@ -158,6 +158,7 @@ "block.engineersdecor.factory_dropper.help": "§6适用于高级工厂自动化的掉落器。§r有十二个轮询选择的储物格。 掉落的力度、角度、一叠数量和冷却延时可在GUI调节。三个 内部比较槽带有逻辑与或逻辑或功能,可用作内部触发源。内部触发 还能和外部红石信号触发再进行逻辑与或逻辑或。触发模拟按钮仅作测试用途。 当内部触发条件满足时,预先打开卷帘门。所有符合条件的物品 会同时掉落。点击GUI的各处来了解如何运作。", "block.engineersdecor.factory_hopper": "Factory Hopper", "block.engineersdecor.factory_placer": "Factory Block Placer", + "block.engineersdecor.small_block_breaker": "Factory Block Breaker", "block.engineersdecor.small_mineral_smelter": "小型矿物熔炼炉", "block.engineersdecor.small_mineral_smelter.help": "§6高温、高绝缘电熔石炉。§r\n 把矿物块加热成岩浆块,最后变成熔岩。由于 小型化的设备大小,该过程效率不高,需要大量时间和能源 来液化一块石头。", "block.engineersdecor.small_solar_panel": "小型太阳能板", diff --git a/1.14/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model.json b/1.14/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model.json new file mode 100644 index 0000000..d7cf5f5 --- /dev/null +++ b/1.14/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model.json @@ -0,0 +1,383 @@ +{ + "parent": "block/cube", + "textures": { + "t": "engineersdecor:block/device/small_block_breaker_top", + "b": "engineersdecor:block/device/small_block_breaker_bottom", + "l": "engineersdecor:block/device/small_block_breaker_left", + "particle": "engineersdecor:block/device/small_block_breaker_left", + "k": "engineersdecor:block/device/small_block_breaker_back", + "r": "engineersdecor:block/device/small_block_breaker_right", + "f": "engineersdecor:block/device/small_block_breaker_front", + "sh": "engineersdecor:block/device/small_block_breaker_shaft" + }, + "elements": [ + { + "from": [0, 0, 4], + "to": [1, 12, 16], + "faces": { + "north": {"uv": [15, 4, 16, 16], "texture": "#f"}, + "east": {"uv": [4, 0, 16, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [0, 4, 1, 16], "texture": "#k"}, + "west": {"uv": [4, 4, 16, 16], "texture": "#l"}, + "up": {"uv": [0, 4, 1, 16], "texture": "#t"}, + "down": {"uv": [0, 0, 1, 12], "texture": "#b"} + } + }, + { + "from": [15, 0, 4], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [23, 8, 8]}, + "faces": { + "north": {"uv": [0, 4, 1, 16], "texture": "#f"}, + "east": {"uv": [0, 4, 12, 16], "texture": "#r"}, + "south": {"uv": [15, 4, 16, 16], "texture": "#k"}, + "west": {"uv": [0, 0, 12, 12], "texture": "#l"}, + "up": {"uv": [15, 4, 16, 16], "texture": "#t"}, + "down": {"uv": [15, 0, 16, 12], "texture": "#b"} + } + }, + { + "from": [7.5, 4, 6], + "to": [8.5, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [15.5, 12, -5]}, + "faces": { + "north": {"uv": [7, 4, 8, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 11, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [7.5, 4, 8.5, 12], "texture": "#t"}, + "west": {"uv": [5, 4, 7, 12], "texture": "#f"}, + "up": {"uv": [12, 7, 13, 9], "texture": "#t"}, + "down": {"uv": [7.5, 9, 8.5, 11], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [8.5, 4, 6], + "to": [9, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [16.5, 12, -5]}, + "faces": { + "north": {"uv": [7, 4, 7.5, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 10, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [8.5, 4, 9, 12], "texture": "#t"}, + "west": {"uv": [6, 4, 7, 12], "texture": "#l"}, + "up": {"uv": [8.5, 7, 9, 8], "texture": "#t"}, + "down": {"uv": [8.5, 9, 9, 10], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [7, 4, 6], + "to": [7.5, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 12, -5]}, + "faces": { + "north": {"uv": [8.5, 4, 9, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 10, 12], "rotation": 180, "texture": "#l"}, + "south": {"uv": [7, 4, 7.5, 12], "texture": "#t"}, + "west": {"uv": [6, 4, 7, 12], "texture": "#f"}, + "up": {"uv": [7.5, 7, 8.5, 8], "texture": "#t"}, + "down": {"uv": [7, 9, 7.5, 10], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [15, 0, 0], + "to": [16, 5, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [23, -2, 8]}, + "faces": { + "north": {"uv": [0, 11, 1, 16], "texture": "#f"}, + "east": {"uv": [12, 11, 16, 16], "texture": "#r"}, + "south": {"uv": [15, 11, 16, 16], "texture": "#t"}, + "west": {"uv": [0, 11, 4, 16], "texture": "#l"}, + "up": {"uv": [15, 0, 16, 4], "texture": "#t"}, + "down": {"uv": [15, 12, 16, 16], "texture": "#b"} + } + }, + { + "from": [0, 0, 0], + "to": [1, 5, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [8, -2, 8]}, + "faces": { + "north": {"uv": [15, 11, 16, 16], "texture": "#f"}, + "east": {"uv": [12, 11, 16, 16], "texture": "#l"}, + "south": {"uv": [0, 11, 1, 16], "texture": "#t"}, + "west": {"uv": [0, 11, 4, 16], "texture": "#l"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#t"}, + "down": {"uv": [0, 12, 1, 16], "texture": "#b"} + } + }, + { + "from": [1, 0, 0], + "to": [15, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 24]}, + "faces": { + "north": {"uv": [1, 12, 15, 16], "texture": "#f"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#l"}, + "south": {"uv": [1, 12, 15, 16], "texture": "#k"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#l"}, + "up": {"uv": [1, 0, 15, 16], "texture": "#t"}, + "down": {"uv": [1, 0, 15, 16], "texture": "#b"} + } + }, + { + "from": [1, 4, 7], + "to": [15, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 24]}, + "faces": { + "north": {"uv": [1, 4, 15, 12], "texture": "#f"}, + "east": {"uv": [0, 4, 9, 12], "texture": "#l"}, + "south": {"uv": [1, 4, 15, 12], "texture": "#k"}, + "west": {"uv": [7, 4, 16, 12], "texture": "#l"}, + "up": {"uv": [1, 7, 15, 16], "texture": "#t"}, + "down": {"uv": [1, 0, 15, 9], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [4, 9.5, 5], + "to": [5, 10.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 2.5, 12.5]}, + "faces": { + "north": {"uv": [11, 5.5, 12, 6.5], "texture": "#sh"}, + "east": {"uv": [9.5, 5.5, 11, 6.5], "texture": "#sh"}, + "south": {"uv": [4, 5.5, 5, 6.5], "texture": "#sh"}, + "west": {"uv": [5, 5.5, 6.5, 6.5], "texture": "#sh"}, + "up": {"uv": [4, 5, 5, 6.5], "texture": "#sh"}, + "down": {"uv": [4, 9.5, 5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 6, 6.5], + "to": [6.5, 10, 7.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12.5, 1, 13.5]}, + "faces": { + "north": {"uv": [12, 12, 16, 16], "texture": "#sh"}, + "east": {"uv": [15.5, 6, 16, 10], "texture": "#sh"}, + "south": {"uv": [2.5, 6, 6.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 6, 0.5, 10], "texture": "#sh"}, + "up": {"uv": [2, 6, 6, 7], "texture": "#sh"}, + "down": {"uv": [2.5, 15.5, 6.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 9, 5], + "to": [3.5, 10, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10.5, 2, 12.5]}, + "faces": { + "north": {"uv": [12, 6, 13, 7], "texture": "#sh"}, + "east": {"uv": [9.5, 6, 11, 7], "texture": "#sh"}, + "south": {"uv": [2.5, 6, 3.5, 7], "texture": "#sh"}, + "west": {"uv": [5, 6, 6.5, 7], "texture": "#sh"}, + "up": {"uv": [2, 5, 3, 6.5], "texture": "#sh"}, + "down": {"uv": [2.5, 9.5, 3.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2, 7.5, 5], + "to": [3, 8.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 0.5, 12.5]}, + "faces": { + "north": {"uv": [13, 7.5, 14, 8.5], "texture": "#sh"}, + "east": {"uv": [9.5, 7.5, 11, 8.5], "texture": "#sh"}, + "south": {"uv": [2, 7.5, 3, 8.5], "texture": "#sh"}, + "west": {"uv": [5, 7.5, 6.5, 8.5], "texture": "#sh"}, + "up": {"uv": [2, 5, 3, 6.5], "texture": "#sh"}, + "down": {"uv": [2, 9.5, 3, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 6, 5], + "to": [3.5, 7, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10.5, -1, 12.5]}, + "faces": { + "north": {"uv": [12, 9, 13, 10], "texture": "#sh"}, + "east": {"uv": [9.5, 9, 11, 10], "texture": "#sh"}, + "south": {"uv": [2.5, 9, 3.5, 10], "texture": "#sh"}, + "west": {"uv": [5, 9, 6.5, 10], "texture": "#sh"}, + "up": {"uv": [2.5, 5, 3.5, 6.5], "texture": "#sh"}, + "down": {"uv": [2.5, 9.5, 3.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [4, 5.5, 5], + "to": [5, 6.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12, -1.5, 12.5]}, + "faces": { + "north": {"uv": [11, 9.5, 12, 10.5], "texture": "#sh"}, + "east": {"uv": [9.5, 9.5, 11, 10.5], "texture": "#sh"}, + "south": {"uv": [4, 9.5, 5, 10.5], "texture": "#sh"}, + "west": {"uv": [5, 9.5, 6.5, 10.5], "texture": "#sh"}, + "up": {"uv": [4, 5, 5, 6.5], "texture": "#sh"}, + "down": {"uv": [4, 9.5, 5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [5.5, 6, 5], + "to": [6.5, 7, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, -1, 12.5]}, + "faces": { + "north": {"uv": [9, 9, 10, 10], "texture": "#sh"}, + "east": {"uv": [9.5, 9, 11, 10], "texture": "#sh"}, + "south": {"uv": [5.5, 9, 6.5, 10], "texture": "#sh"}, + "west": {"uv": [5, 9, 6.5, 10], "texture": "#sh"}, + "up": {"uv": [5, 5, 6, 6.5], "texture": "#sh"}, + "down": {"uv": [5.5, 9.5, 6.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [5.5, 9, 5], + "to": [6.5, 10, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, 2, 12.5]}, + "faces": { + "north": {"uv": [9, 6, 10, 7], "texture": "#sh"}, + "east": {"uv": [9.5, 6, 11, 7], "texture": "#sh"}, + "south": {"uv": [5.5, 6, 6.5, 7], "texture": "#sh"}, + "west": {"uv": [5, 6, 6.5, 7], "texture": "#sh"}, + "up": {"uv": [5, 5, 6, 6.5], "texture": "#sh"}, + "down": {"uv": [5.5, 9.5, 6.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [6, 7.5, 5], + "to": [7, 8.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0.5, 12.5]}, + "faces": { + "north": {"uv": [9, 7.5, 10, 8.5], "texture": "#sh"}, + "east": {"uv": [9.5, 7.5, 11, 8.5], "texture": "#sh"}, + "south": {"uv": [6, 7.5, 7, 8.5], "texture": "#sh"}, + "west": {"uv": [5, 7.5, 6.5, 8.5], "texture": "#sh"}, + "up": {"uv": [6, 5, 7, 6.5], "texture": "#sh"}, + "down": {"uv": [6, 9.5, 7, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 6, 6.5], + "to": [13.5, 10, 7.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19.5, 1, 13.5]}, + "faces": { + "north": {"uv": [10, 12, 14, 16], "texture": "#sh"}, + "east": {"uv": [15.5, 6, 16, 10], "texture": "#sh"}, + "south": {"uv": [9.5, 6, 13.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 6, 0.5, 10], "texture": "#sh"}, + "up": {"uv": [10, 7, 14, 8], "texture": "#sh"}, + "down": {"uv": [9.5, 15.5, 13.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [12.5, 9, 5], + "to": [13.5, 10, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [20.5, 2, 12.5]}, + "faces": { + "north": {"uv": [2, 6, 3, 7], "texture": "#sh"}, + "east": {"uv": [9.5, 6, 11, 7], "texture": "#sh"}, + "south": {"uv": [12.5, 6, 13.5, 7], "texture": "#sh"}, + "west": {"uv": [5, 6, 6.5, 7], "texture": "#sh"}, + "up": {"uv": [12, 5, 13, 6.5], "texture": "#sh"}, + "down": {"uv": [12.5, 9.5, 13.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [11, 9.5, 5], + "to": [12, 10.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19, 2.5, 12.5]}, + "faces": { + "north": {"uv": [4, 5.5, 5, 6.5], "texture": "#sh"}, + "east": {"uv": [9.5, 5.5, 11, 6.5], "texture": "#sh"}, + "south": {"uv": [11, 5.5, 12, 6.5], "texture": "#sh"}, + "west": {"uv": [5, 5.5, 6.5, 6.5], "texture": "#sh"}, + "up": {"uv": [11, 5, 12, 6.5], "texture": "#sh"}, + "down": {"uv": [11, 9.5, 12, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 9, 5], + "to": [10.5, 10, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17.5, 2, 12.5]}, + "faces": { + "north": {"uv": [5, 6, 6, 7], "texture": "#sh"}, + "east": {"uv": [9.5, 6, 11, 7], "texture": "#sh"}, + "south": {"uv": [9.5, 6, 10.5, 7], "texture": "#sh"}, + "west": {"uv": [5, 6, 6.5, 7], "texture": "#sh"}, + "up": {"uv": [9, 5, 10, 6.5], "texture": "#sh"}, + "down": {"uv": [9.5, 9.5, 10.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9, 7.5, 5], + "to": [10, 8.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17, 0.5, 12.5]}, + "faces": { + "north": {"uv": [6, 7.5, 7, 8.5], "texture": "#sh"}, + "east": {"uv": [9.5, 7.5, 11, 8.5], "texture": "#sh"}, + "south": {"uv": [9, 7.5, 10, 8.5], "texture": "#sh"}, + "west": {"uv": [5, 7.5, 6.5, 8.5], "texture": "#sh"}, + "up": {"uv": [9, 5, 10, 6.5], "texture": "#sh"}, + "down": {"uv": [9, 9.5, 10, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 6, 5], + "to": [10.5, 7, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17.5, -1, 12.5]}, + "faces": { + "north": {"uv": [5, 9, 6, 10], "texture": "#sh"}, + "east": {"uv": [9.5, 9, 11, 10], "texture": "#sh"}, + "south": {"uv": [9.5, 9, 10.5, 10], "texture": "#sh"}, + "west": {"uv": [5, 9, 6.5, 10], "texture": "#sh"}, + "up": {"uv": [9, 5, 10, 6.5], "texture": "#sh"}, + "down": {"uv": [9.5, 9.5, 10.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [11, 5.5, 5], + "to": [12, 6.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19, -1.5, 12.5]}, + "faces": { + "north": {"uv": [4, 9.5, 5, 10.5], "texture": "#sh"}, + "east": {"uv": [9.5, 9.5, 11, 10.5], "texture": "#sh"}, + "south": {"uv": [11, 9.5, 12, 10.5], "texture": "#sh"}, + "west": {"uv": [5, 9.5, 6.5, 10.5], "texture": "#sh"}, + "up": {"uv": [11, 5, 12, 6.5], "texture": "#sh"}, + "down": {"uv": [11, 9.5, 12, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [12.5, 6, 5], + "to": [13.5, 7, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [20.5, -1, 12.5]}, + "faces": { + "north": {"uv": [2, 9, 3, 10], "texture": "#sh"}, + "east": {"uv": [9.5, 9, 11, 10], "texture": "#sh"}, + "south": {"uv": [12.5, 9, 13.5, 10], "texture": "#sh"}, + "west": {"uv": [5, 9, 6.5, 10], "texture": "#sh"}, + "up": {"uv": [12, 5, 13, 6.5], "texture": "#sh"}, + "down": {"uv": [12.5, 9.5, 13.5, 11], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [13, 7.5, 5], + "to": [14, 8.5, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [21, 0.5, 12.5]}, + "faces": { + "north": {"uv": [2, 7.5, 3, 8.5], "texture": "#sh"}, + "east": {"uv": [9.5, 7.5, 11, 8.5], "texture": "#sh"}, + "south": {"uv": [13, 7.5, 14, 8.5], "texture": "#sh"}, + "west": {"uv": [5, 7.5, 6.5, 8.5], "texture": "#sh"}, + "up": {"uv": [13, 5, 14, 6.5], "texture": "#sh"}, + "down": {"uv": [13, 9.5, 14, 11], "rotation": 270, "texture": "#sh"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [85, 3, -10], + "translation": [1.75, -0.75, -2.25], + "scale": [0.35, 0.35, 0.35] + }, + "ground": { + "translation": [0, -0.75, 0], + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.14/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model_active.json b/1.14/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model_active.json new file mode 100644 index 0000000..649a000 --- /dev/null +++ b/1.14/src/main/resources/assets/engineersdecor/models/block/device/small_block_breaker_model_active.json @@ -0,0 +1,461 @@ +{ + "parent": "block/cube", + "textures": { + "t": "engineersdecor:block/device/small_block_breaker_top", + "b": "engineersdecor:block/device/small_block_breaker_bottom", + "l": "engineersdecor:block/device/small_block_breaker_left", + "particle": "engineersdecor:block/device/small_block_breaker_left", + "k": "engineersdecor:block/device/small_block_breaker_back", + "r": "engineersdecor:block/device/small_block_breaker_right", + "f": "engineersdecor:block/device/small_block_breaker_front", + "sh": "engineersdecor:block/device/small_block_breaker_shaft_active" + }, + "elements": [ + { + "from": [0, 0, 4], + "to": [1, 12, 16], + "faces": { + "north": {"uv": [15, 4, 16, 16], "texture": "#f"}, + "east": {"uv": [4, 0, 16, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [0, 4, 1, 16], "texture": "#k"}, + "west": {"uv": [4, 4, 16, 16], "texture": "#l"}, + "up": {"uv": [0, 4, 1, 16], "texture": "#t"}, + "down": {"uv": [0, 0, 1, 12], "texture": "#b"} + } + }, + { + "from": [15, 0, 4], + "to": [16, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [23, 8, 8]}, + "faces": { + "north": {"uv": [0, 4, 1, 16], "texture": "#f"}, + "east": {"uv": [0, 4, 12, 16], "texture": "#r"}, + "south": {"uv": [15, 4, 16, 16], "texture": "#k"}, + "west": {"uv": [0, 0, 12, 12], "texture": "#l"}, + "up": {"uv": [15, 4, 16, 16], "texture": "#t"}, + "down": {"uv": [15, 0, 16, 12], "texture": "#b"} + } + }, + { + "from": [7.5, 4, 6], + "to": [8.5, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [15.5, 12, -5]}, + "faces": { + "north": {"uv": [7.5, 4, 8.5, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 11, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [7.5, 4, 8.5, 12], "texture": "#t"}, + "west": {"uv": [5, 4, 7, 12], "texture": "#f"}, + "up": {"uv": [12, 7, 13, 9], "texture": "#t"}, + "down": {"uv": [7.5, 9, 8.5, 11], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [8.5, 4, 6], + "to": [9, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [16.5, 12, -5]}, + "faces": { + "north": {"uv": [7, 4, 7.5, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 10, 12], "rotation": 180, "texture": "#f"}, + "south": {"uv": [8.5, 4, 9, 12], "texture": "#t"}, + "west": {"uv": [6, 4, 7, 12], "texture": "#l"}, + "up": {"uv": [8, 7, 9.5, 8], "texture": "#t"}, + "down": {"uv": [8.5, 9, 9, 10], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [7, 4, 6], + "to": [7.5, 12, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 12, -5]}, + "faces": { + "north": {"uv": [8.5, 4, 9, 12], "texture": "#f"}, + "east": {"uv": [9, 4, 10, 12], "rotation": 180, "texture": "#l"}, + "south": {"uv": [7, 4, 7.5, 12], "texture": "#t"}, + "west": {"uv": [6, 4, 7, 12], "texture": "#f"}, + "up": {"uv": [7, 7, 7.5, 8], "texture": "#t"}, + "down": {"uv": [7, 9, 7.5, 10], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [15, 0, 0], + "to": [16, 5, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [23, -2, 8]}, + "faces": { + "north": {"uv": [0, 11, 1, 16], "texture": "#f"}, + "east": {"uv": [12, 11, 16, 16], "texture": "#r"}, + "south": {"uv": [15, 11, 16, 16], "texture": "#t"}, + "west": {"uv": [0, 11, 4, 16], "texture": "#l"}, + "up": {"uv": [15, 0, 16, 4], "texture": "#t"}, + "down": {"uv": [15, 12, 16, 16], "texture": "#b"} + } + }, + { + "from": [0, 0, 0], + "to": [1, 5, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [8, -2, 8]}, + "faces": { + "north": {"uv": [15, 11, 16, 16], "texture": "#f"}, + "east": {"uv": [12, 11, 16, 16], "texture": "#l"}, + "south": {"uv": [0, 11, 1, 16], "texture": "#t"}, + "west": {"uv": [0, 11, 4, 16], "texture": "#l"}, + "up": {"uv": [0, 0, 1, 4], "texture": "#t"}, + "down": {"uv": [0, 12, 1, 16], "texture": "#b"} + } + }, + { + "from": [1, 0, 0], + "to": [15, 4, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 24]}, + "faces": { + "north": {"uv": [1, 12, 15, 16], "texture": "#f"}, + "east": {"uv": [0, 12, 16, 16], "texture": "#l"}, + "south": {"uv": [1, 12, 15, 16], "texture": "#k"}, + "west": {"uv": [0, 12, 16, 16], "texture": "#l"}, + "up": {"uv": [1, 0, 15, 16], "texture": "#t"}, + "down": {"uv": [1, 0, 15, 16], "texture": "#b"} + } + }, + { + "from": [1, 4, 7], + "to": [15, 12, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 24]}, + "faces": { + "north": {"uv": [1, 4, 15, 12], "texture": "#f"}, + "east": {"uv": [0, 4, 9, 12], "texture": "#l"}, + "south": {"uv": [1, 4, 15, 12], "texture": "#k"}, + "west": {"uv": [7, 4, 16, 12], "texture": "#l"}, + "up": {"uv": [1, 7, 15, 16], "texture": "#t"}, + "down": {"uv": [1, 0, 15, 9], "rotation": 270, "texture": "#l"} + } + }, + { + "from": [4, 9.5, -2], + "to": [5, 10.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12, 2.5, 5.5]}, + "faces": { + "north": {"uv": [11, 5.5, 12, 6.5], "texture": "#sh"}, + "east": {"uv": [16, 5.5, 16, 6.5], "texture": "#sh"}, + "south": {"uv": [4, 5.5, 5, 6.5], "texture": "#sh"}, + "west": {"uv": [0, 5.5, 0, 6.5], "texture": "#sh"}, + "up": {"uv": [4, 0, 5, 0], "texture": "#sh"}, + "down": {"uv": [4, 16, 5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [3, 7, 0.5], + "to": [3.5, 9, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [2.5, 1, 5]}, + "faces": { + "north": {"uv": [12.5, 7, 13, 9], "texture": "#sh"}, + "east": {"uv": [9, 7, 15.5, 9], "texture": "#sh"}, + "south": {"uv": [3, 7, 3.5, 9], "texture": "#sh"}, + "west": {"uv": [1, 0, 7.5, 2], "texture": "#sh"}, + "up": {"uv": [3, 0.5, 9.5, 2], "rotation": 90, "texture": "#sh"}, + "down": {"uv": [3, 9, 3.5, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 6, -0.5], + "to": [6.5, 10, 0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12.5, 1, 6.5]}, + "faces": { + "north": {"uv": [11, 11, 15, 15], "texture": "#sh"}, + "east": {"uv": [15.5, 6, 16, 10], "texture": "#sh"}, + "south": {"uv": [2.5, 6, 6.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 6, 0.5, 10], "texture": "#sh"}, + "up": {"uv": [3, 2, 7, 2.5], "texture": "#sh"}, + "down": {"uv": [2.5, 15.5, 6.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 9, -2], + "to": [3.5, 10, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10.5, 2, 5.5]}, + "faces": { + "north": {"uv": [12.5, 6, 13.5, 7], "texture": "#sh"}, + "east": {"uv": [16, 6, 16, 7], "texture": "#sh"}, + "south": {"uv": [2.5, 6, 3.5, 7], "texture": "#sh"}, + "west": {"uv": [0, 6, 0, 7], "texture": "#sh"}, + "up": {"uv": [3, 2, 4, 3], "texture": "#sh"}, + "down": {"uv": [2.5, 16, 3.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2, 7.5, -2], + "to": [3, 8.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 0.5, 5.5]}, + "faces": { + "north": {"uv": [13, 7.5, 14, 8.5], "texture": "#sh"}, + "east": {"uv": [16, 7.5, 16, 8.5], "texture": "#sh"}, + "south": {"uv": [2, 7.5, 3, 8.5], "texture": "#sh"}, + "west": {"uv": [0, 7.5, 0, 8.5], "texture": "#sh"}, + "up": {"uv": [2, 0, 3, 0], "texture": "#sh"}, + "down": {"uv": [2, 16, 3, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [2.5, 6, -2], + "to": [3.5, 7, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [10.5, -1, 5.5]}, + "faces": { + "north": {"uv": [12.5, 9, 13.5, 10], "texture": "#sh"}, + "east": {"uv": [16, 9, 16, 10], "texture": "#sh"}, + "south": {"uv": [2.5, 9, 3.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 9, 0, 10], "texture": "#sh"}, + "up": {"uv": [2.5, 0, 3.5, 0], "texture": "#sh"}, + "down": {"uv": [2.5, 16, 3.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [4, 5.5, -2], + "to": [5, 6.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [12, -1.5, 5.5]}, + "faces": { + "north": {"uv": [11, 9.5, 12, 10.5], "texture": "#sh"}, + "east": {"uv": [16, 9.5, 16, 10.5], "texture": "#sh"}, + "south": {"uv": [4, 9.5, 5, 10.5], "texture": "#sh"}, + "west": {"uv": [0, 9.5, 0, 10.5], "texture": "#sh"}, + "up": {"uv": [4, 0, 5, 0], "texture": "#sh"}, + "down": {"uv": [4, 16, 5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [5.5, 6, -2], + "to": [6.5, 7, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, -1, 5.5]}, + "faces": { + "north": {"uv": [9.5, 9, 10.5, 10], "texture": "#sh"}, + "east": {"uv": [16, 9, 16, 10], "texture": "#sh"}, + "south": {"uv": [5.5, 9, 6.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 9, 0, 10], "texture": "#sh"}, + "up": {"uv": [5.5, 0, 6.5, 0], "texture": "#sh"}, + "down": {"uv": [5.5, 16, 6.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [5.5, 9, -2], + "to": [6.5, 10, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [13.5, 2, 5.5]}, + "faces": { + "north": {"uv": [9.5, 6, 10.5, 7], "texture": "#sh"}, + "east": {"uv": [16, 6, 16, 7], "texture": "#sh"}, + "south": {"uv": [5.5, 6, 6.5, 7], "texture": "#sh"}, + "west": {"uv": [0, 6, 0, 7], "texture": "#sh"}, + "up": {"uv": [5.5, 0, 6.5, 0], "texture": "#sh"}, + "down": {"uv": [5.5, 16, 6.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [6, 7.5, -2], + "to": [7, 8.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 0.5, 5.5]}, + "faces": { + "north": {"uv": [9, 7.5, 10, 8.5], "texture": "#sh"}, + "east": {"uv": [16, 7.5, 16, 8.5], "texture": "#sh"}, + "south": {"uv": [6, 7.5, 7, 8.5], "texture": "#sh"}, + "west": {"uv": [0, 7.5, 0, 8.5], "texture": "#sh"}, + "up": {"uv": [6, 0, 7, 0], "texture": "#sh"}, + "down": {"uv": [6, 16, 7, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [5.5, 7, 0.5], + "to": [6, 9, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [5.5, 1, 5]}, + "faces": { + "north": {"uv": [10, 7, 10.5, 9], "texture": "#sh"}, + "east": {"uv": [8, 7, 14.5, 9], "texture": "#sh"}, + "south": {"uv": [5.5, 7, 6, 9], "texture": "#sh"}, + "west": {"uv": [0.5, 7, 7, 9], "texture": "#sh"}, + "up": {"uv": [5, 2, 11.5, 2.5], "texture": "#sh"}, + "down": {"uv": [5.5, 9, 6, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [3.5, 6.5, 0.5], + "to": [5.5, 9.5, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [4.5, 1, 5]}, + "faces": { + "north": {"uv": [10.5, 6.5, 12.5, 9.5], "texture": "#sh"}, + "east": {"uv": [9, 6.5, 15.5, 9.5], "texture": "#sh"}, + "south": {"uv": [3.5, 6.5, 5.5, 9.5], "texture": "#sh"}, + "west": {"uv": [0.5, 6.5, 7, 9.5], "texture": "#sh"}, + "up": {"uv": [4, 1, 11, 3.5], "rotation": 90, "texture": "#sh"}, + "down": {"uv": [3.5, 9, 5.5, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [12.5, 7, 0.5], + "to": [13, 9, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [12.5, 1, 5]}, + "faces": { + "north": {"uv": [3, 7, 3.5, 9], "texture": "#sh"}, + "east": {"uv": [9, 7, 15.5, 9], "texture": "#sh"}, + "south": {"uv": [12.5, 7, 13, 9], "texture": "#sh"}, + "west": {"uv": [0.5, 7, 7, 9], "texture": "#sh"}, + "up": {"uv": [3, 0, 11.5, 0.5], "rotation": 90, "texture": "#sh"}, + "down": {"uv": [12.5, 9, 13, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [10.5, 6.5, 0.5], + "to": [12.5, 9.5, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [11.5, 1, 5]}, + "faces": { + "north": {"uv": [3.5, 6.5, 5.5, 9.5], "texture": "#sh"}, + "east": {"uv": [9, 6.5, 15.5, 9.5], "texture": "#sh"}, + "south": {"uv": [10.5, 6.5, 12.5, 9.5], "texture": "#sh"}, + "west": {"uv": [0.5, 6.5, 7, 9.5], "texture": "#sh"}, + "up": {"uv": [6, 0, 12, 2.5], "rotation": 90, "texture": "#sh"}, + "down": {"uv": [10.5, 9, 12.5, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [10, 7, 0.5], + "to": [10.5, 9, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [9.5, 1, 5]}, + "faces": { + "north": {"uv": [5.5, 7, 6, 9], "texture": "#sh"}, + "east": {"uv": [9, 7, 15.5, 9], "texture": "#sh"}, + "south": {"uv": [10, 7, 10.5, 9], "texture": "#sh"}, + "west": {"uv": [0.5, 7, 7, 9], "texture": "#sh"}, + "up": {"uv": [10, 0.5, 15.5, 1], "rotation": 90, "texture": "#sh"}, + "down": {"uv": [10, 9, 10.5, 15.5], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 6, -0.5], + "to": [13.5, 10, 0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19.5, 1, 6.5]}, + "faces": { + "north": {"uv": [10, 12, 14, 16], "texture": "#sh"}, + "east": {"uv": [15.5, 6, 16, 10], "texture": "#sh"}, + "south": {"uv": [9.5, 6, 13.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 6, 0.5, 10], "texture": "#sh"}, + "up": {"uv": [9.5, 0, 13.5, 0.5], "texture": "#sh"}, + "down": {"uv": [9.5, 15.5, 13.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [12.5, 9, -2], + "to": [13.5, 10, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [20.5, 2, 5.5]}, + "faces": { + "north": {"uv": [2.5, 6, 3.5, 7], "texture": "#sh"}, + "east": {"uv": [16, 6, 16, 7], "texture": "#sh"}, + "south": {"uv": [12.5, 6, 13.5, 7], "texture": "#sh"}, + "west": {"uv": [0, 6, 0, 7], "texture": "#sh"}, + "up": {"uv": [12.5, 0, 13.5, 0], "texture": "#sh"}, + "down": {"uv": [12.5, 16, 13.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [11, 9.5, -2], + "to": [12, 10.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19, 2.5, 5.5]}, + "faces": { + "north": {"uv": [4, 5.5, 5, 6.5], "texture": "#sh"}, + "east": {"uv": [16, 5.5, 16, 6.5], "texture": "#sh"}, + "south": {"uv": [11, 5.5, 12, 6.5], "texture": "#sh"}, + "west": {"uv": [0, 5.5, 0, 6.5], "texture": "#sh"}, + "up": {"uv": [11, 0, 12, 0], "texture": "#sh"}, + "down": {"uv": [11, 16, 12, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 9, -2], + "to": [10.5, 10, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17.5, 2, 5.5]}, + "faces": { + "north": {"uv": [5.5, 6, 6.5, 7], "texture": "#sh"}, + "east": {"uv": [16, 6, 16, 7], "texture": "#sh"}, + "south": {"uv": [9.5, 6, 10.5, 7], "texture": "#sh"}, + "west": {"uv": [0, 6, 0, 7], "texture": "#sh"}, + "up": {"uv": [9.5, 0, 10.5, 0], "texture": "#sh"}, + "down": {"uv": [9.5, 16, 10.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9, 7.5, -2], + "to": [10, 8.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17, 0.5, 5.5]}, + "faces": { + "north": {"uv": [6, 7.5, 7, 8.5], "texture": "#sh"}, + "east": {"uv": [16, 7.5, 16, 8.5], "texture": "#sh"}, + "south": {"uv": [9, 7.5, 10, 8.5], "texture": "#sh"}, + "west": {"uv": [0, 7.5, 0, 8.5], "texture": "#sh"}, + "up": {"uv": [9, 0, 10, 0], "texture": "#sh"}, + "down": {"uv": [9, 16, 10, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [9.5, 6, -2], + "to": [10.5, 7, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [17.5, -1, 5.5]}, + "faces": { + "north": {"uv": [5.5, 9, 6.5, 10], "texture": "#sh"}, + "east": {"uv": [16, 9, 16, 10], "texture": "#sh"}, + "south": {"uv": [9.5, 9, 10.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 9, 0, 10], "texture": "#sh"}, + "up": {"uv": [9.5, 0, 10.5, 0], "texture": "#sh"}, + "down": {"uv": [9.5, 16, 10.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [11, 5.5, -2], + "to": [12, 6.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19, -1.5, 5.5]}, + "faces": { + "north": {"uv": [4, 9.5, 5, 10.5], "texture": "#sh"}, + "east": {"uv": [16, 9.5, 16, 10.5], "texture": "#sh"}, + "south": {"uv": [11, 9.5, 12, 10.5], "texture": "#sh"}, + "west": {"uv": [0, 9.5, 0, 10.5], "texture": "#sh"}, + "up": {"uv": [11, 0, 12, 0], "texture": "#sh"}, + "down": {"uv": [11, 16, 12, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [12.5, 6, -2], + "to": [13.5, 7, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [20.5, -1, 5.5]}, + "faces": { + "north": {"uv": [2.5, 9, 3.5, 10], "texture": "#sh"}, + "east": {"uv": [16, 9, 16, 10], "texture": "#sh"}, + "south": {"uv": [12.5, 9, 13.5, 10], "texture": "#sh"}, + "west": {"uv": [0, 9, 0, 10], "texture": "#sh"}, + "up": {"uv": [12.5, 0, 13.5, 0], "texture": "#sh"}, + "down": {"uv": [12.5, 16, 13.5, 16], "rotation": 270, "texture": "#sh"} + } + }, + { + "from": [13, 7.5, -2], + "to": [14, 8.5, -0.5], + "rotation": {"angle": 0, "axis": "y", "origin": [21, 0.5, 5.5]}, + "faces": { + "north": {"uv": [2, 7.5, 3, 8.5], "texture": "#sh"}, + "east": {"uv": [16, 7.5, 16, 8.5], "texture": "#sh"}, + "south": {"uv": [13, 7.5, 14, 8.5], "texture": "#sh"}, + "west": {"uv": [0, 7.5, 0, 8.5], "texture": "#sh"}, + "up": {"uv": [13, 0, 14, 0], "texture": "#sh"}, + "down": {"uv": [13, 16, 14, 16], "rotation": 270, "texture": "#sh"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [85, 3, -10], + "translation": [1.75, -0.75, -2.25], + "scale": [0.35, 0.35, 0.35] + }, + "ground": { + "translation": [0, -0.75, 0], + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.14/src/main/resources/assets/engineersdecor/models/item/small_block_breaker.json b/1.14/src/main/resources/assets/engineersdecor/models/item/small_block_breaker.json new file mode 100644 index 0000000..8174305 --- /dev/null +++ b/1.14/src/main/resources/assets/engineersdecor/models/item/small_block_breaker.json @@ -0,0 +1 @@ +{ "parent": "engineersdecor:block/device/small_block_breaker_model_active" } \ No newline at end of file diff --git a/1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_back.png b/1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_back.png new file mode 100644 index 0000000000000000000000000000000000000000..3c1f608629a21ed49abce64225e5ac8b1c9f9e75 GIT binary patch literal 573 zcmV-D0>b@?P)T&(=KJOF1y`sP<~H8Gs#Te zujR94XXY&7`udvZ=V#1pXkVHapokbiH#avtJw5UI`ihDO4-XG)w_AGexck`er7S@1 z&fVP|+wGQ!phN`g^_uhZbN>APg$Ia$sp1i2La}+o-Gj(v^X)rVS63Vk2g;&bL{Jgd zt539Wsv0oMh)8-SQIunkF$pu90o)xkBN6`Y-^k1pV9rcD@ROgW@DJl^m6@TcBL@H_Gr739V6|GY+wCy3A*r=C8khS5a(Q{l@p$AP5XN7rH`-wjpf{O6koa&C-XcB$(_;dteU;BY%Wu9kNjAD8eK?PRzRrPR< zwL7gls>0G8T}RENs1P~sd+(G|27;M!d3nk6^D|$*{lMLaRH}%`rgCOdYb7GMy}f0( z+p*v8(cU``4-Y&&J&iq^9k}0G+YXbNp{mBHRM_= hr40A3udi8_g}<)*lG%mnUUvWh002ovPDHLkV1h*C`zQba literal 0 HcmV?d00001 diff --git a/1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_front.png b/1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_front.png new file mode 100644 index 0000000000000000000000000000000000000000..187468bcac1e2606b31511a4964ce162f58a5f3d GIT binary patch literal 450 zcmV;z0X_bSP)~-=RTLD5Ve)E4Zz-L8JH1=kvitg#CU`?;Uqv3Ax#9aQ9J|lL3}x0l-vsd`RIE zY9h%GLh(ME1DP?7onPFyw#w=hKi^$K$TI;Y4Sl!BO?(W0BSu5jDq{^9`tE$pk8+RiG zwasS3@p$CAvE*&}?4!Ar202&~1KAKFEs{jB107*qoM6N<$g0(xr&;S4c literal 0 HcmV?d00001 diff --git a/1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_left.png b/1.14/src/main/resources/assets/engineersdecor/textures/block/device/small_block_breaker_left.png new file mode 100644 index 0000000000000000000000000000000000000000..7d579a4be7a34d9e51d3c4855d21b641e7e02dee GIT binary patch literal 489 zcmVdzYjS#|@5;H?Y5Z}~VzuIt_ zzCs8+A7kvXJRT212&9z0RCw(FPo>_1suFX~%;$4vvl-(!l5=La+x5LObw&}k+bxU5 z0udp4Z=M7=9*QGx3>#E5C>9KR;v~3^}0*_Yz-ji%x1IU z`FtWNrLMrtNGTCx?9+GoziT`v&Jbgy*7{ZK_K66p+O74=)>?Z5_<(vkZuh=h_&*76$hGAeBhCXHYT0}aaFEgXoO05+U@zx{LG*L=HRXa;5<P)z%x(@At?FrT~y93M2ea;nXx_Nxbyj}B7$=c?>zvvS5*LltL zuU0G8>oqY(LamkC?Z!Bc{Qdpmy>A&A$>nn4e!tWAJs|{CwUroh&TO|^a?TBGRvE$J za6nagzu(PX(<+#!zo4b9w)WmPcT{!8n7`H}HbV$sKwJMhB^G5lmR+};zb>ijT!Q^r zcG~Z-=+Eb~WgsH63nD_!c~*7Nnag)jN@26vwDX)ZpU-F3pzAtLr_)!@o6-O&rFK?I zA*IAH408sm%H?ul97p=TZ-S{RDJ5cz?SaJ@0k~eT|NFu@$1n^4Ow-itS=MQqOw&Xu eh23t~MEwU<2nlE-8DSLw0000r2`#06 z*#CcSAk9_YhcMnGy9Q%qq|waCw)gv8UauE@-}8Jv`FuVAlv23g?|i>sa?UKvLf3T+ z!$8wCtm}%I;Q;PVDFt`0#X7YC=6MDn=L|qfX$Kg`kx~ldI1&-$oGGQSZ5zi1+5&2t z1~)U>w%zHtUf-hI%;j(M&I|l2kIa*6$?l?UDuu1+-|oWKvdUt zt?sM9-Tz2XJWUgolPDgipyI1H0$Y{^cXu9-M|D{e%#55f5mBXx;jy6~XYB6C)MMgx z0=kcgUx0O8s~2tCo(dwOPDRWl_4JUm1hj423E(J2v0rJbKmhuE|GkHl5-B<&U|E(b6asM_&pBr( zVlc zx{A%|blL$(bzRqzeHy6hpAdL{zuzdFNYPh;#>dNhlcyDGOfOTC_)vJ(BTX6*fZg{^ z4qpNGaiZy<(asn(1^pRnvx|^26qshu`mxJkN85?6+TDjR2setG^H)YOMu-TSrm6Cweq8%`$9fOL z@JH$d-L~x`r2qB4A1KFUn;EoiTL382hmVE_^j}uZy$xC}LI_p&`9(u2lQ~o0iJbd< zwme-*yYv8=rIfxZjkAE|q8_|HL}Y&#e7St*`LkD~5BndbhxdpFRI*9{0000D=JRRm_Gwlc$$0I3xJ{pZN>-gWmRCpXTh7auSn? zoG7z%-Re+Lr6$R{ybJ-MGj5h0s|`Ka|M=LhBC~Q;6s;=`=QRK^K-? z(ld85`h?xxdu-J^K6B$8)<(s#3LK5AvY3NIcUUVid4&i@imvEfwa$BqZKMm!lr63) z$p)+{6`_j8f`Z!Nk*SwbKCL+>)7DW_(!sGOPJhL#X*Q7sXEvX4NjnrO`n)o4x^Z!1 z0Z{9aO|hY+H&0X^d&7IKW>v=lW8ruI`hTrA{T^H}H`miK{n7Td#dq)4n|)GH61)3; zd+_{~6NP)<&tL1s#!#^P?u3~;?!S+=e_>ww>-TDY4}0UpwE1=`v~1>|Pvt%M!gQ{J gx3RO!n*Q%>t8avttle?C5g3RJp00i_>zopr0PhW*jsO4v literal 0 HcmV?d00001 diff --git a/1.14/src/main/resources/data/engineersdecor/loot_tables/blocks/small_block_breaker.json b/1.14/src/main/resources/data/engineersdecor/loot_tables/blocks/small_block_breaker.json new file mode 100644 index 0000000..3794c12 --- /dev/null +++ b/1.14/src/main/resources/data/engineersdecor/loot_tables/blocks/small_block_breaker.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "small_block_breaker_dlt", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + }, + { + "function": "minecraft:copy_nbt", + "source": "block_entity", + "ops": [] + } + ], + "name": "engineersdecor:small_block_breaker" + } + ] + } + ] +} \ No newline at end of file diff --git a/1.14/src/main/resources/data/engineersdecor/recipes/alternative/small_block_breaker_recipe_standalone.json b/1.14/src/main/resources/data/engineersdecor/recipes/alternative/small_block_breaker_recipe_standalone.json new file mode 100644 index 0000000..6ed0b59 --- /dev/null +++ b/1.14/src/main/resources/data/engineersdecor/recipes/alternative/small_block_breaker_recipe_standalone.json @@ -0,0 +1,33 @@ +{ + "conditions": [ + { + "type": "engineersdecor:optional", + "result": "engineersdecor:small_block_breaker", + "missing": ["immersiveengineering:metal_device1"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "PPP", + "PAO", + "PRP" + ], + "key": { + "O": { + "item": "minecraft:observer" + }, + "P": { + "item": "minecraft:iron_ingot" + }, + "A": { + "item": "minecraft:iron_pickaxe" + }, + "R": { + "item": "minecraft:redstone_block" + } + }, + "result": { + "item": "engineersdecor:small_block_breaker", + "count": 1 + } +} diff --git a/1.14/src/main/resources/data/engineersdecor/recipes/alternative/small_tree_cutter_recipe_standalone.json b/1.14/src/main/resources/data/engineersdecor/recipes/alternative/small_tree_cutter_recipe_standalone.json index dc8b907..6973303 100644 --- a/1.14/src/main/resources/data/engineersdecor/recipes/alternative/small_tree_cutter_recipe_standalone.json +++ b/1.14/src/main/resources/data/engineersdecor/recipes/alternative/small_tree_cutter_recipe_standalone.json @@ -2,7 +2,7 @@ "conditions": [ { "type": "engineersdecor:optional", - "result": "engineersdecor:small_solar_panel", + "result": "engineersdecor:small_tree_cutter", "missing": ["immersiveengineering:metal_device1"] } ], diff --git a/meta/update.json b/meta/update.json index 3b0def1..0953599 100644 --- a/meta/update.json +++ b/meta/update.json @@ -2,11 +2,12 @@ "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "promos": { "1.12.2-recommended": "1.0.14", - "1.12.2-latest": "1.0.15-b1", + "1.12.2-latest": "1.0.15-b2", "1.14.4-recommended": "", - "1.14.4-latest": "1.0.15-b2" + "1.14.4-latest": "1.0.15-b3" }, "1.12.2": { + "1.0.15-b2": "[A] Added Small Block Breaker\n[M] Crafting Table: Allowing NBT \"Damage\" mismatch only items that are declared damagable (issue #56).\n[M] Tree Cutter: Loosened the strict mod namespace requirement for Dynamic Trees log detection (issue #52) to enable checking DT compat mod log blocks.", "1.0.15-b1": "[A] Added Floor Edge Light.\n[A] Added Factory Block Placer and Planter.", "1.0.14": "[R] Release based on v1.0.14-b1. Release-to-release changes: * Factory Hopper added. * Small Waste Incinerator improved. * Lang updates. * Recipe fixes.", "1.0.14-b1": "[A] Factory Hopper added (configurable hopper and item collector).\n[M] Small Waste Incinerator Fifo shifting improved.\n[M] Lang file zh_cn updated (scikirbypoke, PR#53).\n[F] Fixed conditional recipe constant for redstone pipe valve (thx @albert_ac).", @@ -69,6 +70,7 @@ "1.0.0-b1": "[A] Initial structure.\n[A] Added clinker bricks and clinker brick stairs.\n[A] Added slag bricks and slag brick stairs.\n[A] Added metal rung ladder.\n[A] Added staggered metal steps ladder.\n[A] Added treated wood ladder.\n[A] Added treated wood pole.\n[A] Added treated wood table." }, "1.14.4": { + "1.0.15-b3": "[A] Added Small Block Breaker.\n[M] Mineral Smelter fluid handler/transfer added.", "1.0.15-b2": "[!] Forge version requirement set to 1.14.4-28.1.68 or higher.\n[A] Added Factory Block Placer and Planter.\n[A] Added Small Tree Cutter.", "1.0.15-b1": "[A] Added Floor Edge Light.\n[U] Updated to Forge1.14.4-28.1.68/20190719-1.14.3.", "1.0.14-b1": "[U] Updated to Forge 1.14.4-28.1.40/20190719-1.14.3.\n[A] Factory Hopper added (configurable hopper and item collector).\n[M] Switched to integrated loot table generation.\n[M] Lang file zh_cn updated (scikirbypoke, PR#53).",