From 039edb55198cd26d9cd20df3ba3a172ee16856ef Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 22 Dec 2019 01:31:40 +0100 Subject: [PATCH] Omnidirectional Extractors - Extractors and Linked Extractors have vertical variants - Minor reworks to Extractor models --- build.gradle | 8 +- .../java/com/simibubi/create/AllBlocks.java | 25 ++- .../com/simibubi/create/AllTileEntities.java | 9 +- .../com/simibubi/create/ClientEvents.java | 4 +- .../com/simibubi/create/CreateClient.java | 6 +- .../com/simibubi/create/CreateItemGroup.java | 4 +- .../foundation/block/ColoredVertexModel.java | 4 +- ...lorHandler.java => IHaveColorHandler.java} | 2 +- ...ertices.java => IHaveColoredVertices.java} | 2 +- .../block/IHaveCustomBlockItem.java | 10 ++ ...utBlockItem.java => IHaveNoBlockItem.java} | 2 +- ...leValue.java => IHaveScrollableValue.java} | 10 +- .../foundation/block/IRenderUtilityBlock.java | 2 +- .../create/foundation/utility/AllShapes.java | 5 +- .../foundation/utility/AngleHelper.java | 15 ++ .../create/foundation/utility/VecHelper.java | 6 + .../chassis/AbstractChassisBlock.java | 4 +- .../piston/MechanicalPistonHeadBlock.java | 4 +- .../crusher/CrushingWheelControllerBlock.java | 4 +- .../mixer/MechanicalMixerBlock.java | 14 +- .../components/motor/MotorBlock.java | 4 +- .../contraptions/components/saw/SawBlock.java | 4 +- .../contraptions/relays/belt/BeltBlock.java | 4 +- .../relays/elementary/ShaftHalfBlock.java | 4 +- .../partialWindows/WindowInABlockBlock.java | 4 +- .../block/FilteredTileEntityRenderer.java | 2 +- ...ckWithFilter.java => IHaveFilterSlot.java} | 16 +- .../block/belts/BeltFunnelBlock.java | 6 +- .../block/belts/EntityDetectorBlock.java | 4 +- .../logistics/block/belts/ExtractorBlock.java | 60 ++++--- .../block/belts/ExtractorTileEntity.java | 9 +- .../block/belts/LinkedExtractorBlock.java | 74 +++++--- .../belts/LinkedExtractorTileEntity.java | 23 ++- .../block/belts/VerticalExtractorBlock.java | 44 +++++ .../belts/VerticalLinkedExtractorBlock.java | 44 +++++ .../block/diodes/FlexpeaterBlock.java | 4 +- .../base/LogisticalControllerBlock.java | 4 +- .../index/LogisticalIndexBlock.java | 4 +- .../modules/palettes/VolcanicRockBlock.java | 4 +- .../assets/create/blockstates/extractor.json | 7 +- .../create/blockstates/linked_extractor.json | 7 +- .../blockstates/vertical_extractor.json | 27 +++ .../vertical_linked_extractor.json | 27 +++ .../horizontal.json} | 21 +-- .../block/extractor/horizontal_powered.json | 7 + .../horizontal_wireless.json} | 58 ++++--- .../horizontal_wireless_powered.json | 8 + .../models/block/extractor/vertical.json | 121 +++++++++++++ .../vertical_powered.json} | 2 +- .../block/extractor/vertical_wireless.json | 162 ++++++++++++++++++ .../vertical_wireless_powered.json} | 2 +- .../translation_chassis_both_sticky.json | 3 +- .../translation_chassis_bottom_sticky.json | 4 +- .../block/translation_chassis_top_sticky.json | 4 +- .../assets/create/models/item/extractor.json | 2 +- .../create/models/item/linked_extractor.json | 2 +- .../create/textures/block/brass_casing.png | Bin 430 -> 473 bytes .../create/textures/block/extractor.png | Bin 491 -> 583 bytes .../textures/block/extractor_powered.png | Bin 509 -> 665 bytes .../create/textures/item/crushed_zinc.png | Bin 772 -> 784 bytes .../assets/create/textures/item/zinc_cube.png | Bin 481 -> 545 bytes .../create/textures/item/zinc_nugget.png | Bin 346 -> 365 bytes 62 files changed, 728 insertions(+), 194 deletions(-) rename src/main/java/com/simibubi/create/foundation/block/{IBlockWithColorHandler.java => IHaveColorHandler.java} (77%) rename src/main/java/com/simibubi/create/foundation/block/{IBlockWithColoredVertices.java => IHaveColoredVertices.java} (68%) create mode 100644 src/main/java/com/simibubi/create/foundation/block/IHaveCustomBlockItem.java rename src/main/java/com/simibubi/create/foundation/block/{IWithoutBlockItem.java => IHaveNoBlockItem.java} (75%) rename src/main/java/com/simibubi/create/foundation/block/{IBlockWithScrollableValue.java => IHaveScrollableValue.java} (96%) create mode 100644 src/main/java/com/simibubi/create/foundation/utility/AngleHelper.java rename src/main/java/com/simibubi/create/modules/logistics/block/{IBlockWithFilter.java => IHaveFilterSlot.java} (93%) create mode 100644 src/main/java/com/simibubi/create/modules/logistics/block/belts/VerticalExtractorBlock.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/block/belts/VerticalLinkedExtractorBlock.java create mode 100644 src/main/resources/assets/create/blockstates/vertical_extractor.json create mode 100644 src/main/resources/assets/create/blockstates/vertical_linked_extractor.json rename src/main/resources/assets/create/models/block/{extractor.json => extractor/horizontal.json} (84%) create mode 100644 src/main/resources/assets/create/models/block/extractor/horizontal_powered.json rename src/main/resources/assets/create/models/block/{extractor_wireless.json => extractor/horizontal_wireless.json} (58%) create mode 100644 src/main/resources/assets/create/models/block/extractor/horizontal_wireless_powered.json create mode 100644 src/main/resources/assets/create/models/block/extractor/vertical.json rename src/main/resources/assets/create/models/block/{extractor_powered.json => extractor/vertical_powered.json} (73%) create mode 100644 src/main/resources/assets/create/models/block/extractor/vertical_wireless.json rename src/main/resources/assets/create/models/block/{extractor_wireless_powered.json => extractor/vertical_wireless_powered.json} (77%) diff --git a/build.gradle b/build.gradle index 74f612743..b90664233 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ archivesBaseName = 'create' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' minecraft { - mappings channel: 'snapshot', version: '20191130-1.14.3' + mappings channel: 'snapshot', version: '20191221-1.14.3' runs { client { @@ -71,12 +71,12 @@ repositories { } dependencies { - minecraft 'net.minecraftforge:forge:1.14.4-28.1.106' + minecraft 'net.minecraftforge:forge:1.14.4-28.1.107' // compile against the JEI API but do not include it at runtime - compileOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.10:api") + compileOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.26:api") // at runtime, use the full JEI jar - runtimeOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.10") + runtimeOnly fg.deobf("mezz.jei:jei-1.14.4:6.0.0.26") } jar { diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 43dee6e5d..a023b174f 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -1,7 +1,8 @@ package com.simibubi.create; -import com.simibubi.create.foundation.block.IBlockWithColorHandler; -import com.simibubi.create.foundation.block.IWithoutBlockItem; +import com.simibubi.create.foundation.block.IHaveColorHandler; +import com.simibubi.create.foundation.block.IHaveCustomBlockItem; +import com.simibubi.create.foundation.block.IHaveNoBlockItem; import com.simibubi.create.foundation.block.ProperStairsBlock; import com.simibubi.create.foundation.block.RenderUtilityAxisBlock; import com.simibubi.create.foundation.block.RenderUtilityBlock; @@ -25,7 +26,6 @@ import com.simibubi.create.modules.contraptions.components.crusher.CrushingWheel import com.simibubi.create.modules.contraptions.components.crusher.CrushingWheelControllerBlock; import com.simibubi.create.modules.contraptions.components.fan.EncasedFanBlock; import com.simibubi.create.modules.contraptions.components.mixer.MechanicalMixerBlock; -import com.simibubi.create.modules.contraptions.components.mixer.MechanicalMixerBlock.MechanicalMixerBlockItem; import com.simibubi.create.modules.contraptions.components.motor.MotorBlock; import com.simibubi.create.modules.contraptions.components.press.MechanicalPressBlock; import com.simibubi.create.modules.contraptions.components.saw.SawBlock; @@ -55,6 +55,8 @@ import com.simibubi.create.modules.logistics.block.belts.BeltFunnelBlock; import com.simibubi.create.modules.logistics.block.belts.EntityDetectorBlock; import com.simibubi.create.modules.logistics.block.belts.ExtractorBlock; import com.simibubi.create.modules.logistics.block.belts.LinkedExtractorBlock; +import com.simibubi.create.modules.logistics.block.belts.VerticalExtractorBlock; +import com.simibubi.create.modules.logistics.block.belts.VerticalLinkedExtractorBlock; import com.simibubi.create.modules.logistics.block.diodes.FlexpeaterBlock; import com.simibubi.create.modules.logistics.block.diodes.PulseRepeaterBlock; import com.simibubi.create.modules.logistics.block.inventories.FlexcrateBlock; @@ -162,7 +164,9 @@ public enum AllBlocks { STOCKSWITCH(new StockswitchBlock()), FLEXCRATE(new FlexcrateBlock()), EXTRACTOR(new ExtractorBlock()), + VERTICAL_EXTRACTOR(new VerticalExtractorBlock()), LINKED_EXTRACTOR(new LinkedExtractorBlock()), + VERTICAL_LINKED_EXTRACTOR(new VerticalLinkedExtractorBlock()), BELT_FUNNEL(new BeltFunnelBlock()), BELT_TUNNEL(new BeltTunnelBlock()), BELT_TUNNEL_FLAP(new RenderUtilityBlock()), @@ -208,7 +212,10 @@ public enum AllBlocks { POLISHED_LIMESTONE(new Block(Properties.from(LIMESTONE.block)), ComesWith.SLAB), LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(LIMESTONE.block))), WEATHERED_LIMESTONE(new Block(Properties.from(Blocks.ANDESITE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - WEATHERED_LIMESTONE_BRICKS(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.STAIRS, ComesWith.SLAB, + WEATHERED_LIMESTONE_BRICKS( + new Block(Properties.from(WEATHERED_LIMESTONE.block)), + ComesWith.STAIRS, + ComesWith.SLAB, ComesWith.WALL), POLISHED_WEATHERED_LIMESTONE(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.SLAB), WEATHERED_LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(WEATHERED_LIMESTONE.block))), @@ -269,7 +276,7 @@ public enum AllBlocks { for (AllBlocks block : values()) { if (block.get() == null) continue; - if (block.get() instanceof IWithoutBlockItem) + if (block.get() instanceof IHaveNoBlockItem) continue; registerAsItem(registry, block.get()); @@ -282,8 +289,8 @@ public enum AllBlocks { BlockItem blockItem = null; net.minecraft.item.Item.Properties standardItemProperties = AllItems.standardItemProperties(); - if (blockIn == AllBlocks.MECHANICAL_MIXER.get()) - blockItem = new MechanicalMixerBlockItem(standardItemProperties); + if (blockIn instanceof IHaveCustomBlockItem) + blockItem = ((IHaveCustomBlockItem) blockIn).getCustomItem(standardItemProperties); else blockItem = new BlockItem(blockIn, standardItemProperties); @@ -329,8 +336,8 @@ public enum AllBlocks { public static void registerColorHandlers() { BlockColors blockColors = Minecraft.getInstance().getBlockColors(); for (AllBlocks block : values()) { - if (block.block instanceof IBlockWithColorHandler) { - blockColors.register(((IBlockWithColorHandler) block.block).getColorHandler(), block.block); + if (block.block instanceof IHaveColorHandler) { + blockColors.register(((IHaveColorHandler) block.block).getColorHandler(), block.block); } } } diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index b6b7af3a7..9adc966a2 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -107,7 +107,10 @@ public enum AllTileEntities { BELT_TUNNEL(BeltTunnelTileEntity::new, AllBlocks.BELT_TUNNEL), MECHANICAL_PISTON(MechanicalPistonTileEntity::new, AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON), MECHANICAL_BEARING(MechanicalBearingTileEntity::new, AllBlocks.MECHANICAL_BEARING), - CHASSIS(ChassisTileEntity::new, AllBlocks.ROTATION_CHASSIS, AllBlocks.TRANSLATION_CHASSIS, + CHASSIS( + ChassisTileEntity::new, + AllBlocks.ROTATION_CHASSIS, + AllBlocks.TRANSLATION_CHASSIS, AllBlocks.TRANSLATION_CHASSIS_SECONDARY), DRILL(DrillTileEntity::new, AllBlocks.DRILL), SAW(SawTileEntity::new, AllBlocks.SAW), @@ -126,8 +129,8 @@ public enum AllTileEntities { REDSTONE_BRIDGE(RedstoneBridgeTileEntity::new, AllBlocks.REDSTONE_BRIDGE), STOCKSWITCH(StockswitchTileEntity::new, AllBlocks.STOCKSWITCH), FLEXCRATE(FlexcrateTileEntity::new, AllBlocks.FLEXCRATE), - EXTRACTOR(ExtractorTileEntity::new, AllBlocks.EXTRACTOR), - LINKED_EXTRACTOR(LinkedExtractorTileEntity::new, AllBlocks.LINKED_EXTRACTOR), + EXTRACTOR(ExtractorTileEntity::new, AllBlocks.EXTRACTOR, AllBlocks.VERTICAL_EXTRACTOR), + LINKED_EXTRACTOR(LinkedExtractorTileEntity::new, AllBlocks.LINKED_EXTRACTOR, AllBlocks.VERTICAL_LINKED_EXTRACTOR), BELT_FUNNEL(BeltFunnelTileEntity::new, AllBlocks.BELT_FUNNEL), ENTITY_DETECTOR(EntityDetectorTileEntity::new, AllBlocks.ENTITY_DETECTOR), FLEXPEATER(FlexpeaterTileEntity::new, AllBlocks.FLEXPEATER), diff --git a/src/main/java/com/simibubi/create/ClientEvents.java b/src/main/java/com/simibubi/create/ClientEvents.java index 5b8dd866a..eed93ddf1 100644 --- a/src/main/java/com/simibubi/create/ClientEvents.java +++ b/src/main/java/com/simibubi/create/ClientEvents.java @@ -3,7 +3,7 @@ package com.simibubi.create; import java.util.ArrayList; import java.util.List; -import com.simibubi.create.foundation.block.IBlockWithScrollableValue; +import com.simibubi.create.foundation.block.IHaveScrollableValue; import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.utility.AnimationTickHolder; @@ -100,7 +100,7 @@ public class ClientEvents { boolean cancelled = CreateClient.schematicHandler.mouseScrolled(delta) || CreateClient.schematicAndQuillHandler.mouseScrolled(delta) - || IBlockWithScrollableValue.onScroll(delta); + || IHaveScrollableValue.onScroll(delta); event.setCanceled(cancelled); } diff --git a/src/main/java/com/simibubi/create/CreateClient.java b/src/main/java/com/simibubi/create/CreateClient.java index 274ef05a5..88d38b480 100644 --- a/src/main/java/com/simibubi/create/CreateClient.java +++ b/src/main/java/com/simibubi/create/CreateClient.java @@ -7,7 +7,7 @@ import java.util.function.Function; import com.simibubi.create.foundation.block.CTModel; import com.simibubi.create.foundation.block.ColoredVertexModel; -import com.simibubi.create.foundation.block.IBlockWithColoredVertices; +import com.simibubi.create.foundation.block.IHaveColoredVertices; import com.simibubi.create.foundation.block.IHaveConnectedTextures; import com.simibubi.create.foundation.block.SpriteShifter.SpriteShiftEntry; import com.simibubi.create.foundation.utility.SuperByteBufferCache; @@ -126,9 +126,9 @@ public class CreateClient { List blockModelLocations = getAllBlockStateModelLocations(allBlocks); if (block instanceof IHaveConnectedTextures) swapModels(modelRegistry, blockModelLocations, t -> new CTModel(t, (IHaveConnectedTextures) block)); - if (block instanceof IBlockWithColoredVertices) + if (block instanceof IHaveColoredVertices) swapModels(modelRegistry, blockModelLocations, - t -> new ColoredVertexModel(t, (IBlockWithColoredVertices) block)); + t -> new ColoredVertexModel(t, (IHaveColoredVertices) block)); } diff --git a/src/main/java/com/simibubi/create/CreateItemGroup.java b/src/main/java/com/simibubi/create/CreateItemGroup.java index f8e8667ae..7ad84b05f 100644 --- a/src/main/java/com/simibubi/create/CreateItemGroup.java +++ b/src/main/java/com/simibubi/create/CreateItemGroup.java @@ -1,6 +1,6 @@ package com.simibubi.create; -import com.simibubi.create.foundation.block.IWithoutBlockItem; +import com.simibubi.create.foundation.block.IHaveNoBlockItem; import com.simibubi.create.foundation.item.IAddedByOther; import net.minecraft.block.Block; @@ -32,7 +32,7 @@ public final class CreateItemGroup extends ItemGroup { continue; if (!block.module.isEnabled()) continue; - if (block.get() instanceof IWithoutBlockItem) + if (block.get() instanceof IHaveNoBlockItem) continue; if (block.get() instanceof IAddedByOther) continue; diff --git a/src/main/java/com/simibubi/create/foundation/block/ColoredVertexModel.java b/src/main/java/com/simibubi/create/foundation/block/ColoredVertexModel.java index 1a19e2598..a78379c27 100644 --- a/src/main/java/com/simibubi/create/foundation/block/ColoredVertexModel.java +++ b/src/main/java/com/simibubi/create/foundation/block/ColoredVertexModel.java @@ -19,10 +19,10 @@ import net.minecraftforge.client.model.data.ModelProperty; public class ColoredVertexModel extends BakedModelWrapper { - private IBlockWithColoredVertices colorer; + private IHaveColoredVertices colorer; private static ModelProperty POSITION_PROPERTY = new ModelProperty<>(); - public ColoredVertexModel(IBakedModel originalModel, IBlockWithColoredVertices colorer) { + public ColoredVertexModel(IBakedModel originalModel, IHaveColoredVertices colorer) { super(originalModel); this.colorer = colorer; } diff --git a/src/main/java/com/simibubi/create/foundation/block/IBlockWithColorHandler.java b/src/main/java/com/simibubi/create/foundation/block/IHaveColorHandler.java similarity index 77% rename from src/main/java/com/simibubi/create/foundation/block/IBlockWithColorHandler.java rename to src/main/java/com/simibubi/create/foundation/block/IHaveColorHandler.java index bf44b1bf5..51149816a 100644 --- a/src/main/java/com/simibubi/create/foundation/block/IBlockWithColorHandler.java +++ b/src/main/java/com/simibubi/create/foundation/block/IHaveColorHandler.java @@ -2,7 +2,7 @@ package com.simibubi.create.foundation.block; import net.minecraft.client.renderer.color.IBlockColor; -public interface IBlockWithColorHandler { +public interface IHaveColorHandler { public IBlockColor getColorHandler(); diff --git a/src/main/java/com/simibubi/create/foundation/block/IBlockWithColoredVertices.java b/src/main/java/com/simibubi/create/foundation/block/IHaveColoredVertices.java similarity index 68% rename from src/main/java/com/simibubi/create/foundation/block/IBlockWithColoredVertices.java rename to src/main/java/com/simibubi/create/foundation/block/IHaveColoredVertices.java index d1fbe7645..affbb3024 100644 --- a/src/main/java/com/simibubi/create/foundation/block/IBlockWithColoredVertices.java +++ b/src/main/java/com/simibubi/create/foundation/block/IHaveColoredVertices.java @@ -1,6 +1,6 @@ package com.simibubi.create.foundation.block; -public interface IBlockWithColoredVertices { +public interface IHaveColoredVertices { public int getColor(float x, float y, float z); diff --git a/src/main/java/com/simibubi/create/foundation/block/IHaveCustomBlockItem.java b/src/main/java/com/simibubi/create/foundation/block/IHaveCustomBlockItem.java new file mode 100644 index 000000000..857fb50c6 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/block/IHaveCustomBlockItem.java @@ -0,0 +1,10 @@ +package com.simibubi.create.foundation.block; + +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item.Properties; + +public interface IHaveCustomBlockItem { + + public BlockItem getCustomItem(Properties properties); + +} diff --git a/src/main/java/com/simibubi/create/foundation/block/IWithoutBlockItem.java b/src/main/java/com/simibubi/create/foundation/block/IHaveNoBlockItem.java similarity index 75% rename from src/main/java/com/simibubi/create/foundation/block/IWithoutBlockItem.java rename to src/main/java/com/simibubi/create/foundation/block/IHaveNoBlockItem.java index 6c01df08b..b3a8b7183 100644 --- a/src/main/java/com/simibubi/create/foundation/block/IWithoutBlockItem.java +++ b/src/main/java/com/simibubi/create/foundation/block/IHaveNoBlockItem.java @@ -3,6 +3,6 @@ package com.simibubi.create.foundation.block; /** * Blocks only registered for use outside of the inventory */ -public interface IWithoutBlockItem { +public interface IHaveNoBlockItem { } diff --git a/src/main/java/com/simibubi/create/foundation/block/IBlockWithScrollableValue.java b/src/main/java/com/simibubi/create/foundation/block/IHaveScrollableValue.java similarity index 96% rename from src/main/java/com/simibubi/create/foundation/block/IBlockWithScrollableValue.java rename to src/main/java/com/simibubi/create/foundation/block/IHaveScrollableValue.java index 3d064a79d..9c0086dbb 100644 --- a/src/main/java/com/simibubi/create/foundation/block/IBlockWithScrollableValue.java +++ b/src/main/java/com/simibubi/create/foundation/block/IHaveScrollableValue.java @@ -29,7 +29,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; @EventBusSubscriber(value = Dist.CLIENT) -public interface IBlockWithScrollableValue { +public interface IHaveScrollableValue { public static final AxisAlignedBB VALUE_BB = new AxisAlignedBB(0, 0, 0, 2 / 16f, 6 / 16f, 6 / 16f); @@ -71,12 +71,12 @@ public interface IBlockWithScrollableValue { BlockPos blockPos = result.getPos(); BlockState state = world.getBlockState(blockPos); - if (!(state.getBlock() instanceof IBlockWithScrollableValue)) + if (!(state.getBlock() instanceof IHaveScrollableValue)) return; if (!mc.player.isAllowEdit()) return; - IBlockWithScrollableValue block = (IBlockWithScrollableValue) state.getBlock(); + IHaveScrollableValue block = (IHaveScrollableValue) state.getBlock(); Vec3d pos = new Vec3d(blockPos); if (block.requiresWrench() && !AllItems.WRENCH.typeOf(mc.player.getHeldItemMainhand())) @@ -193,12 +193,12 @@ public interface IBlockWithScrollableValue { BlockPos blockPos = result.getPos(); BlockState state = world.getBlockState(blockPos); - if (!(state.getBlock() instanceof IBlockWithScrollableValue)) + if (!(state.getBlock() instanceof IHaveScrollableValue)) return false; if (!mc.player.isAllowEdit()) return false; - IBlockWithScrollableValue block = (IBlockWithScrollableValue) state.getBlock(); + IHaveScrollableValue block = (IHaveScrollableValue) state.getBlock(); if (block.requiresWrench() && !AllItems.WRENCH.typeOf(mc.player.getHeldItemMainhand())) return false; diff --git a/src/main/java/com/simibubi/create/foundation/block/IRenderUtilityBlock.java b/src/main/java/com/simibubi/create/foundation/block/IRenderUtilityBlock.java index da73fdf92..8cf942db3 100644 --- a/src/main/java/com/simibubi/create/foundation/block/IRenderUtilityBlock.java +++ b/src/main/java/com/simibubi/create/foundation/block/IRenderUtilityBlock.java @@ -3,6 +3,6 @@ package com.simibubi.create.foundation.block; /** * Blocks only registered for use in other blocks' renderers. */ -public interface IRenderUtilityBlock extends IWithoutBlockItem { +public interface IRenderUtilityBlock extends IHaveNoBlockItem { } diff --git a/src/main/java/com/simibubi/create/foundation/utility/AllShapes.java b/src/main/java/com/simibubi/create/foundation/utility/AllShapes.java index bff2ba8e5..202d72d78 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/AllShapes.java +++ b/src/main/java/com/simibubi/create/foundation/utility/AllShapes.java @@ -23,8 +23,9 @@ public class AllShapes { MOTOR_BLOCK = VoxelShaper.forHorizontal(makeCuboidShape(0, 3, 3, 16, 13, 13), Direction.EAST), FOUR_VOXEL_POLE = VoxelShaper.forDirectionalAxis(makeCuboidShape(6, 0, 6, 10, 16, 10), Direction.Axis.Y), SIX_VOXEL_POLE = VoxelShaper.forDirectionalAxis(makeCuboidShape(5, 0, 5, 11, 16, 11), Direction.Axis.Y), - BELT_FUNNEL = VoxelShaper.forHorizontal(makeCuboidShape(3, -4, 11, 13, 8, 17), Direction.SOUTH), - BELT_EXTRACTOR = VoxelShaper.forHorizontal(makeCuboidShape(4, 2, 11, 12, 10, 17), Direction.SOUTH) + FUNNEL = VoxelShaper.forDirectional(makeCuboidShape(3, -4, 11, 13, 8, 17), Direction.SOUTH), + EXTRACTOR = VoxelShaper.forDirectional(makeCuboidShape(4, 2, 11, 12, 10, 17), Direction.SOUTH) + .withVerticalShapes(makeCuboidShape(4, 11, 4, 12, 17, 12)) ; diff --git a/src/main/java/com/simibubi/create/foundation/utility/AngleHelper.java b/src/main/java/com/simibubi/create/foundation/utility/AngleHelper.java new file mode 100644 index 000000000..d6c6c9fb9 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/utility/AngleHelper.java @@ -0,0 +1,15 @@ +package com.simibubi.create.foundation.utility; + +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; + +public class AngleHelper { + + public static float horizontalAngle(Direction facing) { + float angle = facing.getHorizontalAngle(); + if (facing.getAxis() == Axis.X) + angle = -angle; + return angle; + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java b/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java index 02ae74fc2..1b324c456 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/VecHelper.java @@ -6,6 +6,7 @@ import net.minecraft.nbt.DoubleNBT; import net.minecraft.nbt.ListNBT; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; +import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3i; @@ -16,6 +17,11 @@ public class VecHelper { return rotate(rotate(rotate(vec, xRot, Axis.X), yRot, Axis.Y), zRot, Axis.Z); } + public static Vec3d rotateCentered(Vec3d vec, double deg, Axis axis) { + Vec3d shift = getCenterOf(BlockPos.ZERO); + return VecHelper.rotate(vec.subtract(shift), deg, axis).add(shift); + } + public static Vec3d rotate(Vec3d vec, double deg, Axis axis) { if (deg == 0) return vec; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/chassis/AbstractChassisBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/chassis/AbstractChassisBlock.java index dc727477b..88b8058b4 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/chassis/AbstractChassisBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/chassis/AbstractChassisBlock.java @@ -2,7 +2,7 @@ package com.simibubi.create.modules.contraptions.components.contraptions.chassis import java.util.List; -import com.simibubi.create.foundation.block.IBlockWithScrollableValue; +import com.simibubi.create.foundation.block.IHaveScrollableValue; import com.simibubi.create.foundation.block.IWithTileEntity; import com.simibubi.create.foundation.utility.Lang; @@ -28,7 +28,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.Tags; public abstract class AbstractChassisBlock extends RotatedPillarBlock - implements IWithTileEntity, IBlockWithScrollableValue { + implements IWithTileEntity, IHaveScrollableValue { private static final Vec3d valuePos = new Vec3d(15 / 16f, 9 / 16f, 9 / 16f); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonHeadBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonHeadBlock.java index 3bcb070c5..9540617e5 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonHeadBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonHeadBlock.java @@ -2,7 +2,7 @@ package com.simibubi.create.modules.contraptions.components.contraptions.piston; import com.simibubi.create.AllBlocks; import com.simibubi.create.CreateConfig; -import com.simibubi.create.foundation.block.IWithoutBlockItem; +import com.simibubi.create.foundation.block.IHaveNoBlockItem; import com.simibubi.create.foundation.block.ProperDirectionalBlock; import com.simibubi.create.foundation.utility.AllShapes; import com.simibubi.create.modules.contraptions.components.contraptions.piston.MechanicalPistonBlock.PistonState; @@ -24,7 +24,7 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -public class MechanicalPistonHeadBlock extends ProperDirectionalBlock implements IWithoutBlockItem { +public class MechanicalPistonHeadBlock extends ProperDirectionalBlock implements IHaveNoBlockItem { public static final EnumProperty TYPE = BlockStateProperties.PISTON_TYPE; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerBlock.java index 41e67e414..036718abe 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerBlock.java @@ -3,7 +3,7 @@ package com.simibubi.create.modules.contraptions.components.crusher; import java.util.Random; import com.simibubi.create.AllBlocks; -import com.simibubi.create.foundation.block.IWithoutBlockItem; +import com.simibubi.create.foundation.block.IHaveNoBlockItem; import com.simibubi.create.modules.contraptions.base.KineticTileEntity; import net.minecraft.block.Block; @@ -28,7 +28,7 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; -public class CrushingWheelControllerBlock extends Block implements IWithoutBlockItem { +public class CrushingWheelControllerBlock extends Block implements IHaveNoBlockItem { public static final BooleanProperty VALID = BooleanProperty.create("valid"); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java index a0084c422..a37295810 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java @@ -1,7 +1,8 @@ package com.simibubi.create.modules.contraptions.components.mixer; import com.simibubi.create.AllBlocks; -import com.simibubi.create.foundation.block.IBlockWithScrollableValue; +import com.simibubi.create.foundation.block.IHaveCustomBlockItem; +import com.simibubi.create.foundation.block.IHaveScrollableValue; import com.simibubi.create.foundation.block.IWithTileEntity; import com.simibubi.create.foundation.utility.AllShapes; import com.simibubi.create.foundation.utility.Lang; @@ -26,7 +27,7 @@ import net.minecraft.world.IWorld; import net.minecraft.world.World; public class MechanicalMixerBlock extends KineticBlock - implements IWithTileEntity, IBlockWithScrollableValue { + implements IWithTileEntity, IHaveScrollableValue, IHaveCustomBlockItem { private static final Vec3d valuePos = new Vec3d(15.8f / 16f, 6 / 16f, 5 / 16f); @@ -137,7 +138,7 @@ public class MechanicalMixerBlock extends KineticBlock return 0; return tileEntity.currentValue; } - + @Override public float getParticleTargetRadius() { return .85f; @@ -147,10 +148,15 @@ public class MechanicalMixerBlock extends KineticBlock public float getParticleInitialRadius() { return .75f; } - + @Override public SpeedLevel getMinimumRequiredSpeedLevel() { return SpeedLevel.MEDIUM; } + @Override + public BlockItem getCustomItem(net.minecraft.item.Item.Properties properties) { + return new MechanicalMixerBlockItem(properties); + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/motor/MotorBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/motor/MotorBlock.java index adb577821..4605e6717 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/motor/MotorBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/motor/MotorBlock.java @@ -1,6 +1,6 @@ package com.simibubi.create.modules.contraptions.components.motor; -import com.simibubi.create.foundation.block.IBlockWithScrollableValue; +import com.simibubi.create.foundation.block.IHaveScrollableValue; import com.simibubi.create.foundation.block.IWithTileEntity; import com.simibubi.create.foundation.utility.AllShapes; import com.simibubi.create.foundation.utility.Lang; @@ -20,7 +20,7 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; -public class MotorBlock extends HorizontalKineticBlock implements IWithTileEntity, IBlockWithScrollableValue { +public class MotorBlock extends HorizontalKineticBlock implements IWithTileEntity, IHaveScrollableValue { private static final Vec3d valuePos = new Vec3d(15 / 16f, 5 / 16f, 5 / 16f); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java index d8bbaa93f..a7217e99e 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java @@ -4,7 +4,7 @@ import com.simibubi.create.foundation.block.IWithTileEntity; import com.simibubi.create.foundation.utility.AllShapes; import com.simibubi.create.modules.contraptions.base.DirectionalAxisKineticBlock; import com.simibubi.create.modules.contraptions.components.contraptions.IHaveMovementBehavior; -import com.simibubi.create.modules.logistics.block.IBlockWithFilter; +import com.simibubi.create.modules.logistics.block.IHaveFilterSlot; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -34,7 +34,7 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.World; public class SawBlock extends DirectionalAxisKineticBlock - implements IWithTileEntity, IHaveMovementBehavior, IBlockWithFilter { + implements IWithTileEntity, IHaveMovementBehavior, IHaveFilterSlot { public static final BooleanProperty RUNNING = BooleanProperty.create("running"); public static DamageSource damageSourceSaw = new DamageSource("create.saw").setDamageBypassesArmor(); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java index 50af383cf..2f0b5f82d 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java @@ -7,7 +7,7 @@ import java.util.List; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; import com.simibubi.create.foundation.block.IWithTileEntity; -import com.simibubi.create.foundation.block.IWithoutBlockItem; +import com.simibubi.create.foundation.block.IHaveNoBlockItem; import com.simibubi.create.foundation.utility.AllShapes; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock; @@ -51,7 +51,7 @@ import net.minecraftforge.common.Tags; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; -public class BeltBlock extends HorizontalKineticBlock implements IWithoutBlockItem, IWithTileEntity { +public class BeltBlock extends HorizontalKineticBlock implements IHaveNoBlockItem, IWithTileEntity { public static final IProperty SLOPE = EnumProperty.create("slope", Slope.class); public static final IProperty PART = EnumProperty.create("part", Part.class); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/elementary/ShaftHalfBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/elementary/ShaftHalfBlock.java index 8c459ecf5..d32725587 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/elementary/ShaftHalfBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/elementary/ShaftHalfBlock.java @@ -1,11 +1,11 @@ package com.simibubi.create.modules.contraptions.relays.elementary; -import com.simibubi.create.foundation.block.IWithoutBlockItem; +import com.simibubi.create.foundation.block.IHaveNoBlockItem; import com.simibubi.create.foundation.block.ProperDirectionalBlock; import net.minecraft.block.Blocks; -public class ShaftHalfBlock extends ProperDirectionalBlock implements IWithoutBlockItem { +public class ShaftHalfBlock extends ProperDirectionalBlock implements IHaveNoBlockItem { public ShaftHalfBlock() { super(Properties.from(Blocks.AIR)); diff --git a/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockBlock.java b/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockBlock.java index 08ea23e6b..40b9c0a72 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockBlock.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/partialWindows/WindowInABlockBlock.java @@ -5,7 +5,7 @@ import java.util.Collections; import java.util.List; import com.simibubi.create.foundation.block.IWithTileEntity; -import com.simibubi.create.foundation.block.IWithoutBlockItem; +import com.simibubi.create.foundation.block.IHaveNoBlockItem; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -44,7 +44,7 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; public class WindowInABlockBlock extends PaneBlock - implements IWithTileEntity, IWithoutBlockItem { + implements IWithTileEntity, IHaveNoBlockItem { public WindowInABlockBlock() { super(Properties.create(Material.ROCK)); diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/FilteredTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/logistics/block/FilteredTileEntityRenderer.java index 14a69a4fa..aacbe7e30 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/FilteredTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/FilteredTileEntityRenderer.java @@ -21,7 +21,7 @@ public class FilteredTileEntityRenderer { public static void render(T tileEntityIn, double x, double y, double z, float partialTicks, int destroyStage) { BlockState state = tileEntityIn.getBlockState(); - IBlockWithFilter block = (IBlockWithFilter) state.getBlock(); + IHaveFilterSlot block = (IHaveFilterSlot) state.getBlock(); if (!block.isFilterVisible(state)) return; diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/IBlockWithFilter.java b/src/main/java/com/simibubi/create/modules/logistics/block/IHaveFilterSlot.java similarity index 93% rename from src/main/java/com/simibubi/create/modules/logistics/block/IBlockWithFilter.java rename to src/main/java/com/simibubi/create/modules/logistics/block/IHaveFilterSlot.java index 9cd4aff1c..7ca63e893 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/IBlockWithFilter.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/IHaveFilterSlot.java @@ -1,6 +1,7 @@ package com.simibubi.create.modules.logistics.block; import com.mojang.blaze3d.platform.GlStateManager; +import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.TessellatorHelper; @@ -16,7 +17,6 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; -import net.minecraft.util.Direction.Axis; import net.minecraft.util.Hand; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; @@ -31,7 +31,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; @EventBusSubscriber(value = Dist.CLIENT) -public interface IBlockWithFilter { +public interface IHaveFilterSlot { public Vec3d getFilterPosition(BlockState state); @@ -88,14 +88,14 @@ public interface IBlockWithFilter { BlockPos pos = result.getPos(); BlockState state = world.getBlockState(pos); - if (!(state.getBlock() instanceof IBlockWithFilter)) + if (!(state.getBlock() instanceof IHaveFilterSlot)) return; TileEntity te = world.getTileEntity(pos); if (te == null || !(te instanceof IHaveFilter)) return; IHaveFilter actor = (IHaveFilter) te; - IBlockWithFilter filterBlock = (IBlockWithFilter) state.getBlock(); + IHaveFilterSlot filterBlock = (IHaveFilterSlot) state.getBlock(); if (!filterBlock.isFilterVisible(state)) return; @@ -142,17 +142,17 @@ public interface IBlockWithFilter { tessellator.draw(); - GlStateManager.popMatrix(); GlStateManager.enableTexture(); GlStateManager.depthMask(true); if (contains) { float textScale = 1 / 128f; GlStateManager.translated(position.x, position.y, position.z); - GlStateManager.rotated(facing.getHorizontalAngle() * (facing.getAxis() == Axis.X ? -1 : 1), 0, 1, 0); + GlStateManager.translated(center.x, center.y, center.z); GlStateManager.scaled(textScale, -textScale, textScale); + GlStateManager.rotated(AngleHelper.horizontalAngle(facing), 0, 1, 0); GlStateManager.translated(17.5f, -5f, -5f); - GlStateManager.rotated(90 - filterAngle, 1, 0, 0); + GlStateManager.rotated(90, 1, 0, 0); String text = Lang.translate("logistics.filter"); FontRenderer font = Minecraft.getInstance().fontRenderer; @@ -169,7 +169,9 @@ public interface IBlockWithFilter { font.drawString(count, 1, 1, 0x4F4F4F); } } + GlStateManager.disableBlend(); + GlStateManager.popMatrix(); GlStateManager.lineWidth(1); TessellatorHelper.cleanUpAfterDrawing(); diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltFunnelBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltFunnelBlock.java index 1e23564d3..94742b1f5 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltFunnelBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/BeltFunnelBlock.java @@ -13,7 +13,7 @@ import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.I import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock; import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.modules.contraptions.relays.belt.TransportedItemStack; -import com.simibubi.create.modules.logistics.block.IBlockWithFilter; +import com.simibubi.create.modules.logistics.block.IHaveFilterSlot; import com.simibubi.create.modules.logistics.block.IInventoryManipulator; import net.minecraft.block.Block; @@ -39,7 +39,7 @@ import net.minecraft.world.IWorld; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -public class BeltFunnelBlock extends HorizontalBlock implements IBeltAttachment, IWithTileEntity, IBlockWithFilter { +public class BeltFunnelBlock extends HorizontalBlock implements IBeltAttachment, IWithTileEntity, IHaveFilterSlot { public BeltFunnelBlock() { super(Properties.from(Blocks.ANDESITE)); @@ -101,7 +101,7 @@ public class BeltFunnelBlock extends HorizontalBlock implements IBeltAttachment, @Override public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return AllShapes.BELT_FUNNEL.get(state.get(HORIZONTAL_FACING)); + return AllShapes.FUNNEL.get(state.get(HORIZONTAL_FACING)); } @Override diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/EntityDetectorBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/EntityDetectorBlock.java index c34911991..0168ec275 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/EntityDetectorBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/EntityDetectorBlock.java @@ -15,7 +15,7 @@ import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Part; import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Slope; import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.modules.contraptions.relays.belt.TransportedItemStack; -import com.simibubi.create.modules.logistics.block.IBlockWithFilter; +import com.simibubi.create.modules.logistics.block.IHaveFilterSlot; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -41,7 +41,7 @@ import net.minecraft.world.IWorld; import net.minecraft.world.World; public class EntityDetectorBlock extends HorizontalBlock - implements IWithTileEntity, IBeltAttachment, IBlockWithFilter { + implements IWithTileEntity, IBeltAttachment, IHaveFilterSlot { public static BooleanProperty POWERED = BlockStateProperties.POWERED; public static BooleanProperty BELT = BooleanProperty.create("belt"); diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/ExtractorBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/ExtractorBlock.java index 87ef33384..0318b43dc 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/ExtractorBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/ExtractorBlock.java @@ -5,10 +5,11 @@ import java.util.List; import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.utility.AllShapes; +import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock; -import com.simibubi.create.modules.logistics.block.IBlockWithFilter; import com.simibubi.create.modules.logistics.block.IExtractor; +import com.simibubi.create.modules.logistics.block.IHaveFilterSlot; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -33,15 +34,15 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter { +public class ExtractorBlock extends HorizontalBlock implements IHaveFilterSlot { public static BooleanProperty POWERED = BlockStateProperties.POWERED; - private static final List itemPositions = new ArrayList<>(Direction.values().length); + protected static final List filterLocations = new ArrayList<>(); public ExtractorBlock() { super(Properties.from(Blocks.ANDESITE)); setDefaultState(getDefaultState().with(POWERED, false)); - cacheItemPositions(); + cacheFilterLocations(); } @Override @@ -78,6 +79,8 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter if (context.getFace().getAxis().isHorizontal()) { state = state.with(HORIZONTAL_FACING, context.getFace().getOpposite()); } else { + state = AllBlocks.VERTICAL_EXTRACTOR.get().getDefaultState(); + state = state.with(VerticalExtractorBlock.UPWARD, context.getFace() != Direction.UP); state = state.with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing()); } @@ -91,7 +94,7 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter @Override public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) { - Direction facing = state.get(HORIZONTAL_FACING); + Direction facing = getBlockFacing(state); BlockPos neighbourPos = pos.offset(facing); BlockState neighbour = worldIn.getBlockState(neighbourPos); @@ -119,7 +122,7 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter } private boolean isObserving(BlockState state, BlockPos pos, BlockPos observing) { - return observing.equals(pos.offset(state.get(HORIZONTAL_FACING))); + return observing.equals(pos.offset(getBlockFacing(state))); } @Override @@ -128,7 +131,7 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter if (worldIn.isRemote) return; - Direction blockFacing = state.get(HORIZONTAL_FACING); + Direction blockFacing = getBlockFacing(state); if (fromPos.equals(pos.offset(blockFacing))) { if (!isValidPosition(state, worldIn, pos)) { worldIn.destroyBlock(pos, true); @@ -146,29 +149,28 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter } } - @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return AllShapes.BELT_EXTRACTOR.get(state.get(HORIZONTAL_FACING)); + public Direction getBlockFacing(BlockState state) { + return state.get(HORIZONTAL_FACING); } - private void cacheItemPositions() { - itemPositions.clear(); + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return AllShapes.EXTRACTOR.get(getBlockFacing(state)); + } - Vec3d position = Vec3d.ZERO; - Vec3d shift = VecHelper.getCenterOf(BlockPos.ZERO); - float zFightOffset = 1 / 128f; + private void cacheFilterLocations() { + filterLocations.clear(); + float e = 1 / 128f; + Vec3d offsetForHorizontal = new Vec3d(8f / 16f, 10.5f / 16f + e, 2f / 16f); + Vec3d offsetForUpward = new Vec3d(8f / 16f, 14.15f / 16f - e, 12.75f / 16f); + Vec3d offsetForDownward = new Vec3d(8f / 16f, 1.85f / 16f + e, 12.75f / 16f); - for (int i = 0; i < 4; i++) { - Direction facing = Direction.byHorizontalIndex(i); - position = new Vec3d(8f / 16f + zFightOffset, 10.5f / 16f, 2.25f / 16f); - - float angle = facing.getHorizontalAngle(); - if (facing.getAxis() == Axis.X) - angle = -angle; - - position = VecHelper.rotate(position.subtract(shift), angle, Axis.Y).add(shift); - - itemPositions.add(position); + for (Vec3d offset : new Vec3d[] { offsetForHorizontal, offsetForUpward, offsetForDownward }) { + for (int i = 0; i < 4; i++) { + Direction facing = Direction.byHorizontalIndex(i); + float angle = AngleHelper.horizontalAngle(facing); + filterLocations.add(VecHelper.rotateCentered(offset, angle, Axis.Y)); + } } } @@ -180,7 +182,7 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter @Override public Vec3d getFilterPosition(BlockState state) { Direction facing = state.get(HORIZONTAL_FACING).getOpposite(); - return itemPositions.get(facing.getHorizontalIndex()); + return filterLocations.get(facing.getHorizontalIndex()); } @Override @@ -193,4 +195,8 @@ public class ExtractorBlock extends HorizontalBlock implements IBlockWithFilter return PushReaction.BLOCK; } + public float getFilterAngle(BlockState state) { + return getBlockFacing(state).getAxis().isHorizontal() ? 0 : 90; + } + } diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/ExtractorTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/ExtractorTileEntity.java index 0181e24a4..c5732c1ea 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/ExtractorTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/ExtractorTileEntity.java @@ -6,9 +6,10 @@ import com.simibubi.create.foundation.block.SyncedTileEntity; import com.simibubi.create.modules.logistics.block.IExtractor; import com.simibubi.create.modules.logistics.block.IHaveFilter; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; -import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.ITickableTileEntity; import net.minecraft.util.math.BlockPos; import net.minecraftforge.common.util.LazyOptional; @@ -82,7 +83,11 @@ public class ExtractorTileEntity extends SyncedTileEntity implements IExtractor, @Override public BlockPos getInventoryPos() { - return getPos().offset(getBlockState().get(BlockStateProperties.HORIZONTAL_FACING)); + BlockState blockState = getBlockState(); + Block block = blockState.getBlock(); + if (!(block instanceof ExtractorBlock)) + return null; + return getPos().offset(((ExtractorBlock) block).getBlockFacing(blockState)); } @Override diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/LinkedExtractorBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/LinkedExtractorBlock.java index de2d81a84..f30c97f71 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/LinkedExtractorBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/LinkedExtractorBlock.java @@ -5,6 +5,8 @@ import java.util.List; import org.apache.commons.lang3.tuple.Pair; +import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.modules.logistics.block.IBlockWithFrequency; @@ -25,11 +27,11 @@ import net.minecraft.world.World; public class LinkedExtractorBlock extends ExtractorBlock implements IBlockWithFrequency { - private static final List> itemPositions = new ArrayList<>(Direction.values().length); + private static final List> linkItemLocations = new ArrayList<>(); public LinkedExtractorBlock() { super(); - cacheItemPositions(); + cacheLinkItemLocations(); } @Override @@ -41,7 +43,7 @@ public class LinkedExtractorBlock extends ExtractorBlock implements IBlockWithFr public boolean hasTileEntity(BlockState state) { return true; } - + @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { return new LinkedExtractorTileEntity(); @@ -49,12 +51,32 @@ public class LinkedExtractorBlock extends ExtractorBlock implements IBlockWithFr @Override public BlockState getStateForPlacement(BlockItemUseContext context) { - return super.getStateForPlacement(context).with(POWERED, false); + BlockState state = getDefaultState(); + + if (context.getFace().getAxis().isHorizontal()) { + state = state.with(HORIZONTAL_FACING, context.getFace().getOpposite()); + } else { + state = AllBlocks.VERTICAL_LINKED_EXTRACTOR.get().getDefaultState(); + state = state.with(VerticalExtractorBlock.UPWARD, context.getFace() != Direction.UP); + state = state.with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing()); + } + + return state.with(POWERED, Boolean.valueOf(false)); } @Override public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean isMoving) { + if (worldIn.isRemote) + return; + + Direction blockFacing = getBlockFacing(state); + if (fromPos.equals(pos.offset(blockFacing))) { + if (!isValidPosition(state, worldIn, pos)) { + worldIn.destroyBlock(pos, true); + return; + } + } } @Override @@ -64,30 +86,30 @@ public class LinkedExtractorBlock extends ExtractorBlock implements IBlockWithFr || handleActivatedFrequencySlots(state, worldIn, pos, player, handIn, hit); } - private void cacheItemPositions() { - if (!itemPositions.isEmpty()) - return; + private void cacheLinkItemLocations() { + linkItemLocations.clear(); - Vec3d first = Vec3d.ZERO; - Vec3d second = Vec3d.ZERO; - Vec3d shift = VecHelper.getCenterOf(BlockPos.ZERO); float zFightOffset = 1 / 128f; + Vec3d first = new Vec3d(11.5f / 16f + zFightOffset, 4f / 16f, 14f / 16f); + Vec3d second = new Vec3d(11.5f / 16f + zFightOffset, 8f / 16f, 14f / 16f); + Vec3d firstUpward = new Vec3d(10f / 16f + zFightOffset, 14f / 16f, 11.5f / 16f); + Vec3d secondUpward = new Vec3d(6f / 16f + zFightOffset, 14f / 16f, 11.5f / 16f); + Vec3d firstDownward = new Vec3d(10f / 16f + zFightOffset, 2f / 16f, 11.5f / 16f); + Vec3d secondDownward = new Vec3d(6f / 16f + zFightOffset, 2f / 16f, 11.5f / 16f); + + cacheForAllSides(first, second); + cacheForAllSides(firstUpward, secondUpward); + cacheForAllSides(firstDownward, secondDownward); + } + + private void cacheForAllSides(Vec3d first, Vec3d second) { for (int i = 0; i < 4; i++) { Direction facing = Direction.byHorizontalIndex(i); - first = new Vec3d(11.5f / 16f + zFightOffset, 4f / 16f, 14f / 16f); - second = new Vec3d(11.5f / 16f + zFightOffset, 8f / 16f, 14f / 16f); - - float angle = facing.getHorizontalAngle(); - if (facing.getAxis() == Axis.X) - angle = -angle; - - first = VecHelper.rotate(first.subtract(shift), angle, Axis.Y).add(shift); - second = VecHelper.rotate(second.subtract(shift), angle, Axis.Y).add(shift); - - itemPositions.add(Pair.of(first, second)); + float angle = AngleHelper.horizontalAngle(facing); + linkItemLocations.add(Pair.of(VecHelper.rotateCentered(first, angle, Axis.Y), + VecHelper.rotateCentered(second, angle, Axis.Y))); } - } @Override @@ -98,12 +120,16 @@ public class LinkedExtractorBlock extends ExtractorBlock implements IBlockWithFr @Override public Pair getFrequencyItemPositions(BlockState state) { Direction facing = state.get(HORIZONTAL_FACING); - return itemPositions.get(facing.getHorizontalIndex()); + Direction extractorFacing = getBlockFacing(state); + int groupOffset = extractorFacing == Direction.UP ? 4 : extractorFacing == Direction.DOWN ? 8 : 0; + return linkItemLocations.get(groupOffset + facing.getHorizontalIndex()); } @Override public Direction getFrequencyItemFacing(BlockState state) { - return state.get(HORIZONTAL_FACING).rotateYCCW(); + if (getBlockFacing(state).getAxis().isHorizontal()) + return state.get(HORIZONTAL_FACING).rotateYCCW(); + return state.get(HORIZONTAL_FACING); } } diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/LinkedExtractorTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/LinkedExtractorTileEntity.java index fc4411843..76cbc2e2b 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/LinkedExtractorTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/LinkedExtractorTileEntity.java @@ -9,9 +9,10 @@ import com.simibubi.create.modules.logistics.block.IExtractor; import com.simibubi.create.modules.logistics.block.IHaveFilter; import com.simibubi.create.modules.logistics.block.LinkedTileEntity; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; -import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.ITickableTileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -35,13 +36,13 @@ public class LinkedExtractorTileEntity extends LinkedTileEntity inventory = LazyOptional.empty(); filter = ItemStack.EMPTY; } - + @Override public void onLoad() { super.onLoad(); initialize = true; } - + @Override public World getWirelessWorld() { return super.getWorld(); @@ -51,7 +52,7 @@ public class LinkedExtractorTileEntity extends LinkedTileEntity public void setSignal(boolean powered) { receivedSignal = powered; } - + @Override public void read(CompoundNBT compound) { filter = ItemStack.read(compound.getCompound("Filter")); @@ -59,14 +60,14 @@ public class LinkedExtractorTileEntity extends LinkedTileEntity setState(State.LOCKED); super.read(compound); } - + @Override public CompoundNBT write(CompoundNBT compound) { compound.put("Filter", filter.serializeNBT()); compound.putBoolean("Locked", getState() == State.LOCKED); return super.write(compound); } - + @Override public void tick() { if (initialize && hasWorld()) { @@ -75,9 +76,9 @@ public class LinkedExtractorTileEntity extends LinkedTileEntity neighborChanged(); initialize = false; } - + IExtractor.super.tick(); - + if (world.isRemote) return; if (receivedSignal != getBlockState().get(POWERED)) { @@ -108,7 +109,11 @@ public class LinkedExtractorTileEntity extends LinkedTileEntity @Override public BlockPos getInventoryPos() { - return getPos().offset(getBlockState().get(BlockStateProperties.HORIZONTAL_FACING)); + BlockState blockState = getBlockState(); + Block block = blockState.getBlock(); + if (!(block instanceof ExtractorBlock)) + return null; + return getPos().offset(((ExtractorBlock) block).getBlockFacing(blockState)); } @Override diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/VerticalExtractorBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/VerticalExtractorBlock.java new file mode 100644 index 000000000..5fe61d717 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/VerticalExtractorBlock.java @@ -0,0 +1,44 @@ +package com.simibubi.create.modules.logistics.block.belts; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.block.IHaveNoBlockItem; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer.Builder; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.Vec3d; + +public class VerticalExtractorBlock extends ExtractorBlock implements IHaveNoBlockItem { + + public static BooleanProperty UPWARD = BooleanProperty.create("upward"); + + public VerticalExtractorBlock() { + super(); + setDefaultState(getDefaultState().with(UPWARD, true)); + } + + @Override + protected void fillStateContainer(Builder builder) { + super.fillStateContainer(builder.add(UPWARD)); + } + + @Override + public Direction getBlockFacing(BlockState state) { + return state.get(UPWARD) ? Direction.UP : Direction.DOWN; + } + + @Override + public ResourceLocation getLootTable() { + return AllBlocks.EXTRACTOR.get().getLootTable(); + } + + @Override + public Vec3d getFilterPosition(BlockState state) { + Direction facing = state.get(HORIZONTAL_FACING).getOpposite(); + return filterLocations.get((state.get(UPWARD) ? 4 : 8) + facing.getHorizontalIndex()); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/VerticalLinkedExtractorBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/VerticalLinkedExtractorBlock.java new file mode 100644 index 000000000..450eafb0b --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/VerticalLinkedExtractorBlock.java @@ -0,0 +1,44 @@ +package com.simibubi.create.modules.logistics.block.belts; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.block.IHaveNoBlockItem; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer.Builder; +import net.minecraft.util.Direction; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.Vec3d; + +public class VerticalLinkedExtractorBlock extends LinkedExtractorBlock implements IHaveNoBlockItem { + + public static BooleanProperty UPWARD = BooleanProperty.create("upward"); + + public VerticalLinkedExtractorBlock() { + super(); + setDefaultState(getDefaultState().with(UPWARD, true)); + } + + @Override + protected void fillStateContainer(Builder builder) { + super.fillStateContainer(builder.add(UPWARD)); + } + + @Override + public Direction getBlockFacing(BlockState state) { + return state.get(UPWARD) ? Direction.UP : Direction.DOWN; + } + + @Override + public ResourceLocation getLootTable() { + return AllBlocks.LINKED_EXTRACTOR.get().getLootTable(); + } + + @Override + public Vec3d getFilterPosition(BlockState state) { + Direction facing = state.get(HORIZONTAL_FACING).getOpposite(); + return filterLocations.get((state.get(UPWARD) ? 4 : 8) + facing.getHorizontalIndex()); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterBlock.java index 9abbb3d76..3fe35e6f4 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterBlock.java @@ -1,6 +1,6 @@ package com.simibubi.create.modules.logistics.block.diodes; -import com.simibubi.create.foundation.block.IBlockWithScrollableValue; +import com.simibubi.create.foundation.block.IHaveScrollableValue; import com.simibubi.create.foundation.block.IWithTileEntity; import com.simibubi.create.foundation.utility.Lang; @@ -18,7 +18,7 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; public class FlexpeaterBlock extends RedstoneDiodeBlock - implements IWithTileEntity, IBlockWithScrollableValue { + implements IWithTileEntity, IHaveScrollableValue { public static BooleanProperty POWERING = BooleanProperty.create("powering"); private static Vec3d VALUE_POS = new Vec3d(2 / 16f, 5 / 16f, 5 / 16f); diff --git a/src/main/java/com/simibubi/create/modules/logistics/management/base/LogisticalControllerBlock.java b/src/main/java/com/simibubi/create/modules/logistics/management/base/LogisticalControllerBlock.java index 61a6acb64..ddc2d09bb 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/management/base/LogisticalControllerBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/management/base/LogisticalControllerBlock.java @@ -20,7 +20,7 @@ import com.simibubi.create.AllItems; import com.simibubi.create.Create; import com.simibubi.create.foundation.block.IWithContainer; import com.simibubi.create.foundation.block.IWithTileEntity; -import com.simibubi.create.foundation.block.IWithoutBlockItem; +import com.simibubi.create.foundation.block.IHaveNoBlockItem; import com.simibubi.create.foundation.block.RenderUtilityBlock; import com.simibubi.create.foundation.utility.AllShapes; import com.simibubi.create.modules.logistics.management.base.LogisticalCasingBlock.Part; @@ -59,7 +59,7 @@ import net.minecraft.world.World; import net.minecraftforge.fml.network.NetworkHooks; public class LogisticalControllerBlock extends DirectionalBlock - implements IWithoutBlockItem, IWithTileEntity { + implements IHaveNoBlockItem, IWithTileEntity { public static final IProperty TYPE = EnumProperty.create("type", Type.class); diff --git a/src/main/java/com/simibubi/create/modules/logistics/management/index/LogisticalIndexBlock.java b/src/main/java/com/simibubi/create/modules/logistics/management/index/LogisticalIndexBlock.java index 91a8b7de2..3f4f16475 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/management/index/LogisticalIndexBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/management/index/LogisticalIndexBlock.java @@ -1,7 +1,7 @@ package com.simibubi.create.modules.logistics.management.index; import com.simibubi.create.AllItems; -import com.simibubi.create.foundation.block.IBlockWithColorHandler; +import com.simibubi.create.foundation.block.IHaveColorHandler; import com.simibubi.create.foundation.block.IWithTileEntity; import com.simibubi.create.foundation.utility.AllShapes; @@ -32,7 +32,7 @@ import net.minecraft.world.World; import net.minecraftforge.fml.network.NetworkHooks; public class LogisticalIndexBlock extends HorizontalBlock - implements IBlockWithColorHandler, IWithTileEntity { + implements IHaveColorHandler, IWithTileEntity { public LogisticalIndexBlock() { super(Properties.from(Blocks.GRANITE)); diff --git a/src/main/java/com/simibubi/create/modules/palettes/VolcanicRockBlock.java b/src/main/java/com/simibubi/create/modules/palettes/VolcanicRockBlock.java index 13edbc121..c877130aa 100644 --- a/src/main/java/com/simibubi/create/modules/palettes/VolcanicRockBlock.java +++ b/src/main/java/com/simibubi/create/modules/palettes/VolcanicRockBlock.java @@ -1,6 +1,6 @@ package com.simibubi.create.modules.palettes; -import com.simibubi.create.foundation.block.IBlockWithColoredVertices; +import com.simibubi.create.foundation.block.IHaveColoredVertices; import com.simibubi.create.foundation.utility.ColorHelper; import net.minecraft.block.Block; @@ -10,7 +10,7 @@ import net.minecraft.block.material.MaterialColor; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; -public class VolcanicRockBlock extends Block implements IBlockWithColoredVertices { +public class VolcanicRockBlock extends Block implements IHaveColoredVertices { public VolcanicRockBlock() { super(Properties.from(Blocks.ANDESITE)); diff --git a/src/main/resources/assets/create/blockstates/extractor.json b/src/main/resources/assets/create/blockstates/extractor.json index eb1574f3d..be1a12d74 100644 --- a/src/main/resources/assets/create/blockstates/extractor.json +++ b/src/main/resources/assets/create/blockstates/extractor.json @@ -1,12 +1,9 @@ { "forge_marker": 1, - "defaults": { - "model": "create:block/extractor" - }, "variants": { "powered": { - "true": { "model": "create:block/extractor_powered" }, - "false": { "model": "create:block/extractor" } + "true": { "model": "create:block/extractor/horizontal_powered" }, + "false": { "model": "create:block/extractor/horizontal" } }, "facing": { "south": { "y": 180 }, diff --git a/src/main/resources/assets/create/blockstates/linked_extractor.json b/src/main/resources/assets/create/blockstates/linked_extractor.json index c526fed81..3772599b4 100644 --- a/src/main/resources/assets/create/blockstates/linked_extractor.json +++ b/src/main/resources/assets/create/blockstates/linked_extractor.json @@ -1,12 +1,9 @@ { "forge_marker": 1, - "defaults": { - "model": "create:block/extractor_wireless" - }, "variants": { "powered": { - "true": { "model": "create:block/extractor_wireless_powered" }, - "false": { "model": "create:block/extractor_wireless" } + "true": { "model": "create:block/extractor/horizontal_wireless_powered" }, + "false": { "model": "create:block/extractor/horizontal_wireless" } }, "facing": { "south": { "y": 180 }, diff --git a/src/main/resources/assets/create/blockstates/vertical_extractor.json b/src/main/resources/assets/create/blockstates/vertical_extractor.json new file mode 100644 index 000000000..c3cc50c14 --- /dev/null +++ b/src/main/resources/assets/create/blockstates/vertical_extractor.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "create:block/extractor/vertical" + }, + "variants": { + + "powered=true,upward=false,facing=south": { "model": "create:block/extractor/vertical_powered", "y": 180 }, + "powered=true,upward=false,facing=east": { "model": "create:block/extractor/vertical_powered", "y": 90 }, + "powered=true,upward=false,facing=north": { "model": "create:block/extractor/vertical_powered", "y": 0 }, + "powered=true,upward=false,facing=west": { "model": "create:block/extractor/vertical_powered", "y": 270 }, + "powered=true,upward=true,facing=south": { "model": "create:block/extractor/vertical_powered", "y": 0, "x": 180 }, + "powered=true,upward=true,facing=east": { "model": "create:block/extractor/vertical_powered", "y": 270, "x": 180 }, + "powered=true,upward=true,facing=north": { "model": "create:block/extractor/vertical_powered", "y": 180, "x": 180 }, + "powered=true,upward=true,facing=west": { "model": "create:block/extractor/vertical_powered", "y": 90, "x": 180 }, + + "powered=false,upward=false,facing=south": { "y": 180 }, + "powered=false,upward=false,facing=east": { "y": 90 }, + "powered=false,upward=false,facing=north": { "y": 0 }, + "powered=false,upward=false,facing=west": { "y": 270 }, + "powered=false,upward=true,facing=south": { "y": 0, "x": 180 }, + "powered=false,upward=true,facing=east": { "y": 270, "x": 180 }, + "powered=false,upward=true,facing=north": { "y": 180, "x": 180 }, + "powered=false,upward=true,facing=west": { "y": 90, "x": 180 } + + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/blockstates/vertical_linked_extractor.json b/src/main/resources/assets/create/blockstates/vertical_linked_extractor.json new file mode 100644 index 000000000..7c4e84a8f --- /dev/null +++ b/src/main/resources/assets/create/blockstates/vertical_linked_extractor.json @@ -0,0 +1,27 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "create:block/extractor/vertical_wireless" + }, + "variants": { + + "powered=true,upward=false,facing=south": { "model": "create:block/extractor/vertical_wireless_powered", "y": 180 }, + "powered=true,upward=false,facing=east": { "model": "create:block/extractor/vertical_wireless_powered", "y": 90 }, + "powered=true,upward=false,facing=north": { "model": "create:block/extractor/vertical_wireless_powered", "y": 0 }, + "powered=true,upward=false,facing=west": { "model": "create:block/extractor/vertical_wireless_powered", "y": 270 }, + "powered=true,upward=true,facing=south": { "model": "create:block/extractor/vertical_wireless_powered", "y": 0, "x": 180 }, + "powered=true,upward=true,facing=east": { "model": "create:block/extractor/vertical_wireless_powered", "y": 270, "x": 180 }, + "powered=true,upward=true,facing=north": { "model": "create:block/extractor/vertical_wireless_powered", "y": 180, "x": 180 }, + "powered=true,upward=true,facing=west": { "model": "create:block/extractor/vertical_wireless_powered", "y": 90, "x": 180 }, + + "powered=false,upward=false,facing=south": { "y": 180 }, + "powered=false,upward=false,facing=east": { "y": 90 }, + "powered=false,upward=false,facing=north": { "y": 0 }, + "powered=false,upward=false,facing=west": { "y": 270 }, + "powered=false,upward=true,facing=south": { "y": 0, "x": 180 }, + "powered=false,upward=true,facing=east": { "y": 270, "x": 180 }, + "powered=false,upward=true,facing=north": { "y": 180, "x": 180 }, + "powered=false,upward=true,facing=west": { "y": 90, "x": 180 } + + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/extractor.json b/src/main/resources/assets/create/models/block/extractor/horizontal.json similarity index 84% rename from src/main/resources/assets/create/models/block/extractor.json rename to src/main/resources/assets/create/models/block/extractor/horizontal.json index 6ef918d7b..d7fab995c 100644 --- a/src/main/resources/assets/create/models/block/extractor.json +++ b/src/main/resources/assets/create/models/block/extractor/horizontal.json @@ -3,8 +3,8 @@ "parent": "block/block", "textures": { "1": "create:block/brass_casing", - "extractor": "create:block/extractor", - "particle": "create:block/extractor" + "particle": "create:block/extractor", + "extractor": "create:block/extractor" }, "elements": [ { @@ -66,15 +66,16 @@ }, { "name": "FilterSpot", - "from": [5, 10, -0.6], - "to": [11, 12, 4], - "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 11, -1]}, + "from": [5, 10, -1], + "to": [11, 11, 4], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 11, -1]}, "faces": { - "north": {"uv": [13, 1, 15, 7], "rotation": 90, "texture": "#extractor"}, - "east": {"uv": [0.1, 0, 4.7, 2], "rotation": 180, "texture": "#extractor"}, - "south": {"uv": [4, 1, 5, 7], "rotation": 270, "texture": "#extractor"}, - "west": {"uv": [0.1, 0, 4.7, 2], "texture": "#extractor"}, - "up": {"uv": [0, 9, 5, 15], "rotation": 90, "texture": "#extractor"} + "north": {"uv": [0, 9, 1, 15], "rotation": 90, "texture": "#extractor"}, + "east": {"uv": [0, 9, 5, 10], "rotation": 180, "texture": "#extractor"}, + "south": {"uv": [4, 9, 5, 15], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [0, 9, 5, 10], "texture": "#extractor"}, + "up": {"uv": [0, 9, 5, 15], "rotation": 90, "texture": "#extractor"}, + "down": {"uv": [0, 0, 0, 0], "texture": "#extractor"} } } ], diff --git a/src/main/resources/assets/create/models/block/extractor/horizontal_powered.json b/src/main/resources/assets/create/models/block/extractor/horizontal_powered.json new file mode 100644 index 000000000..c5dff3e17 --- /dev/null +++ b/src/main/resources/assets/create/models/block/extractor/horizontal_powered.json @@ -0,0 +1,7 @@ +{ + "parent": "create:block/extractor/horizontal", + "textures": { + "extractor": "create:block/extractor_powered", + "particle": "create:block/extractor_powered" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/extractor_wireless.json b/src/main/resources/assets/create/models/block/extractor/horizontal_wireless.json similarity index 58% rename from src/main/resources/assets/create/models/block/extractor_wireless.json rename to src/main/resources/assets/create/models/block/extractor/horizontal_wireless.json index df565ee16..8c04ee84f 100644 --- a/src/main/resources/assets/create/models/block/extractor_wireless.json +++ b/src/main/resources/assets/create/models/block/extractor/horizontal_wireless.json @@ -1,48 +1,50 @@ { "credit": "Made with Blockbench", - "parent": "create:block/extractor", + "parent": "create:block/extractor/horizontal", "textures": { "2": "create:block/brass_casing", "redstone_antenna": "create:block/redstone_antenna", - "extractor": "create:block/extractor", - "particle": "create:block/extractor" + "particle": "create:block/extractor", + "extractor": "create:block/extractor" }, "elements": [ { "name": "Bottom", - "from": [4, 2, -1], + "from": [5, 2, -1], "to": [12, 3, 5], "faces": { - "north": {"uv": [6, 7, 14, 8], "texture": "#extractor"}, + "north": {"uv": [6, 7, 13, 8], "texture": "#extractor"}, "east": {"uv": [0, 0, 6, 1], "rotation": 180, "texture": "#extractor"}, - "south": {"uv": [6, 7, 14, 8], "texture": "#extractor"}, - "west": {"uv": [0, 0, 6, 1], "texture": "#extractor"}, - "up": {"uv": [0, 0, 6, 8], "rotation": 90, "texture": "#extractor"}, - "down": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"} + "south": {"uv": [6, 7, 13, 8], "texture": "#extractor"}, + "west": {"uv": [6, 15, 12, 16], "texture": "#extractor"}, + "up": {"uv": [0, 0, 6, 7], "rotation": 90, "texture": "#extractor"}, + "down": {"uv": [0, 0, 6, 7], "rotation": 270, "texture": "#extractor"} } }, { "name": "Top", - "from": [4, 9, -1], + "from": [5, 9, -1], "to": [12, 10, 5], "faces": { - "north": {"uv": [6, 0, 14, 1], "texture": "#extractor"}, + "north": {"uv": [6, 0, 13, 1], "texture": "#extractor"}, "east": {"uv": [0, 0, 6, 1], "rotation": 180, "texture": "#extractor"}, - "south": {"uv": [6, 0, 14, 1], "texture": "#extractor"}, - "west": {"uv": [0, 0, 6, 1], "texture": "#extractor"}, - "up": {"uv": [0, 0, 6, 8], "rotation": 90, "texture": "#extractor"}, - "down": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"} + "south": {"uv": [6, 0, 13, 1], "texture": "#extractor"}, + "west": {"uv": [6, 8, 12, 9], "texture": "#extractor"}, + "up": {"uv": [0, 0, 6, 7], "rotation": 90, "texture": "#extractor"}, + "down": {"uv": [0, 0, 6, 7], "rotation": 270, "texture": "#extractor"} } }, { "name": "Side", - "from": [4, 3, -1], - "to": [5, 9, 5], + "from": [4, 2, -1], + "to": [5, 10, 5], "faces": { - "north": {"uv": [13, 1, 14, 7], "texture": "#extractor"}, - "east": {"uv": [0, 1, 6, 7], "rotation": 180, "texture": "#extractor"}, - "south": {"uv": [6, 1, 7, 7], "texture": "#extractor"}, - "west": {"uv": [0, 1, 6, 7], "texture": "#extractor"} + "north": {"uv": [13, 0, 14, 8], "texture": "#extractor"}, + "east": {"uv": [0, 1, 6, 9], "rotation": 180, "texture": "#extractor"}, + "south": {"uv": [6, 1, 7, 9], "texture": "#extractor"}, + "west": {"uv": [6, 8, 12, 16], "texture": "#extractor"}, + "up": {"uv": [6, 8, 12, 9], "rotation": 90, "texture": "#extractor"}, + "down": {"uv": [6, 15, 12, 16], "rotation": 90, "texture": "#extractor"} } }, { @@ -67,14 +69,14 @@ }, { "name": "FilterSpot", - "from": [5, 10, -0.6], - "to": [11, 12, 4], - "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 11, -1]}, + "from": [5, 10, -1], + "to": [11, 11, 4], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 11, -1]}, "faces": { - "north": {"uv": [13, 1, 15, 7], "rotation": 90, "texture": "#extractor"}, - "east": {"uv": [0.1, 0, 4.7, 2], "rotation": 180, "texture": "#extractor"}, - "south": {"uv": [4, 1, 5, 7], "rotation": 270, "texture": "#extractor"}, - "west": {"uv": [0.1, 0, 4.7, 2], "texture": "#extractor"}, + "north": {"uv": [0, 9, 1, 15], "rotation": 90, "texture": "#extractor"}, + "east": {"uv": [0, 14, 5, 15], "rotation": 180, "texture": "#extractor"}, + "south": {"uv": [4, 9, 5, 15], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [0, 9, 5, 10], "texture": "#extractor"}, "up": {"uv": [0, 9, 5, 15], "rotation": 90, "texture": "#extractor"} } }, diff --git a/src/main/resources/assets/create/models/block/extractor/horizontal_wireless_powered.json b/src/main/resources/assets/create/models/block/extractor/horizontal_wireless_powered.json new file mode 100644 index 000000000..ef5d56a59 --- /dev/null +++ b/src/main/resources/assets/create/models/block/extractor/horizontal_wireless_powered.json @@ -0,0 +1,8 @@ +{ + "parent": "create:block/extractor/horizontal_wireless", + "textures": { + "redstone_antenna": "create:block/redstone_antenna_powered", + "extractor": "create:block/extractor_powered", + "particle": "create:block/extractor_powered" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/extractor/vertical.json b/src/main/resources/assets/create/models/block/extractor/vertical.json new file mode 100644 index 000000000..5271d1554 --- /dev/null +++ b/src/main/resources/assets/create/models/block/extractor/vertical.json @@ -0,0 +1,121 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "1": "create:block/brass_casing", + "particle": "create:block/extractor", + "extractor": "create:block/extractor" + }, + "elements": [ + { + "name": "Bottom", + "from": [4, -1, 4], + "to": [12, 5, 5], + "faces": { + "north": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"}, + "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"}, + "south": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"}, + "up": {"uv": [6, 7, 14, 8], "rotation": 180, "texture": "#extractor"}, + "down": {"uv": [6, 7, 14, 8], "texture": "#extractor"} + } + }, + { + "name": "Top", + "from": [4, -1, 11], + "to": [12, 5, 12], + "faces": { + "north": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"}, + "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"}, + "south": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"}, + "up": {"uv": [6, 0, 14, 1], "rotation": 180, "texture": "#extractor"}, + "down": {"uv": [6, 0, 14, 1], "texture": "#extractor"} + } + }, + { + "name": "Side", + "from": [11, -1, 5], + "to": [12, 5, 11], + "faces": { + "east": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"}, + "up": {"uv": [6, 1, 7, 7], "rotation": 180, "texture": "#extractor"}, + "down": {"uv": [13, 1, 14, 7], "texture": "#extractor"} + } + }, + { + "name": "Side", + "from": [4, -1, 5], + "to": [5, 5, 11], + "faces": { + "east": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"}, + "up": {"uv": [13, 1, 14, 7], "rotation": 180, "texture": "#extractor"}, + "down": {"uv": [6, 1, 7, 7], "texture": "#extractor"} + } + }, + { + "name": "Center", + "from": [5, 0, 5], + "to": [11, 4, 11], + "faces": { + "up": {"uv": [7, 1, 13, 7], "rotation": 180, "texture": "#extractor"}, + "down": {"uv": [5, 5, 11, 11], "texture": "#1"} + } + }, + { + "name": "FilterSpot", + "from": [5, -1, 12], + "to": [11, 4, 13], + "faces": { + "east": {"uv": [0, 14, 5, 15], "rotation": 270, "texture": "#extractor"}, + "south": {"uv": [0, 9, 5, 15], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [0, 9, 5, 10], "rotation": 270, "texture": "#extractor"}, + "up": {"uv": [4, 9, 5, 15], "rotation": 270, "texture": "#extractor"}, + "down": {"uv": [0, 9, 1, 15], "rotation": 90, "texture": "#extractor"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, -149, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, -149, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, -55, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, -55, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 1, 1.25], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2.5, -0.5, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, 1.75, -4.5], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "vertical", + "origin": [8, 8, 8], + "children": [0, 1, 2, 3, 4, 5] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/extractor_powered.json b/src/main/resources/assets/create/models/block/extractor/vertical_powered.json similarity index 73% rename from src/main/resources/assets/create/models/block/extractor_powered.json rename to src/main/resources/assets/create/models/block/extractor/vertical_powered.json index 9e43e6d02..592d930cb 100644 --- a/src/main/resources/assets/create/models/block/extractor_powered.json +++ b/src/main/resources/assets/create/models/block/extractor/vertical_powered.json @@ -1,5 +1,5 @@ { - "parent": "create:block/extractor", + "parent": "create:block/extractor/vertical", "textures": { "extractor": "create:block/extractor_powered", "particle": "create:block/extractor_powered" diff --git a/src/main/resources/assets/create/models/block/extractor/vertical_wireless.json b/src/main/resources/assets/create/models/block/extractor/vertical_wireless.json new file mode 100644 index 000000000..e914ce71a --- /dev/null +++ b/src/main/resources/assets/create/models/block/extractor/vertical_wireless.json @@ -0,0 +1,162 @@ +{ + "credit": "Made with Blockbench", + "parent": "create:block/extractor/horizontal", + "textures": { + "1": "create:block/brass_casing", + "particle": "create:block/extractor", + "extractor": "create:block/extractor", + "redstone_antenna": "create:block/redstone_antenna" + }, + "elements": [ + { + "name": "Bottom", + "from": [4, -1, 4], + "to": [12, 5, 5], + "faces": { + "north": {"uv": [6, 8, 12, 16], "rotation": 270, "texture": "#extractor"}, + "east": {"uv": [6, 15, 12, 16], "rotation": 270, "texture": "#extractor"}, + "south": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [6, 8, 12, 9], "rotation": 270, "texture": "#extractor"}, + "up": {"uv": [6, 7, 14, 8], "rotation": 180, "texture": "#extractor"}, + "down": {"uv": [6, 7, 14, 8], "texture": "#extractor"} + } + }, + { + "name": "Top", + "from": [4, -1, 11], + "to": [12, 5, 12], + "faces": { + "north": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"}, + "east": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"}, + "south": {"uv": [0, 0, 6, 8], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [0, 0, 6, 1], "rotation": 270, "texture": "#extractor"}, + "up": {"uv": [6, 0, 14, 1], "rotation": 180, "texture": "#extractor"}, + "down": {"uv": [6, 0, 14, 1], "texture": "#extractor"} + } + }, + { + "name": "Side", + "from": [11, -1, 5], + "to": [12, 5, 11], + "faces": { + "east": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"}, + "up": {"uv": [6, 1, 7, 7], "rotation": 180, "texture": "#extractor"}, + "down": {"uv": [13, 1, 14, 7], "texture": "#extractor"} + } + }, + { + "name": "Side", + "from": [4, -1, 5], + "to": [5, 5, 11], + "faces": { + "east": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [0, 1, 6, 7], "rotation": 270, "texture": "#extractor"}, + "up": {"uv": [13, 1, 14, 7], "rotation": 180, "texture": "#extractor"}, + "down": {"uv": [6, 1, 7, 7], "texture": "#extractor"} + } + }, + { + "name": "Center", + "from": [5, 0, 5], + "to": [11, 4, 11], + "faces": { + "up": {"uv": [7, 1, 13, 7], "rotation": 180, "texture": "#extractor"}, + "down": {"uv": [5, 5, 11, 11], "texture": "#1"} + } + }, + { + "name": "FilterSpot", + "from": [5, -1, 12], + "to": [11, 4, 13], + "faces": { + "east": {"uv": [0, 14, 5, 15], "rotation": 270, "texture": "#extractor"}, + "south": {"uv": [0, 9, 5, 15], "rotation": 270, "texture": "#extractor"}, + "west": {"uv": [0, 9, 5, 10], "rotation": 270, "texture": "#extractor"}, + "up": {"uv": [4, 9, 5, 15], "rotation": 270, "texture": "#extractor"}, + "down": {"uv": [0, 9, 1, 15], "rotation": 90, "texture": "#extractor"} + } + }, + { + "name": "AntennaX", + "from": [11, 3, 9], + "to": [14, 13, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 15]}, + "faces": { + "north": {"uv": [0, 0, 3, 10], "texture": "#redstone_antenna"}, + "south": {"uv": [0, 0, 3, 10], "texture": "#redstone_antenna"}, + "down": {"uv": [0, 9, 3, 10], "texture": "#redstone_antenna"} + } + }, + { + "name": "AntennaZ", + "from": [12, 3, 8], + "to": [13, 13, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 15]}, + "faces": { + "east": {"uv": [0, 0, 3, 10], "texture": "#redstone_antenna"}, + "west": {"uv": [0, 0, 3, 10], "texture": "#redstone_antenna"} + } + }, + { + "name": "AntennaTop", + "from": [12, 11, 9], + "to": [13, 12, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 15]}, + "faces": { + "up": {"uv": [1, 1, 2, 2], "texture": "#redstone_antenna"} + } + }, + { + "name": "AntennaDish", + "from": [10, 9, 7], + "to": [15, 9, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 15]}, + "faces": { + "up": {"uv": [4, 0, 9, 5], "texture": "#redstone_antenna"}, + "down": {"uv": [4, 0, 9, 5], "texture": "#redstone_antenna"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, -149, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, -149, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, -55, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, -55, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 1, 1.25], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2.5, -0.5, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, 1.75, -4.5], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "vertical", + "origin": [8, 8, 8], + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/extractor_wireless_powered.json b/src/main/resources/assets/create/models/block/extractor/vertical_wireless_powered.json similarity index 77% rename from src/main/resources/assets/create/models/block/extractor_wireless_powered.json rename to src/main/resources/assets/create/models/block/extractor/vertical_wireless_powered.json index 0291e5e46..277f856d9 100644 --- a/src/main/resources/assets/create/models/block/extractor_wireless_powered.json +++ b/src/main/resources/assets/create/models/block/extractor/vertical_wireless_powered.json @@ -1,5 +1,5 @@ { - "parent": "create:block/extractor_wireless", + "parent": "create:block/extractor/vertical_wireless", "textures": { "redstone_antenna": "create:block/redstone_antenna_powered", "extractor": "create:block/extractor_powered", diff --git a/src/main/resources/assets/create/models/block/translation_chassis_both_sticky.json b/src/main/resources/assets/create/models/block/translation_chassis_both_sticky.json index 0a2407b98..f62a84597 100644 --- a/src/main/resources/assets/create/models/block/translation_chassis_both_sticky.json +++ b/src/main/resources/assets/create/models/block/translation_chassis_both_sticky.json @@ -2,6 +2,7 @@ "parent": "create:block/translation_chassis", "textures": { "bottom": "create:block/translation_chassis_top_sticky", - "top": "create:block/translation_chassis_top_sticky" + "top": "create:block/translation_chassis_top_sticky", + "side": "create:block/translation_chassis_side" } } diff --git a/src/main/resources/assets/create/models/block/translation_chassis_bottom_sticky.json b/src/main/resources/assets/create/models/block/translation_chassis_bottom_sticky.json index d5e5c5fac..8898976fb 100644 --- a/src/main/resources/assets/create/models/block/translation_chassis_bottom_sticky.json +++ b/src/main/resources/assets/create/models/block/translation_chassis_bottom_sticky.json @@ -1,6 +1,8 @@ { "parent": "create:block/translation_chassis", "textures": { - "bottom": "create:block/translation_chassis_top_sticky" + "bottom": "create:block/translation_chassis_top_sticky", + "top": "create:block/translation_chassis_top", + "side": "create:block/translation_chassis_side" } } diff --git a/src/main/resources/assets/create/models/block/translation_chassis_top_sticky.json b/src/main/resources/assets/create/models/block/translation_chassis_top_sticky.json index 0d04fcbcb..91bbe956b 100644 --- a/src/main/resources/assets/create/models/block/translation_chassis_top_sticky.json +++ b/src/main/resources/assets/create/models/block/translation_chassis_top_sticky.json @@ -1,6 +1,8 @@ { "parent": "create:block/translation_chassis", "textures": { - "top": "create:block/translation_chassis_top_sticky" + "top": "create:block/translation_chassis_top_sticky", + "bottom": "create:block/translation_chassis_top", + "side": "create:block/translation_chassis_side" } } diff --git a/src/main/resources/assets/create/models/item/extractor.json b/src/main/resources/assets/create/models/item/extractor.json index 948131ef6..d74df1741 100644 --- a/src/main/resources/assets/create/models/item/extractor.json +++ b/src/main/resources/assets/create/models/item/extractor.json @@ -1,3 +1,3 @@ { - "parent": "create:block/extractor" + "parent": "create:block/extractor/horizontal" } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/linked_extractor.json b/src/main/resources/assets/create/models/item/linked_extractor.json index 195ee3078..7eccdf092 100644 --- a/src/main/resources/assets/create/models/item/linked_extractor.json +++ b/src/main/resources/assets/create/models/item/linked_extractor.json @@ -1,3 +1,3 @@ { - "parent": "create:block/extractor_wireless" + "parent": "create:block/extractor/horizontal_wireless" } \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/brass_casing.png b/src/main/resources/assets/create/textures/block/brass_casing.png index 73bb3d6ddcaa209660a49afab96ab25b81dbb669..cd2a94b07a8b9d29e954f0dd995cc0cdf07d9803 100644 GIT binary patch delta 424 zcmV;Z0ayO61K9(RBnkm@Qb$4nuFf3kks%v@zW@LZzX3P}QzQTY0d7e|K~y+TZBji? z!!Qu76FZQ!rL=;ftb9%I8(1o_vLP`rQL*qV*!VNdjHna*kq#g#Ky?y3PI#9KZWVYs zJ>B^}{LYEEyFTvJP%2>OUszkRBlFx{OwKsanIqO&l5B$EXQrq#ozZp={4|@%AQU=( zwf7H?h?6J;OC<_hfvKL7P^6tfD}0A*h>jt|UPl zm+lNgTZjxZr4q$}p?&!)lhjxDFHFhr7dALYBF{J=}*`# zKrIC5M50nkRT=5uH761SM07*qoM6N<$f+&)vo&W#< diff --git a/src/main/resources/assets/create/textures/block/extractor.png b/src/main/resources/assets/create/textures/block/extractor.png index 9ec40f6a7140df09ec57c012445ea1cb285e5e1d..afeae9e5d4bfd19b3f51c4ba76fb9484b4b5e033 100644 GIT binary patch delta 521 zcmV+k0`~pu1IGlANq@lr01m+cxRGn^0005pNkl&_*(ZEzp7uv;m%iNwzC-d0iM4sq4J`F)qe*LJnt5!Y2shwKYY0t zaE_HV7sTuLrv_=F*X^Syi*Y&yE?*$d&zrE*Nxb{~1D#F>uItWd_4^0)9KmX}I);Wi zEXH**Xx7`|YM$vmMz@^2lIH9ogl*dkuW6W-OrR+XFAx()GWL87Mt-=OXL?U{u&&Ap zw?0=|DCU(eB7fjPSjhuA{ekLW`WMROhse9xa5YbO&0000< LMNUMnLIPldzyA58 delta 428 zcmV;d0aO0R1nUEkNq@os01mP_%mJPSU7P<#PzdiLb4YTL9GQxcQSI=kAp@KA~Q(>jQIreQ|`cDA8WPFl`488MZ03gEjlMYYn~5 zgX1g=-B=(bBM1}7RN^~I$SI)GR6i+CIL@LISf+_BGAd=#mI=o;!9ITXDmc!<82sTI zBxxow3ByGzf`2iZ3{fT{k`k6q2e7X<{KytLaGZs)*x-M~GQ~KIk;F;|xs9hMppLZv zv@uKI>jXk6rHwp<$O^RzJ}Yi6k5%`oi(tQ^E6hB+ystmGgr0*zOF;gF==b}W_=8!f z7198mck+gRvL(7WgTU!H@a=sDQyDJ7b18?B}X&+}%XVytcB{{X)X WW2G@4_j?Qg0000wj2YbPxm+Xqtxh(O-mN zgeZ=&v{C_c_t87SQSY94Sfk{J5#iLN3dG^zG3;Ui+gl$nnM}|g0gfKSHVafxVr%=M zy2r?7vjvwDL#l#`ic`XIs{JI;#njmp`OovQNJ+r$PH8mis8;4x?)yIag8_#A5dOedTXEeLb;jtctC!HCB#aXT z;{Y+WGQZ%ci#t0TIPG-R?D;ij=+~|+n3!+)>eC%Eb^;o0*&R7(OKKT&b> z^~P-f88Y+1%~l_q&At-Z2dtOp1dhCT7Fo|DUp(EzK8^I5M&7LneEIkt62#{4^037002ovPDHLkV1h->9svLV delta 446 zcmV;v0YUzm1^ok%Nq@rt01m?e$8V@)0004!Nklu+YL-YkUHGD=n=osO(Vj4v+BvZg-s>)Q|`YzhpAA`|Zr_ z?Tk3utD4UB6YeWn^p1RZxFNPl~42IzJ^5QZTxZ=Qwg z7kyL#)KUsVPf?^eDeCueaaE&(4=5Ikobc^W4tKC1QgjxOCYQ$=1t}?b!*c{2FN0EH zh1Zj?x;2Y*l}128Z;(J~g*JIf#f;X-X0sE`>eje`Onb23N_!5{u7eDD*Kzp2r(tz# z7AfO|Z=ej2Xn!Ckv)D(Q1=(tbC{Qp|3a%V&HlqOb;B~Z^fYq&8+*TB#PC=p#+WiOv3<&7=#F2Ezb;Y}i;K~PyP~h}VSiy_RaF%;*U}-GOeRQ@#L2OT}3<| zX8|dlP9qYDun-jw4c&v;Y=+Zm!=`ToPPZLHkMF?!dl3Tzx6s~xTWB;IP!J@QO2xfX z@$m2?_%?r`t<8k@A768^)1E{$oW@o#fX}njsHmtwXMbmZp&e;wX9vB#54iZR=O-ee zEi^Saz=;>EM)_fcDGz>@ttUo{y{QmfS%AAhBonD_>-?+=!j ztx%n*;eYM<18z8MOE`b-B1%e1_)IRhXkeWSVSRm3K|4?+lS#f$@7Iymz`($Oss^As!P@J5cusWf+xfyF~YiMb?DO@fWbUGdTo!ZoD zwV0p(z=d>>v~#jN-=!S?vn}Q5is`WBTp$o&K1@0~!l`@mpjPyHJ*Y1NJs?6^Sy_JT zb{3%*N>D15%+wAm(c_SvMH5L(e&TY-4~UFMOkzR^`~!uL_gNo#SRnua002ovPDHLk FV1mi&QZ4`h delta 711 zcmV;&0yzDU280HXNq@rt01m?e$8V@)0007+Nkl~z+^Ye2Q3WcT(_xJZGl}h}bN~N0C$kjD+ zX0zFBATyiI(ChW}1!?2sUO`U(CXpem7O80oSZ0G*wkvJVGvxkhk$ znvnHpWf>9HNhA{F`pGoaYL(f^oKC0Qc!c5MXCfR9!(y?p-l@#4t}aRF=ft+QHqgyU z@{Mtj|4+6QBdt)g)!4`$yqqyMXr}uC}KsN2!w}D~H)>UB5hY#-s z8gz<*k?}8B9)AW<4B+PzWO(!DIoMW^O&}XVe30f(pFaWluNj^^c>+}p0VoE56pM&R z0$p(ztoi2c%M1q&90qHCaQ^{=y}dn9?lDv~1fUr3_Wc`%t=qQ3HDA7Xoq>~!n?XuS zhCy3LmtpR#;|!bD-(h(8@Hjjg;eiN=+x-6qCURiScUx{h0*l|d$p*w%!E9uWFaS>n zFtGf>6O<&2O%n*fk~`Q1$jSKDty^#nYHDgw7Ipwi@))@hXaJOjFaSAo!2n2eg?}gm Y0CVuW`@3`ZUjP6A07*qoM6N<$f{J+0ZU6uP delta 418 zcmV;T0bTx~1mOdaNq@rt01m?e$8V@)0004YNklR&e`BiMVhB*NsBIPuqiJvoZ>? z0ryjoiSZ7a&EFyg?$tu`N`-GQ5st)YBu(;pK7hASbOWsxKq>_=oyzEWF90X9!suYN zk|qc~sa7+^YJce%28o0$z*cufxF(Y_)a!z)C58bOp>Q~q`EvOTy`G>P<6_}KGI`C_ z62o9V2k3UoTXCmTCjp8v4hHwoZlA$y_O$;QagcBh;&J@e0PA&`o`@oaE>!cgHBelA zJs2aai*(eulYu_QzVCAucI7yn?Slr+`}h9ec*sEixf>KH_A@#70b9wYgQdqF;{X5v M07*qoM6N<$f}8EZdjJ3c diff --git a/src/main/resources/assets/create/textures/item/zinc_nugget.png b/src/main/resources/assets/create/textures/item/zinc_nugget.png index 67e104e90907136d655076bbf580e6585ff99c68..f483f9c6d27c562a460fd18e276b646c7171dcbf 100644 GIT binary patch delta 262 zcmV+h0r~#g0__5jNe;pQ01m}~g$t*^d}M%O07!FpPbyrqnyMi~MP&}d>({Trd~|@-1(T zb-}DzRg91B3o)EO%LvvCvKgCZ5WpLa=m1-S!f7(Gfa1JBp#cmG01<7p!6&%XJ^%m! M07*qoM6N<$g0C}lTmS$7 delta 243 zcmV|F2)a0;Zomdj@t1Odf`@24ZAnI@o3| zE?zKSMMaxo@!}Z_7cbrb^N|6D0U*sYXZFA~OG(Kw%$U)`aQ^%YFdrRYbpc2NNFxXz zJ-QWItQlncwQC0%p-SKY!+_<>XEK5`fD8d?1_d5S^Y!b8Ff@YzRu{kwfoTTW3<@x8 tfT)B71K1K2PLqiRSiL|BpwIvY1^|%Rv$s>gvp@g<002ovPDHLkV1g#gWf%Ye