From bbe6150c0f18ad6eb558458eb278cd83e133590d Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 25 Aug 2019 10:14:15 +0200 Subject: [PATCH] Logistics and Tooltips - Added an option to register stairs, slabs and other together with the main Block - Added Skeleton for FlexCrate - Added Skeleton for Redstone Bridge - Added Skeleton for Stockpile Switch - Generalized tooltips between blocks and items - Added more tooltips to existing blocks --- .../java/com/simibubi/create/AllBlocks.java | 100 ++++++++++--- .../com/simibubi/create/AllContainers.java | 4 + .../com/simibubi/create/AllTileEntities.java | 8 ++ .../create/foundation/block/InfoBlock.java | 32 +++++ .../foundation/block/ProperStairsBlock.java | 12 ++ .../create/foundation/item/InfoItem.java | 31 ++++ .../foundation/item/ItemWithToolTip.java | 39 ----- .../create/foundation/item/TooltipCache.java | 17 --- .../create/foundation/utility/ITooltip.java | 13 ++ .../foundation/utility/TooltipHolder.java | 19 +++ .../contraptions/base/KineticBlock.java | 7 +- .../contraptions/generators/MotorBlock.java | 10 ++ .../generators/WaterWheelBlock.java | 9 +- .../receivers/CrushingWheelBlock.java | 11 ++ .../contraptions/receivers/DrillBlock.java | 11 ++ .../receivers/HarvesterBlock.java | 27 +++- .../receivers/TurntableBlock.java | 24 ++-- .../constructs/MechanicalPistonBlock.java | 9 ++ .../receivers/constructs/PistonPoleBlock.java | 35 ++++- .../contraptions/relays/AxisBlock.java | 7 + .../contraptions/relays/AxisTunnelBlock.java | 9 +- .../contraptions/relays/BeltBlock.java | 11 ++ .../contraptions/relays/EncasedBeltBlock.java | 14 +- .../contraptions/relays/GearboxBlock.java | 13 +- .../placementHandgun/BuilderGunItem.java | 9 +- .../modules/gardens/TreeFertilizerItem.java | 8 +- .../modules/logistics/FlexCrateBlock.java | 36 +++++ .../modules/logistics/FlexCrateContainer.java | 39 +++++ .../modules/logistics/FlexCrateScreen.java | 19 +++ .../logistics/FlexCrateTileEntity.java | 29 ++++ .../logistics/RedstoneBridgeBlock.java | 134 ++++++++++++++++++ .../logistics/RedstoneBridgeTileEntity.java | 100 +++++++++++++ .../logistics/StockpileSwitchBlock.java | 56 ++++++++ .../logistics/StockpileSwitchScreen.java | 5 + .../logistics/StockpileSwitchTileEntity.java | 41 ++++++ .../schematics/block/CreativeCrateBlock.java | 45 +++--- .../schematics/block/SchematicTableBlock.java | 29 ++-- .../schematics/block/SchematicannonBlock.java | 54 +++---- .../modules/symmetry/SymmetryWandItem.java | 8 +- .../create/blockstates/redstone_bridge.json | 17 +++ .../resources/assets/create/lang/en_us.json | 6 +- .../create/models/block/redstone_bridge.json | 57 ++++++++ .../models/block/redstone_bridge_powered.json | 7 + .../models/block/redstone_bridge_side.json | 51 +++++++ .../block/redstone_bridge_side_powered.json | 7 + .../create/models/item/redstone_bridge.json | 3 + .../create/textures/block/flex_crate.png | Bin 0 -> 528 bytes .../textures/block/redstone_antenna.png | Bin 0 -> 229 bytes .../block/redstone_antenna_powered.png | Bin 0 -> 231 bytes .../create/textures/block/redstone_bridge.png | Bin 0 -> 584 bytes .../block/redstone_bridge_powered.png | Bin 0 -> 572 bytes .../textures/block/redstone_bridge_side.png | Bin 0 -> 538 bytes .../block/redstone_bridge_side_powered.png | Bin 0 -> 544 bytes 53 files changed, 1048 insertions(+), 184 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/block/InfoBlock.java create mode 100644 src/main/java/com/simibubi/create/foundation/block/ProperStairsBlock.java create mode 100644 src/main/java/com/simibubi/create/foundation/item/InfoItem.java delete mode 100644 src/main/java/com/simibubi/create/foundation/item/ItemWithToolTip.java delete mode 100644 src/main/java/com/simibubi/create/foundation/item/TooltipCache.java create mode 100644 src/main/java/com/simibubi/create/foundation/utility/ITooltip.java create mode 100644 src/main/java/com/simibubi/create/foundation/utility/TooltipHolder.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/FlexCrateBlock.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/FlexCrateContainer.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/FlexCrateScreen.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/FlexCrateTileEntity.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/RedstoneBridgeBlock.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/RedstoneBridgeTileEntity.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchBlock.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchScreen.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchTileEntity.java create mode 100644 src/main/resources/assets/create/blockstates/redstone_bridge.json create mode 100644 src/main/resources/assets/create/models/block/redstone_bridge.json create mode 100644 src/main/resources/assets/create/models/block/redstone_bridge_powered.json create mode 100644 src/main/resources/assets/create/models/block/redstone_bridge_side.json create mode 100644 src/main/resources/assets/create/models/block/redstone_bridge_side_powered.json create mode 100644 src/main/resources/assets/create/models/item/redstone_bridge.json create mode 100644 src/main/resources/assets/create/textures/block/flex_crate.png create mode 100644 src/main/resources/assets/create/textures/block/redstone_antenna.png create mode 100644 src/main/resources/assets/create/textures/block/redstone_antenna_powered.png create mode 100644 src/main/resources/assets/create/textures/block/redstone_bridge.png create mode 100644 src/main/resources/assets/create/textures/block/redstone_bridge_powered.png create mode 100644 src/main/resources/assets/create/textures/block/redstone_bridge_side.png create mode 100644 src/main/resources/assets/create/textures/block/redstone_bridge_side_powered.png diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 33dad3cb9..d95b7ecf3 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -1,6 +1,7 @@ package com.simibubi.create; import com.simibubi.create.foundation.block.IWithoutBlockItem; +import com.simibubi.create.foundation.block.ProperStairsBlock; import com.simibubi.create.foundation.block.RenderUtilityAxisBlock; import com.simibubi.create.foundation.block.RenderUtilityBlock; import com.simibubi.create.modules.contraptions.base.HalfAxisBlock; @@ -24,6 +25,9 @@ import com.simibubi.create.modules.contraptions.relays.EncasedBeltBlock; import com.simibubi.create.modules.contraptions.relays.GearboxBlock; import com.simibubi.create.modules.contraptions.relays.GearshifterBlock; import com.simibubi.create.modules.gardens.CocoaLogBlock; +import com.simibubi.create.modules.logistics.FlexCrateBlock; +import com.simibubi.create.modules.logistics.RedstoneBridgeBlock; +import com.simibubi.create.modules.logistics.StockpileSwitchBlock; import com.simibubi.create.modules.schematics.block.CreativeCrateBlock; import com.simibubi.create.modules.schematics.block.SchematicTableBlock; import com.simibubi.create.modules.schematics.block.SchematicannonBlock; @@ -35,7 +39,11 @@ import net.minecraft.block.Block; import net.minecraft.block.Block.Properties; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; +import net.minecraft.block.FenceBlock; +import net.minecraft.block.FenceGateBlock; import net.minecraft.block.RotatedPillarBlock; +import net.minecraft.block.SlabBlock; +import net.minecraft.block.WallBlock; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraftforge.registries.IForgeRegistry; @@ -60,15 +68,15 @@ public enum AllBlocks { BELT(new BeltBlock()), BELT_PULLEY(new RenderUtilityAxisBlock()), BELT_ANIMATION(new RenderUtilityBlock()), - + MOTOR(new MotorBlock()), WATER_WHEEL(new WaterWheelBlock()), - + TURNTABLE(new TurntableBlock()), HALF_AXIS(new HalfAxisBlock()), CRUSHING_WHEEL(new CrushingWheelBlock()), CRUSHING_WHEEL_CONTROLLER(new CrushingWheelControllerBlock()), - + MECHANICAL_PISTON(new MechanicalPistonBlock(false)), STICKY_MECHANICAL_PISTON(new MechanicalPistonBlock(true)), MECHANICAL_PISTON_HEAD(new MechanicalPistonHeadBlock()), @@ -76,58 +84,74 @@ public enum AllBlocks { CONSTRUCT(new ChassisBlock(ChassisBlock.Type.NORMAL)), STICKY_CONSTRUCT(new ChassisBlock(ChassisBlock.Type.STICKY)), RELOCATION_CONSTRUCT(new ChassisBlock(ChassisBlock.Type.RELOCATING)), - + DRILL(new DrillBlock()), HARVESTER(new HarvesterBlock()), CONTACT(new ContactBlock()), - + + // Logistics + REDSTONE_BRIDGE(new RedstoneBridgeBlock()), + STOCKPILE_SWITCH(new StockpileSwitchBlock()), + FLEX_CRATE(new FlexCrateBlock()), + // Symmetry SYMMETRY_PLANE(new PlaneSymmetryBlock()), SYMMETRY_CROSSPLANE(new CrossPlaneSymmetryBlock()), SYMMETRY_TRIPLEPLANE(new TriplePlaneSymmetryBlock()), - + // Gardens COCOA_LOG(new CocoaLogBlock()), - + // Palettes ANDESITE_BRICKS(new Block(Properties.from(Blocks.ANDESITE))), DIORITE_BRICKS(new Block(Properties.from(Blocks.DIORITE))), GRANITE_BRICKS(new Block(Properties.from(Blocks.GRANITE))), GABBRO(new Block(Properties.from(Blocks.ANDESITE))), - POLISHED_GABBRO(new Block(Properties.from(GABBRO.block))), - GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), - PAVED_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), - INDENTED_GABBRO(new Block(Properties.from(GABBRO.block))), - SLIGHTLY_MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), - MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), - + POLISHED_GABBRO(new Block(Properties.from(GABBRO.block))), + GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), + PAVED_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), + INDENTED_GABBRO(new Block(Properties.from(GABBRO.block))), + SLIGHTLY_MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), + MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), + LIMESTONE(new Block(Properties.from(Blocks.SANDSTONE))), POLISHED_LIMESTONE(new Block(Properties.from(LIMESTONE.block))), LIMESTONE_BRICKS(new Block(Properties.from(LIMESTONE.block))), LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(LIMESTONE.block))), - + QUARTZIORITE(new Block(Properties.from(Blocks.QUARTZ_BLOCK))), QUARTZIORITE_BRICKS(new Block(Properties.from(QUARTZIORITE.block))), POLISHED_QUARTZIORITE(new Block(Properties.from(QUARTZIORITE.block))), - + DOLOMITE(new Block(Properties.from(Blocks.GRANITE))), DOLOMITE_BRICKS(new Block(Properties.from(DOLOMITE.block))), POLISHED_DOLOMITE(new Block(Properties.from(DOLOMITE.block))), DOLOMITE_PILLAR(new RotatedPillarBlock(Properties.from(DOLOMITE.block))), - + ; - public Block block; + private enum ComesWith { + WALL, FENCE, FENCE_GATE, SLAB, STAIRS; + } - private AllBlocks(Block block) { + public Block block; + public Block[] alsoRegistered; + + private AllBlocks(Block block, ComesWith... comesWith) { this.block = block; this.block.setRegistryName(Create.ID, this.name().toLowerCase()); + + alsoRegistered = new Block[comesWith.length]; + for (int i = 0; i < comesWith.length; i++) + alsoRegistered[i] = makeRelatedBlock(block, comesWith[i]); } public static void registerBlocks(IForgeRegistry registry) { for (AllBlocks block : values()) { registry.register(block.block); + for (Block extra : block.alsoRegistered) + registry.register(extra); } } @@ -136,11 +160,17 @@ public enum AllBlocks { if (block.get() instanceof IWithoutBlockItem) continue; - registry.register(new BlockItem(block.get(), AllItems.standardProperties()) - .setRegistryName(block.get().getRegistryName())); + registerAsItem(registry, block.get()); + for (Block extra : block.alsoRegistered) + registerAsItem(registry, extra); } } + private static void registerAsItem(IForgeRegistry registry, Block blockIn) { + registry.register( + new BlockItem(blockIn, AllItems.standardProperties()).setRegistryName(blockIn.getRegistryName())); + } + public Block get() { return block; } @@ -149,4 +179,32 @@ public enum AllBlocks { return state.getBlock() == block; } + private Block makeRelatedBlock(Block block, ComesWith feature) { + Properties properties = Properties.from(block); + Block featured = null; + + switch (feature) { + case FENCE: + featured = new FenceBlock(properties); + break; + case SLAB: + featured = new SlabBlock(properties); + break; + case STAIRS: + featured = new ProperStairsBlock(block); + break; + case WALL: + featured = new WallBlock(properties); + break; + case FENCE_GATE: + featured = new FenceGateBlock(properties); + break; + default: + return null; + } + + return featured.setRegistryName(Create.ID, + block.getRegistryName().getPath() + "_" + feature.name().toLowerCase()); + } + } diff --git a/src/main/java/com/simibubi/create/AllContainers.java b/src/main/java/com/simibubi/create/AllContainers.java index 6c78fc068..09bfa551c 100644 --- a/src/main/java/com/simibubi/create/AllContainers.java +++ b/src/main/java/com/simibubi/create/AllContainers.java @@ -1,5 +1,7 @@ package com.simibubi.create; +import com.simibubi.create.modules.logistics.FlexCrateContainer; +import com.simibubi.create.modules.logistics.FlexCrateScreen; import com.simibubi.create.modules.schematics.block.SchematicTableContainer; import com.simibubi.create.modules.schematics.block.SchematicTableScreen; import com.simibubi.create.modules.schematics.block.SchematicannonContainer; @@ -26,6 +28,7 @@ public enum AllContainers { SchematicTable(SchematicTableContainer::new), Schematicannon(SchematicannonContainer::new), + FlexCrate(FlexCrateContainer::new), ; @@ -50,6 +53,7 @@ public enum AllContainers { public static void registerScreenFactories() { bind(SchematicTable, SchematicTableScreen::new); bind(Schematicannon, SchematicannonScreen::new); + bind(FlexCrate, FlexCrateScreen::new); } @OnlyIn(Dist.CLIENT) diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index ad1eb66bf..02562b5cc 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -21,6 +21,9 @@ import com.simibubi.create.modules.contraptions.relays.GearboxTileEntity; import com.simibubi.create.modules.contraptions.relays.GearboxTileEntityRenderer; import com.simibubi.create.modules.contraptions.relays.GearshifterTileEntity; import com.simibubi.create.modules.contraptions.relays.GearshifterTileEntityRenderer; +import com.simibubi.create.modules.logistics.FlexCrateTileEntity; +import com.simibubi.create.modules.logistics.RedstoneBridgeTileEntity; +import com.simibubi.create.modules.logistics.StockpileSwitchTileEntity; import com.simibubi.create.modules.schematics.block.SchematicTableTileEntity; import com.simibubi.create.modules.schematics.block.SchematicannonRenderer; import com.simibubi.create.modules.schematics.block.SchematicannonTileEntity; @@ -57,6 +60,11 @@ public enum AllTileEntities { CRUSHING_WHEEL_CONTROLLER(CrushingWheelControllerTileEntity::new, AllBlocks.CRUSHING_WHEEL_CONTROLLER), WATER_WHEEL(WaterWheelTileEntity::new, AllBlocks.WATER_WHEEL), + // Logistics + REDSTONE_BRIDGE(RedstoneBridgeTileEntity::new, AllBlocks.REDSTONE_BRIDGE), + STOCKPILE_SWITCH(StockpileSwitchTileEntity::new, AllBlocks.STOCKPILE_SWITCH), + FLEX_CRATE(FlexCrateTileEntity::new, AllBlocks.FLEX_CRATE), + ; private Supplier supplier; diff --git a/src/main/java/com/simibubi/create/foundation/block/InfoBlock.java b/src/main/java/com/simibubi/create/foundation/block/InfoBlock.java new file mode 100644 index 000000000..2118e9d1f --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/block/InfoBlock.java @@ -0,0 +1,32 @@ +package com.simibubi.create.foundation.block; + +import java.util.List; + +import com.simibubi.create.foundation.utility.ITooltip; +import com.simibubi.create.foundation.utility.TooltipHolder; + +import net.minecraft.block.Block; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.world.IBlockReader; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +public abstract class InfoBlock extends Block implements ITooltip { + + protected TooltipHolder info; + + public InfoBlock(Properties properties) { + super(properties); + info = new TooltipHolder(this); + } + + @Override + @OnlyIn(value = Dist.CLIENT) + public void addInformation(ItemStack stack, IBlockReader worldIn, List tooltip, + ITooltipFlag flagIn) { + info.addInformation(tooltip); + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/block/ProperStairsBlock.java b/src/main/java/com/simibubi/create/foundation/block/ProperStairsBlock.java new file mode 100644 index 000000000..5efbf5045 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/block/ProperStairsBlock.java @@ -0,0 +1,12 @@ +package com.simibubi.create.foundation.block; + +import net.minecraft.block.Block; +import net.minecraft.block.StairsBlock; + +public class ProperStairsBlock extends StairsBlock { + + public ProperStairsBlock(Block block) { + super(block.getDefaultState(), Properties.from(block)); + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/item/InfoItem.java b/src/main/java/com/simibubi/create/foundation/item/InfoItem.java new file mode 100644 index 000000000..3797ee202 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/item/InfoItem.java @@ -0,0 +1,31 @@ +package com.simibubi.create.foundation.item; + +import java.util.List; + +import com.simibubi.create.foundation.utility.ITooltip; +import com.simibubi.create.foundation.utility.TooltipHolder; + +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +public abstract class InfoItem extends Item implements ITooltip { + + protected TooltipHolder info; + + public InfoItem(Properties properties) { + super(properties); + info = new TooltipHolder(this); + } + + @Override + @OnlyIn(value = Dist.CLIENT) + public void addInformation(ItemStack stack, World worldIn, List tooltip, ITooltipFlag flagIn) { + info.addInformation(tooltip); + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/item/ItemWithToolTip.java b/src/main/java/com/simibubi/create/foundation/item/ItemWithToolTip.java deleted file mode 100644 index f9b5f2b53..000000000 --- a/src/main/java/com/simibubi/create/foundation/item/ItemWithToolTip.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.simibubi.create.foundation.item; - -import java.util.List; - -import com.simibubi.create.foundation.utility.ItemDescription; -import com.simibubi.create.foundation.utility.ItemDescription.Palette; - -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; - -public abstract class ItemWithToolTip extends Item { - - protected TooltipCache tooltip; - - public ItemWithToolTip(Properties properties) { - super(properties); - tooltip = new TooltipCache(); - } - - @Override - @OnlyIn(value = Dist.CLIENT) - public void addInformation(ItemStack stack, World worldIn, List tooltip, ITooltipFlag flagIn) { - ItemDescription itemDescription = this.tooltip.getOrCreate(this::getDescription); - itemDescription.addInformation(tooltip); - super.addInformation(stack, worldIn, tooltip, flagIn); - } - - protected abstract ItemDescription getDescription(); - - protected String h(String s, Palette palette) { - return ItemDescription.hightlight(s, palette); - } - -} diff --git a/src/main/java/com/simibubi/create/foundation/item/TooltipCache.java b/src/main/java/com/simibubi/create/foundation/item/TooltipCache.java deleted file mode 100644 index 73c93a93c..000000000 --- a/src/main/java/com/simibubi/create/foundation/item/TooltipCache.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.simibubi.create.foundation.item; - -import java.util.function.Supplier; - -import com.simibubi.create.foundation.utility.ItemDescription; - -public class TooltipCache { - - private ItemDescription toolTip; - - public ItemDescription getOrCreate(Supplier factory) { - if (toolTip == null) - toolTip = factory.get(); - return toolTip; - } - -} diff --git a/src/main/java/com/simibubi/create/foundation/utility/ITooltip.java b/src/main/java/com/simibubi/create/foundation/utility/ITooltip.java new file mode 100644 index 000000000..f6ad252c7 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/utility/ITooltip.java @@ -0,0 +1,13 @@ +package com.simibubi.create.foundation.utility; + +import com.simibubi.create.foundation.utility.ItemDescription.Palette; + +public interface ITooltip { + + public ItemDescription getDescription(); + + public default String h(String s, Palette palette) { + return ItemDescription.hightlight(s, palette); + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/utility/TooltipHolder.java b/src/main/java/com/simibubi/create/foundation/utility/TooltipHolder.java new file mode 100644 index 000000000..2c2dc7450 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/utility/TooltipHolder.java @@ -0,0 +1,19 @@ +package com.simibubi.create.foundation.utility; + +import java.util.List; + +import net.minecraft.util.text.ITextComponent; + +public class TooltipHolder { + + private ItemDescription toolTip; + + public TooltipHolder(ITooltip item) { + toolTip = item.getDescription(); + } + + public void addInformation(List tooltip) { + toolTip.addInformation(tooltip); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java index ed2a0a6bf..68e0ea261 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java @@ -1,8 +1,9 @@ package com.simibubi.create.modules.contraptions.base; +import com.simibubi.create.foundation.block.InfoBlock; +import com.simibubi.create.foundation.utility.ItemDescription.Palette; import com.simibubi.create.modules.contraptions.RotationPropagator; -import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.material.PushReaction; import net.minecraft.tileentity.TileEntity; @@ -14,8 +15,10 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; -public abstract class KineticBlock extends Block implements IRotate { +public abstract class KineticBlock extends InfoBlock implements IRotate { + protected static final Palette color = Palette.Red; + public KineticBlock(Properties properties) { super(properties); } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java index 5c83303d2..fde94de04 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java @@ -1,5 +1,6 @@ package com.simibubi.create.modules.contraptions.generators; +import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock; import net.minecraft.block.BlockState; @@ -48,4 +49,13 @@ public class MotorBlock extends HorizontalKineticBlock { protected boolean hasStaticPart() { return true; } + + // IToolTip + + @Override + public ItemDescription getDescription() { + return new ItemDescription(color).withSummary("Provides Rotational Power.").withControl("When R-Clicked", + "Opens the " + h("Configuration Screen", color)).createTabs(); + + } } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/generators/WaterWheelBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/generators/WaterWheelBlock.java index cc99cced9..4cf1e49d0 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/generators/WaterWheelBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/generators/WaterWheelBlock.java @@ -1,6 +1,7 @@ package com.simibubi.create.modules.contraptions.generators; import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock; import net.minecraft.block.BlockState; @@ -39,7 +40,7 @@ public class WaterWheelBlock extends HorizontalKineticBlock { protected boolean hasStaticPart() { return false; } - + @Override public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) { for (Direction direction : Direction.values()) { @@ -131,4 +132,10 @@ public class WaterWheelBlock extends HorizontalKineticBlock { return state.get(HORIZONTAL_FACING).getAxis(); } + @Override + public ItemDescription getDescription() { + return new ItemDescription(color).withSummary("Creates Rotational Power from " + h("Water flows", color) + " around it.") + .createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelBlock.java index be6d4d5af..fa9268b60 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelBlock.java @@ -3,6 +3,7 @@ package com.simibubi.create.modules.contraptions.receivers; import static com.simibubi.create.modules.contraptions.receivers.CrushingWheelControllerBlock.VALID; import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.modules.contraptions.base.KineticTileEntity; import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock; @@ -166,4 +167,14 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock { return false; } + @Override + public ItemDescription getDescription() { + return new ItemDescription(color) + .withSummary("Using rotational force, two of these Wheels can grind up anything that falls into them.") + .withBehaviour("When next other Wheel", + "Grinds up Mobs, Players and Items into their components. Wheels have to rotate at exact " + + h("Opposite Speeds", color) + ", dragging inputs into them from above.") + .createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/DrillBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/DrillBlock.java index 50a1c04dc..e378a7bac 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/DrillBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/DrillBlock.java @@ -2,6 +2,7 @@ package com.simibubi.create.modules.contraptions.receivers; import java.util.List; +import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.modules.contraptions.base.DirectionalKineticBlock; import com.simibubi.create.modules.contraptions.base.IRotate; import com.simibubi.create.modules.contraptions.receivers.constructs.IHaveMovementBehavior; @@ -167,4 +168,14 @@ public class DrillBlock extends DirectionalKineticBlock implements IHaveMovement return false; } + @Override + public ItemDescription getDescription() { + return new ItemDescription(color) + .withSummary("Using Rotational Force, this component can break blocks in front of it.") + .withBehaviour("When Rotated", h("Breaks blocks", color) + " right in front of it.") + .withBehaviour("When being pushed by Mechanical Piston", + h("Breaks the Blocks", color) + " it is being pushed into.") + .createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/HarvesterBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/HarvesterBlock.java index d0cbb36d7..6ffc4cd60 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/HarvesterBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/HarvesterBlock.java @@ -3,6 +3,10 @@ package com.simibubi.create.modules.contraptions.receivers; import java.util.List; import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.utility.ITooltip; +import com.simibubi.create.foundation.utility.ItemDescription; +import com.simibubi.create.foundation.utility.ItemDescription.Palette; +import com.simibubi.create.foundation.utility.TooltipHolder; import com.simibubi.create.modules.contraptions.receivers.constructs.IHaveMovementBehavior; import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalPistonTileEntity; @@ -12,6 +16,7 @@ import net.minecraft.block.Blocks; import net.minecraft.block.CropsBlock; import net.minecraft.block.HorizontalBlock; import net.minecraft.block.SugarCaneBlock; +import net.minecraft.client.util.ITooltipFlag; import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.ItemStack; @@ -26,20 +31,24 @@ import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.util.text.ITextComponent; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; import net.minecraftforge.common.IPlantable; -public class HarvesterBlock extends HorizontalBlock implements IHaveMovementBehavior { +public class HarvesterBlock extends HorizontalBlock implements IHaveMovementBehavior, ITooltip { public static final VoxelShape SHAPE_SOUTH = makeCuboidShape(0, 4, 0, 16, 12, 6), SHAPE_NORTH = makeCuboidShape(0, 4, 10, 16, 12, 16), SHAPE_WEST = makeCuboidShape(10, 4, 0, 16, 12, 16), SHAPE_EAST = makeCuboidShape(0, 4, 0, 6, 12, 16); + private TooltipHolder info; + public HarvesterBlock() { super(Properties.from(Blocks.IRON_BLOCK)); + info = new TooltipHolder(this); } @Override @@ -199,4 +208,20 @@ public class HarvesterBlock extends HorizontalBlock implements IHaveMovementBeha return Blocks.AIR.getDefaultState(); } + @Override + public void addInformation(ItemStack stack, IBlockReader worldIn, List tooltip, + ITooltipFlag flagIn) { + info.addInformation(tooltip); + } + + @Override + public ItemDescription getDescription() { + Palette color = Palette.Red; + return new ItemDescription(color).withSummary("Ideal for cutting crops using Mechanical Constructs.") + .withBehaviour("When pushed by Mechanical Piston", + "Cuts Crops to their initial growth state and drops their harvest.") + .createTabs(); + + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/TurntableBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/TurntableBlock.java index cc5c55a17..3e109b29e 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/TurntableBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/TurntableBlock.java @@ -1,5 +1,6 @@ package com.simibubi.create.modules.contraptions.receivers; +import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.modules.contraptions.base.KineticBlock; import com.simibubi.create.modules.contraptions.base.KineticTileEntity; @@ -54,27 +55,27 @@ public class TurntableBlock extends KineticBlock { float speed = ((KineticTileEntity) te).getSpeed() / 20; World world = e.getEntityWorld(); - if (speed == 0) + if (speed == 0) return; if (e.posY < pos.getY() + .5f) return; - + Vec3d origin = VecHelper.getCenterOf(pos); Vec3d offset = e.getPositionVec().subtract(origin); - - if (!world.isRemote && (e instanceof PlayerEntity)) + + if (!world.isRemote && (e instanceof PlayerEntity)) return; - - if (offset.length() > 1/16f) { + + if (offset.length() > 1 / 16f) { offset = VecHelper.rotate(offset, speed / 1f, Axis.Y); Vec3d movement = origin.add(offset).subtract(e.getPositionVec()); e.setMotion(e.getMotion().add(movement)); e.velocityChanged = true; } - + if (world.isRemote) return; - if ((e instanceof PlayerEntity)) + if ((e instanceof PlayerEntity)) return; if ((e instanceof LivingEntity)) { float diff = e.getRotationYawHead() - speed; @@ -84,7 +85,6 @@ public class TurntableBlock extends KineticBlock { return; } - e.rotationYaw -= speed; } @@ -106,4 +106,10 @@ public class TurntableBlock extends KineticBlock { return false; } + @Override + public ItemDescription getDescription() { + return new ItemDescription(color).withSummary("Turns rotational Force into raw Motion Sickness.") + .withBehaviour("When Rotated", "Rotates any Entities standing on top.").createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonBlock.java index 2853fdb2e..9440cd5c6 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonBlock.java @@ -1,6 +1,7 @@ package com.simibubi.create.modules.contraptions.receivers.constructs; import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.modules.contraptions.base.KineticBlock; import net.minecraft.block.Block; @@ -193,4 +194,12 @@ public class MechanicalPistonBlock extends KineticBlock { return VoxelShapes.fullCube(); } + @Override + public ItemDescription getDescription() { + return new ItemDescription(color) + .withSummary("With " + h("Piston Poles", color) + " at the rear, will " + + h("move Attached Structures", color) + " based on its input rotation speed.") + .withBehaviour("When Rotated", "Translates attached Structure accordingly.").createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/PistonPoleBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/PistonPoleBlock.java index 501edca55..4b4b4d0ff 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/PistonPoleBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/PistonPoleBlock.java @@ -1,13 +1,21 @@ package com.simibubi.create.modules.contraptions.receivers.constructs; +import java.util.List; + import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.block.ProperDirectionalBlock; +import com.simibubi.create.foundation.utility.ITooltip; +import com.simibubi.create.foundation.utility.ItemDescription; +import com.simibubi.create.foundation.utility.TooltipHolder; +import com.simibubi.create.foundation.utility.ItemDescription.Palette; import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalPistonBlock.PistonState; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; +import net.minecraft.client.util.ITooltipFlag; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemStack; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; @@ -16,14 +24,27 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.util.text.ITextComponent; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; -public class PistonPoleBlock extends ProperDirectionalBlock { +public class PistonPoleBlock extends ProperDirectionalBlock implements ITooltip { + + private TooltipHolder info; public PistonPoleBlock() { super(Properties.from(Blocks.PISTON_HEAD)); setDefaultState(getDefaultState().with(FACING, Direction.UP)); + info = new TooltipHolder(this); + } + + @Override + @OnlyIn(value = Dist.CLIENT) + public void addInformation(ItemStack stack, IBlockReader worldIn, List tooltip, + ITooltipFlag flagIn) { + info.addInformation(tooltip); } @Override @@ -58,7 +79,7 @@ public class PistonPoleBlock extends ProperDirectionalBlock { if (pistonHead != null && pistonBase != null && worldIn.getBlockState(pistonHead).get(BlockStateProperties.FACING) == worldIn .getBlockState(pistonBase).get(BlockStateProperties.FACING)) { - + final BlockPos basePos = pistonBase; BlockPos.getAllInBox(pistonBase, pistonHead).filter(p -> !p.equals(pos) && !p.equals(basePos)) .forEach(p -> worldIn.destroyBlock(p, !player.isCreative())); @@ -83,10 +104,18 @@ public class PistonPoleBlock extends ProperDirectionalBlock { return VoxelShapes.empty(); } - + @Override public BlockState getStateForPlacement(BlockItemUseContext context) { return getDefaultState().with(FACING, context.getFace().getOpposite()); } + @Override + public ItemDescription getDescription() { + Palette color = Palette.Red; + return new ItemDescription(color).withSummary( + "Attach to the back of a " + h("Mechanical Piston", color) + " to increase its extension length.") + .createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/AxisBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/AxisBlock.java index 6295956a5..501fd7b08 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/AxisBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/AxisBlock.java @@ -1,5 +1,6 @@ package com.simibubi.create.modules.contraptions.relays; +import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock; import net.minecraft.block.BlockState; @@ -61,4 +62,10 @@ public class AxisBlock extends RotatedPillarKineticBlock { return state.get(AXIS); } + @Override + public ItemDescription getDescription() { + return new ItemDescription(color).withSummary("A straight connection for rotating blocks along its axis.") + .createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/AxisTunnelBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/AxisTunnelBlock.java index f15800c19..87f6c9ba8 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/AxisTunnelBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/AxisTunnelBlock.java @@ -1,5 +1,6 @@ package com.simibubi.create.modules.contraptions.relays; +import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock; import net.minecraft.block.BlockState; @@ -28,7 +29,7 @@ public class AxisTunnelBlock extends RotatedPillarKineticBlock { protected boolean hasStaticPart() { return true; } - + @Override public PushReaction getPushReaction(BlockState state) { return PushReaction.PUSH_ONLY; @@ -51,4 +52,10 @@ public class AxisTunnelBlock extends RotatedPillarKineticBlock { return state.get(AXIS); } + @Override + public ItemDescription getDescription() { + return new ItemDescription(color) + .withSummary("Relays a rotation through its block, similar to an exposed Axle.").createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/BeltBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/BeltBlock.java index 1c2b4f712..699f1dca5 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/BeltBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/BeltBlock.java @@ -6,6 +6,7 @@ import java.util.List; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllItems; import com.simibubi.create.foundation.block.IWithoutBlockItem; +import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock; import com.simibubi.create.modules.contraptions.relays.BeltTileEntity.TransportedEntityInfo; @@ -208,6 +209,8 @@ public class BeltBlock extends HorizontalKineticBlock implements IWithoutBlockIt public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) { if (worldIn.isRemote) return; + + boolean endWasDestroyed = state.get(PART) == Part.END; TileEntity tileEntity = worldIn.getTileEntity(pos); if (tileEntity == null) return; @@ -243,6 +246,9 @@ public class BeltBlock extends HorizontalKineticBlock implements IWithoutBlockIt if (destroyedBlock.get(PART) == Part.END) break; + } else { + if (endWasDestroyed) + break; } Slope slope = state.get(SLOPE); @@ -363,5 +369,10 @@ public class BeltBlock extends HorizontalKineticBlock implements IWithoutBlockIt IBooleanFunction.AND)); return shape; } + + @Override + public ItemDescription getDescription() { + return new ItemDescription(color); + } } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/EncasedBeltBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/EncasedBeltBlock.java index d54964d46..cc314c77e 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/EncasedBeltBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/EncasedBeltBlock.java @@ -1,6 +1,7 @@ package com.simibubi.create.modules.contraptions.relays; import com.google.common.base.Predicates; +import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock; import net.minecraft.block.Block; @@ -39,11 +40,11 @@ public class EncasedBeltBlock extends RotatedPillarKineticBlock { public boolean isSolid(BlockState state) { return false; } - + @Override public BlockState getStateForPlacement(BlockItemUseContext context) { BlockState state = getDefaultState().with(AXIS, context.getNearestLookingDirection().getAxis()); - + for (Direction face : Direction.values()) { BlockState neighbour = context.getWorld().getBlockState(context.getPos().offset(face)); if (neighbour.getBlock() != this || neighbour.get(CONNECTED)) @@ -103,4 +104,13 @@ public class EncasedBeltBlock extends RotatedPillarKineticBlock { return true; } + @Override + public ItemDescription getDescription() { + return new ItemDescription(color) + .withSummary("Relays rotation through its block and to an attached Encased Belt.") + .withBehaviour("When Attached to other Encased Belt", + "Attached Block will have the exact same rotation speed and direction. Attached Belts do not have to face the same way.") + .createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/GearboxBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/GearboxBlock.java index c3272bd56..9d88e678f 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/GearboxBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/GearboxBlock.java @@ -1,5 +1,6 @@ package com.simibubi.create.modules.contraptions.relays; +import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.modules.contraptions.base.RotatedPillarKineticBlock; import net.minecraft.block.BlockState; @@ -21,12 +22,12 @@ public class GearboxBlock extends RotatedPillarKineticBlock { public TileEntity createTileEntity(BlockState state, IBlockReader world) { return new GearboxTileEntity(); } - + @Override public PushReaction getPushReaction(BlockState state) { return PushReaction.PUSH_ONLY; } - + // IRotate: @Override @@ -39,4 +40,12 @@ public class GearboxBlock extends RotatedPillarKineticBlock { return true; } + // IToolTip + + @Override + public ItemDescription getDescription() { + return new ItemDescription(color) + .withSummary("Relays Rotation to Four directions. Reverses straight connections.").createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunItem.java b/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunItem.java index 981e8cf27..e955bb0dc 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunItem.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/placementHandgun/BuilderGunItem.java @@ -12,7 +12,7 @@ import com.simibubi.create.AllItems; import com.simibubi.create.AllPackets; import com.simibubi.create.Create; import com.simibubi.create.foundation.gui.ScreenOpener; -import com.simibubi.create.foundation.item.ItemWithToolTip; +import com.simibubi.create.foundation.item.InfoItem; import com.simibubi.create.foundation.utility.BlockHelper; import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.foundation.utility.ItemDescription.Palette; @@ -61,10 +61,11 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.network.PacketDistributor; -public class BuilderGunItem extends ItemWithToolTip { +public class BuilderGunItem extends InfoItem { public static enum ComponentTier { - None(TextFormatting.DARK_GRAY + "Andesite Alloy"), BlazeBrass(TextFormatting.GOLD + "Blaze Brass"), + None(TextFormatting.DARK_GRAY + "Andesite Alloy"), + BlazeBrass(TextFormatting.GOLD + "Blaze Brass"), ChorusChrome(TextFormatting.LIGHT_PURPLE + "Chorus Chrome"), ; @@ -90,7 +91,7 @@ public class BuilderGunItem extends ItemWithToolTip { } @Override - protected ItemDescription getDescription() { + public ItemDescription getDescription() { Palette palette = Palette.Purple; return new ItemDescription(palette).withSummary("Novel gadget for placing or exchanging blocks at a distance.") .withControl("L-Click at Block", "Sets blocks placed by the tool to the targeted block.") diff --git a/src/main/java/com/simibubi/create/modules/gardens/TreeFertilizerItem.java b/src/main/java/com/simibubi/create/modules/gardens/TreeFertilizerItem.java index 183ca93bd..fef154227 100644 --- a/src/main/java/com/simibubi/create/modules/gardens/TreeFertilizerItem.java +++ b/src/main/java/com/simibubi/create/modules/gardens/TreeFertilizerItem.java @@ -6,7 +6,7 @@ import java.util.List; import java.util.Random; import java.util.function.Predicate; -import com.simibubi.create.foundation.item.ItemWithToolTip; +import com.simibubi.create.foundation.item.InfoItem; import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.foundation.utility.ItemDescription.Palette; @@ -31,19 +31,19 @@ import net.minecraft.world.ITickList; import net.minecraft.world.World; import net.minecraft.world.storage.MapData; -public class TreeFertilizerItem extends ItemWithToolTip { +public class TreeFertilizerItem extends InfoItem { public TreeFertilizerItem(Properties properties) { super(properties); } @Override - protected ItemDescription getDescription() { + public ItemDescription getDescription() { return new ItemDescription(Palette.Green) .withSummary("A powerful combination of minerals suitable for common tree types.") .withBehaviour("When used on Sapling", "Grows Trees regardless of their spacing Conditions").createTabs(); } - + @Override public ActionResultType onItemUse(ItemUseContext context) { BlockState state = context.getWorld().getBlockState(context.getPos()); diff --git a/src/main/java/com/simibubi/create/modules/logistics/FlexCrateBlock.java b/src/main/java/com/simibubi/create/modules/logistics/FlexCrateBlock.java new file mode 100644 index 000000000..01dfad287 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/FlexCrateBlock.java @@ -0,0 +1,36 @@ +package com.simibubi.create.modules.logistics; + +import com.simibubi.create.foundation.block.InfoBlock; +import com.simibubi.create.foundation.utility.ItemDescription; +import com.simibubi.create.foundation.utility.ItemDescription.Palette; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; + +public class FlexCrateBlock extends InfoBlock { + + public FlexCrateBlock() { + super(Properties.from(Blocks.ANDESITE)); + } + + @Override + public boolean hasTileEntity() { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new FlexCrateTileEntity(); + } + + @Override + public ItemDescription getDescription() { + Palette color = Palette.Yellow; + return new ItemDescription(color) + .withSummary("This Storage Container allows Manual control over its capacity. Can hold up to " + + h("16 Stacks", color) + " of Items."); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/FlexCrateContainer.java b/src/main/java/com/simibubi/create/modules/logistics/FlexCrateContainer.java new file mode 100644 index 000000000..75b811113 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/FlexCrateContainer.java @@ -0,0 +1,39 @@ +package com.simibubi.create.modules.logistics; + +import com.simibubi.create.AllContainers; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.world.ClientWorld; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.network.PacketBuffer; + +public class FlexCrateContainer extends Container { + + private FlexCrateTileEntity te; + + public FlexCrateContainer(int id, PlayerInventory inv, PacketBuffer extraData) { + super(AllContainers.SchematicTable.type, id); + ClientWorld world = Minecraft.getInstance().world; + this.te = (FlexCrateTileEntity) world.getTileEntity(extraData.readBlockPos()); + this.te.handleUpdateTag(extraData.readCompoundTag()); + init(); + } + + public FlexCrateContainer(int id, PlayerInventory inv, FlexCrateTileEntity te) { + super(AllContainers.SchematicTable.type, id); + this.te = te; + init(); + } + + private void init() { + + } + + @Override + public boolean canInteractWith(PlayerEntity playerIn) { + return true; + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/FlexCrateScreen.java b/src/main/java/com/simibubi/create/modules/logistics/FlexCrateScreen.java new file mode 100644 index 000000000..fb1926ab3 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/FlexCrateScreen.java @@ -0,0 +1,19 @@ +package com.simibubi.create.modules.logistics; + +import com.simibubi.create.foundation.gui.AbstractSimiContainerScreen; + +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.util.text.ITextComponent; + +public class FlexCrateScreen extends AbstractSimiContainerScreen { + + public FlexCrateScreen(FlexCrateContainer container, PlayerInventory inv, ITextComponent title) { + super(container, inv, title); + } + + @Override + protected void renderWindow(int mouseX, int mouseY, float partialTicks) { + + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/FlexCrateTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/FlexCrateTileEntity.java new file mode 100644 index 000000000..68c957aa1 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/FlexCrateTileEntity.java @@ -0,0 +1,29 @@ +package com.simibubi.create.modules.logistics; + +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.foundation.block.SyncedTileEntity; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.inventory.container.INamedContainerProvider; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; + +public class FlexCrateTileEntity extends SyncedTileEntity implements INamedContainerProvider { + + public FlexCrateTileEntity() { + super(AllTileEntities.FLEX_CRATE.type); + } + + @Override + public Container createMenu(int id, PlayerInventory inventory, PlayerEntity player) { + return new FlexCrateContainer(id, inventory, this); + } + + @Override + public ITextComponent getDisplayName() { + return new StringTextComponent(getType().getRegistryName().toString()); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/RedstoneBridgeBlock.java b/src/main/java/com/simibubi/create/modules/logistics/RedstoneBridgeBlock.java new file mode 100644 index 000000000..f2e3e7774 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/RedstoneBridgeBlock.java @@ -0,0 +1,134 @@ +package com.simibubi.create.modules.logistics; + +import java.util.List; + +import com.simibubi.create.foundation.block.ProperDirectionalBlock; +import com.simibubi.create.foundation.utility.ITooltip; +import com.simibubi.create.foundation.utility.ItemDescription; +import com.simibubi.create.foundation.utility.TooltipHolder; +import com.simibubi.create.foundation.utility.ItemDescription.Palette; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemStack; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer.Builder; +import net.minecraft.state.properties.BlockStateProperties; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.BlockRenderLayer; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorldReader; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +public class RedstoneBridgeBlock extends ProperDirectionalBlock implements ITooltip { + + public static final BooleanProperty POWERED = BlockStateProperties.POWERED; + + public static final VoxelShape UP_SHAPE = makeCuboidShape(2, 0, 2, 14, 3, 14), + DOWN_SHAPE = makeCuboidShape(2, 13, 2, 14, 16, 14); + + public static final VoxelShape SOUTH_SHAPE = makeCuboidShape(3, 1, -1, 13, 15, 2), + NORTH_SHAPE = makeCuboidShape(3, 1, 14, 13, 15, 17), EAST_SHAPE = makeCuboidShape(-1, 1, 3, 2, 15, 13), + WEST_SHAPE = makeCuboidShape(14, 1, 3, 17, 15, 13); + + private TooltipHolder info; + + public RedstoneBridgeBlock() { + super(Properties.from(Blocks.DARK_OAK_LOG)); + info = new TooltipHolder(this); + } + + @Override + protected void fillStateContainer(Builder builder) { + builder.add(POWERED); + super.fillStateContainer(builder); + } + + @Override + public boolean hasTileEntity(BlockState state) { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new RedstoneBridgeTileEntity(); + } + + @Override + public boolean canConnectRedstone(BlockState state, IBlockReader world, BlockPos pos, Direction side) { + return state.get(FACING) == Direction.UP; + } + + @Override + public BlockRenderLayer getRenderLayer() { + return BlockRenderLayer.CUTOUT; + } + + @Override + public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) { + BlockPos neighbourPos = pos.offset(state.get(FACING).getOpposite()); + BlockState neighbour = worldIn.getBlockState(neighbourPos); + return Block.hasSolidSide(neighbour, worldIn, neighbourPos, state.get(FACING)); + } + + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) { + BlockState state = getDefaultState(); + state = state.with(FACING, context.getFace()); + return state; + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + Direction facing = state.get(FACING); + + if (facing == Direction.UP) + return UP_SHAPE; + if (facing == Direction.DOWN) + return DOWN_SHAPE; + if (facing == Direction.EAST) + return EAST_SHAPE; + if (facing == Direction.WEST) + return WEST_SHAPE; + if (facing == Direction.NORTH) + return NORTH_SHAPE; + if (facing == Direction.SOUTH) + return SOUTH_SHAPE; + + return VoxelShapes.empty(); + } + + @Override + @OnlyIn(value = Dist.CLIENT) + public void addInformation(ItemStack stack, IBlockReader worldIn, List tooltip, + ITooltipFlag flagIn) { + info.addInformation(tooltip); + } + + @Override + public ItemDescription getDescription() { + Palette color = Palette.Yellow; + return new ItemDescription(color) + .withSummary("Endpoints for " + h("Wireless Redstone", color) + " connections. Can be assigned " + + h("Frequencies", color) + " using any item. Signal can travel distances up to " + + h("128m", color)) + .withBehaviour("When Powered", + "Bridges of the same " + h("Frequency", color) + " will provide a Redstone signal.") + .withControl("When R-Clicked with an Item", + "Sets the " + h("Frequency", color) + " to that item. A total of " + + h("two different items", color) + + " can be used in combination for defining a Frequency.") + .createTabs(); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/RedstoneBridgeTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/RedstoneBridgeTileEntity.java new file mode 100644 index 000000000..a61ead1ba --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/RedstoneBridgeTileEntity.java @@ -0,0 +1,100 @@ +package com.simibubi.create.modules.logistics; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang3.tuple.Pair; + +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.foundation.block.SyncedTileEntity; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; + +public class RedstoneBridgeTileEntity extends SyncedTileEntity { + + public static final int RANGE = 128; + + static Map, List> connections; + + public static class Frequency { + private ItemStack stack; + private Item item; + private int color; + + public Frequency(ItemStack stack) { + this.stack = stack; + item = stack.getItem(); + CompoundNBT displayTag = stack.getChildTag("display"); + color = displayTag != null && displayTag.contains("color") ? displayTag.getInt("color") : -1; + } + + public ItemStack getStack() { + return stack; + } + + @Override + public int hashCode() { + return item.hashCode() ^ color; + } + + @Override + public boolean equals(Object obj) { + return obj instanceof Frequency ? ((Frequency) obj).item == item && ((Frequency) obj).color == color + : false; + } + + } + + public Frequency frequencyFirst; + public Frequency frequencyLast; + + public RedstoneBridgeTileEntity() { + super(AllTileEntities.REDSTONE_BRIDGE.type); + frequencyFirst = new Frequency(ItemStack.EMPTY); + frequencyLast = new Frequency(ItemStack.EMPTY); + } + + @Override + public void onLoad() { + super.onLoad(); + if (world.isRemote) + return; + + Pair networkKey = getNetworkKey(); + List TEs = connections.getOrDefault(networkKey, new ArrayList<>()); + TEs.add(this); + connections.put(networkKey, TEs); + } + + @Override + public void remove() { + super.remove(); + + Pair networkKey = getNetworkKey(); + List TEs = connections.get(networkKey); + if (TEs != null) + TEs.remove(this); + } + + protected Pair getNetworkKey() { + return Pair.of(frequencyFirst, frequencyLast); + } + + @Override + public CompoundNBT write(CompoundNBT compound) { + compound.put("FrequencyFirst", frequencyFirst.getStack().write(new CompoundNBT())); + compound.put("FrequencyLast", frequencyLast.getStack().write(new CompoundNBT())); + return super.write(compound); + } + + @Override + public void read(CompoundNBT compound) { + frequencyFirst = new Frequency(ItemStack.read(compound.getCompound("FrequencyFirst"))); + frequencyLast = new Frequency(ItemStack.read(compound.getCompound("FrequencyLast"))); + super.read(compound); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchBlock.java b/src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchBlock.java new file mode 100644 index 000000000..5e26c668e --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchBlock.java @@ -0,0 +1,56 @@ +package com.simibubi.create.modules.logistics; + +import java.util.List; + +import com.simibubi.create.foundation.block.ProperDirectionalBlock; +import com.simibubi.create.foundation.utility.ITooltip; +import com.simibubi.create.foundation.utility.ItemDescription; +import com.simibubi.create.foundation.utility.ItemDescription.Palette; +import com.simibubi.create.foundation.utility.TooltipHolder; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.world.IBlockReader; + +public class StockpileSwitchBlock extends ProperDirectionalBlock implements ITooltip { + + private TooltipHolder info; + + public StockpileSwitchBlock() { + super(Properties.from(Blocks.ANDESITE)); + info = new TooltipHolder(this); + } + + @Override + public void addInformation(ItemStack stack, IBlockReader worldIn, List tooltip, + ITooltipFlag flagIn) { + info.addInformation(tooltip); + } + + @Override + public boolean hasTileEntity() { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new StockpileSwitchTileEntity(); + } + + @Override + public ItemDescription getDescription() { + Palette color = Palette.Yellow; + return new ItemDescription(color) + .withSummary("Toggles a Redstone signal based on the " + h("Storage Space", color) + + " in the attached Container.") + .withBehaviour("When below Lower Limit", "Stops providing " + h("Redstone Power", color)) + .withBehaviour("When above Upper Limit", + "Starts providing " + h("Redstone Power", color) + " until Lower Limit is reached again.") + .withControl("When R-Clicked", "Opens the " + h("Configuration Screen", color)).createTabs(); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchScreen.java b/src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchScreen.java new file mode 100644 index 000000000..af70c616a --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchScreen.java @@ -0,0 +1,5 @@ +package com.simibubi.create.modules.logistics; + +public class StockpileSwitchScreen { + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchTileEntity.java new file mode 100644 index 000000000..078e6f287 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/StockpileSwitchTileEntity.java @@ -0,0 +1,41 @@ +package com.simibubi.create.modules.logistics; + +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.foundation.block.SyncedTileEntity; + +import net.minecraft.nbt.CompoundNBT; + +public class StockpileSwitchTileEntity extends SyncedTileEntity { + + private float offWhenAbove; + private float onWhenBelow; +// private float currentLevel; + + public StockpileSwitchTileEntity() { + super(AllTileEntities.STOCKPILE_SWITCH.type); + } + + @Override + public void read(CompoundNBT compound) { + + offWhenAbove = compound.getFloat("OffAbove"); + onWhenBelow = compound.getFloat("OnBelow"); + updateCurrentLevel(); + + super.read(compound); + } + + @Override + public CompoundNBT write(CompoundNBT compound) { + + compound.putFloat("OffAbove", offWhenAbove); + compound.putFloat("OnBelow", onWhenBelow); + + return super.write(compound); + } + + private void updateCurrentLevel() { + + } + +} diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/CreativeCrateBlock.java b/src/main/java/com/simibubi/create/modules/schematics/block/CreativeCrateBlock.java index 3c3c7a2ce..4e90e0f24 100644 --- a/src/main/java/com/simibubi/create/modules/schematics/block/CreativeCrateBlock.java +++ b/src/main/java/com/simibubi/create/modules/schematics/block/CreativeCrateBlock.java @@ -1,59 +1,46 @@ package com.simibubi.create.modules.schematics.block; -import java.util.List; +import com.simibubi.create.foundation.block.InfoBlock; +import com.simibubi.create.foundation.utility.ItemDescription; +import com.simibubi.create.foundation.utility.ItemDescription.Palette; -import com.simibubi.create.foundation.utility.KeyboardHelper; - -import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.material.Material; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TextFormatting; import net.minecraft.world.IBlockReader; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; -public class CreativeCrateBlock extends Block { +public class CreativeCrateBlock extends InfoBlock { protected static final VoxelShape shape = makeCuboidShape(1, 0, 1, 15, 14, 15); - + public CreativeCrateBlock() { super(Properties.create(Material.WOOD)); } - + @Override public boolean isSolid(BlockState state) { return false; } - - @Override - @OnlyIn(value = Dist.CLIENT) - public void addInformation(ItemStack stack, IBlockReader worldIn, List tooltip, - ITooltipFlag flagIn) { - if (KeyboardHelper.isKeyDown(KeyboardHelper.LSHIFT)) { - tooltip.add(new StringTextComponent(TextFormatting.LIGHT_PURPLE + "Creative Item")); - tooltip.add(new StringTextComponent(TextFormatting.GRAY + "Grants an attached " + TextFormatting.BLUE + "Schematicannon")); - tooltip.add(new StringTextComponent(TextFormatting.GRAY + "unlimited access to blocks.")); - } else - tooltip.add(new StringTextComponent(TextFormatting.DARK_GRAY + "< Hold Shift >")); - super.addInformation(stack, worldIn, tooltip, flagIn); - } - + @Override public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { return shape; } - + @Override public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { return shape; } + @Override + public ItemDescription getDescription() { + Palette blue = Palette.Blue; + return new ItemDescription(blue) + .withSummary("Grants an attached " + h("Schematicannon", blue) + " unlimited access to blocks.") + .createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableBlock.java b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableBlock.java index d7d28c150..d50ba15a3 100644 --- a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableBlock.java +++ b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicTableBlock.java @@ -2,7 +2,10 @@ package com.simibubi.create.modules.schematics.block; import java.util.List; -import com.simibubi.create.foundation.utility.KeyboardHelper; +import com.simibubi.create.foundation.utility.ITooltip; +import com.simibubi.create.foundation.utility.ItemDescription; +import com.simibubi.create.foundation.utility.ItemDescription.Palette; +import com.simibubi.create.foundation.utility.TooltipHolder; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -20,18 +23,19 @@ import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TextFormatting; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.network.NetworkHooks; -public class SchematicTableBlock extends HorizontalBlock { +public class SchematicTableBlock extends HorizontalBlock implements ITooltip { + + private TooltipHolder info; public SchematicTableBlock() { super(Properties.from(Blocks.OAK_PLANKS)); + info = new TooltipHolder(this); } @Override @@ -44,17 +48,12 @@ public class SchematicTableBlock extends HorizontalBlock { public boolean isSolid(BlockState state) { return false; } - + @Override @OnlyIn(value = Dist.CLIENT) public void addInformation(ItemStack stack, IBlockReader worldIn, List tooltip, ITooltipFlag flagIn) { - if (KeyboardHelper.isKeyDown(KeyboardHelper.LSHIFT)) { - tooltip.add(new StringTextComponent(TextFormatting.GRAY + "Writes saved Schematics onto")); - tooltip.add(new StringTextComponent(TextFormatting.GRAY + "an " + TextFormatting.BLUE + "Empty Schematic")); - } else - tooltip.add(new StringTextComponent(TextFormatting.DARK_GRAY + "< Hold Shift >")); - super.addInformation(stack, worldIn, tooltip, flagIn); + info.addInformation(tooltip); } @Override @@ -103,4 +102,12 @@ public class SchematicTableBlock extends HorizontalBlock { } + @Override + public ItemDescription getDescription() { + Palette color = Palette.Blue; + return new ItemDescription(color).withSummary("Writes saved Schematics onto an " + h("Empty Schematic", color)) + .withBehaviour("When given an Empty Schematic", "Uploads the chosen File from your Schematics Folder") + .createTabs(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonBlock.java b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonBlock.java index a9086c910..26b0d7305 100644 --- a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonBlock.java +++ b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonBlock.java @@ -1,14 +1,12 @@ package com.simibubi.create.modules.schematics.block; -import java.util.List; - import com.simibubi.create.AllItems; -import com.simibubi.create.foundation.utility.KeyboardHelper; +import com.simibubi.create.foundation.block.InfoBlock; +import com.simibubi.create.foundation.utility.ItemDescription; +import com.simibubi.create.foundation.utility.ItemDescription.Palette; -import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; -import net.minecraft.client.util.ITooltipFlag; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.inventory.InventoryHelper; @@ -18,18 +16,13 @@ import net.minecraft.util.Direction; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TextFormatting; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.network.NetworkHooks; -public class SchematicannonBlock extends Block { +public class SchematicannonBlock extends InfoBlock { public SchematicannonBlock() { super(Properties.from(Blocks.DISPENSER)); @@ -39,32 +32,19 @@ public class SchematicannonBlock extends Block { public boolean hasTileEntity(BlockState state) { return true; } - + @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { return new SchematicannonTileEntity(); } - - @Override - @OnlyIn(value = Dist.CLIENT) - public void addInformation(ItemStack stack, IBlockReader worldIn, List tooltip, - ITooltipFlag flagIn) { - if (KeyboardHelper.isKeyDown(KeyboardHelper.LSHIFT)) { - tooltip.add(new StringTextComponent(TextFormatting.GRAY + "Prints a deployed " + TextFormatting.BLUE + "Schematic")); - tooltip.add(new StringTextComponent(TextFormatting.GRAY + "into the world using blocks from inventories")); - tooltip.add(new StringTextComponent(TextFormatting.GRAY + "placed right next to it.")); - } else - tooltip.add(new StringTextComponent(TextFormatting.DARK_GRAY + "< Hold Shift >")); - super.addInformation(stack, worldIn, tooltip, flagIn); - } - + @Override public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos) { ((SchematicannonTileEntity) worldIn.getTileEntity(currentPos)).findInventories(); return stateIn; } - + @Override public boolean isSolid(BlockState state) { return false; @@ -75,25 +55,26 @@ public class SchematicannonBlock extends Block { ((SchematicannonTileEntity) world.getTileEntity(pos)).findInventories(); super.onNeighborChange(state, world, pos, neighbor); } - + @Override public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { - + if (worldIn.isRemote) { return true; } else { SchematicannonTileEntity te = (SchematicannonTileEntity) worldIn.getTileEntity(pos); if (te != null) - if (AllItems.BLUEPRINT.typeOf(player.getHeldItemMainhand()) && te.inventory.getStackInSlot(0).isEmpty()) { + if (AllItems.BLUEPRINT.typeOf(player.getHeldItemMainhand()) + && te.inventory.getStackInSlot(0).isEmpty()) { te.inventory.setStackInSlot(0, player.getHeldItemMainhand()); player.inventory.setInventorySlotContents(player.inventory.currentItem, ItemStack.EMPTY); } - NetworkHooks.openGui((ServerPlayerEntity) player, te, te::sendToContainer); + NetworkHooks.openGui((ServerPlayerEntity) player, te, te::sendToContainer); return true; } } - + @Override public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) { if (worldIn.getTileEntity(pos) == null) @@ -110,5 +91,12 @@ public class SchematicannonBlock extends Block { } } - + + @Override + public ItemDescription getDescription() { + Palette color = Palette.Blue; + return new ItemDescription(color).withSummary("Prints a deployed " + h("Schematic", color) + + "into the world using blocks from inventories placed right next to it."); + } + } diff --git a/src/main/java/com/simibubi/create/modules/symmetry/SymmetryWandItem.java b/src/main/java/com/simibubi/create/modules/symmetry/SymmetryWandItem.java index 04764d69e..15bb7e4c7 100644 --- a/src/main/java/com/simibubi/create/modules/symmetry/SymmetryWandItem.java +++ b/src/main/java/com/simibubi/create/modules/symmetry/SymmetryWandItem.java @@ -7,7 +7,7 @@ import java.util.Map; import com.simibubi.create.AllPackets; import com.simibubi.create.foundation.gui.ScreenOpener; -import com.simibubi.create.foundation.item.ItemWithToolTip; +import com.simibubi.create.foundation.item.InfoItem; import com.simibubi.create.foundation.utility.BlockHelper; import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.foundation.utility.ItemDescription.Palette; @@ -40,17 +40,17 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.network.PacketDistributor; -public class SymmetryWandItem extends ItemWithToolTip { +public class SymmetryWandItem extends InfoItem { public static final String $SYMMETRY = "symmetry"; private static final String $ENABLE = "enable"; - + public SymmetryWandItem(Properties properties) { super(properties.maxStackSize(1)); } @Override - protected ItemDescription getDescription() { + public ItemDescription getDescription() { Palette palette = Palette.Purple; return new ItemDescription(palette) .withSummary("Perfectly mirrors your Block placement across the configured planes.") diff --git a/src/main/resources/assets/create/blockstates/redstone_bridge.json b/src/main/resources/assets/create/blockstates/redstone_bridge.json new file mode 100644 index 000000000..bdc988d68 --- /dev/null +++ b/src/main/resources/assets/create/blockstates/redstone_bridge.json @@ -0,0 +1,17 @@ +{ + "variants": { + "powered=false,facing=up": { "model": "create:block/redstone_bridge" }, + "powered=false,facing=down": { "model": "create:block/redstone_bridge", "x": 180 }, + "powered=false,facing=south": { "model": "create:block/redstone_bridge_side"}, + "powered=false,facing=north": { "model": "create:block/redstone_bridge_side", "y": 180 }, + "powered=false,facing=west": { "model": "create:block/redstone_bridge_side", "y": 90 }, + "powered=false,facing=east": { "model": "create:block/redstone_bridge_side", "y": 270 }, + + "powered=true,facing=up": { "model": "create:block/redstone_bridge_powered" }, + "powered=true,facing=down": { "model": "create:block/redstone_bridge_powered", "x": 180 }, + "powered=true,facing=south": { "model": "create:block/redstone_bridge_side_powered"}, + "powered=true,facing=north": { "model": "create:block/redstone_bridge_side_powered", "y": 180 }, + "powered=true,facing=west": { "model": "create:block/redstone_bridge_side_powered", "y": 90 }, + "powered=true,facing=east": { "model": "create:block/redstone_bridge_side_powered", "y": 270 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/lang/en_us.json b/src/main/resources/assets/create/lang/en_us.json index e706ce821..1ddc79efd 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -23,7 +23,6 @@ "block.create.crushing_wheel": "Crushing Wheel", "block.create.drill": "Mechanical Drill", "block.create.harvester": "Mechanical Harvester", - "block.create.contact": "Redstone Contact", "block.create.water_wheel": "Water Wheel", "block.create.sticky_mechanical_piston": "Sticky Mechanical Piston", @@ -33,6 +32,11 @@ "block.create.construct": "Movement Chassis", "block.create.sticky_construct": "Sticky Chassis", "block.create.relocation_construct": "Relocation Chassis", + + "block.create.contact": "Redstone Contact", + "block.create.redstone_bridge": "Redstone Bridge", + "block.create.stockpile_switch": "Stockpile Switch", + "block.create.flex_crate": "FlexCrate", "block.create.andesite_bricks": "Andesite Bricks", "block.create.diorite_bricks": "Diorite Bricks", diff --git a/src/main/resources/assets/create/models/block/redstone_bridge.json b/src/main/resources/assets/create/models/block/redstone_bridge.json new file mode 100644 index 000000000..b06bd3eb6 --- /dev/null +++ b/src/main/resources/assets/create/models/block/redstone_bridge.json @@ -0,0 +1,57 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "parent": "block/block", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + } + }, + "textures": { + "redstone_antenna": "create:block/redstone_antenna", + "redstone_bridge": "create:block/redstone_bridge", + "particle": "#redstone_bridge" + }, + "elements": [ + { + "name": "Controller", + "from": [ 2, 0, 2 ], + "to": [ 14, 3, 14 ], + "faces": { + "north": { "texture": "#redstone_bridge", "uv": [ 12, 0, 15, 12 ], "rotation": 90 }, + "east": { "texture": "#redstone_bridge", "uv": [ 0, 12, 12, 15 ] }, + "south": { "texture": "#redstone_bridge", "uv": [ 12, 0, 15, 12 ], "rotation": 90 }, + "west": { "texture": "#redstone_bridge", "uv": [ 0, 12, 12, 15 ] }, + "up": { "texture": "#redstone_bridge", "uv": [ 0, 0, 12, 12 ], "rotation": 270 } + } + }, + { + "name": "AntennaX", + "from": [ 0, 1, 4 ], + "to": [ 3, 11, 5 ], + "faces": { + "north": { "texture": "#redstone_antenna", "uv": [ 0, 0, 3, 10 ] }, + "south": { "texture": "#redstone_antenna", "uv": [ 0, 0, 3, 10 ] }, + "down": { "texture": "#redstone_antenna", "uv": [ 0, 9, 3, 10 ] } + } + }, + { + "name": "AntennaZ", + "from": [ 1, 1, 3 ], + "to": [ 2, 11, 6 ], + "faces": { + "east": { "texture": "#redstone_antenna", "uv": [ 0, 0, 3, 10 ] }, + "west": { "texture": "#redstone_antenna", "uv": [ 0, 0, 3, 10 ] } + } + }, + { + "name": "AntennaTop", + "from": [ 1, 9, 4 ], + "to": [ 2, 10, 5 ], + "faces": { + "up": { "texture": "#redstone_antenna", "uv": [ 1, 1, 2, 2 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/redstone_bridge_powered.json b/src/main/resources/assets/create/models/block/redstone_bridge_powered.json new file mode 100644 index 000000000..9365eb044 --- /dev/null +++ b/src/main/resources/assets/create/models/block/redstone_bridge_powered.json @@ -0,0 +1,7 @@ +{ + "parent": "create:block/redstone_bridge", + "textures": { + "redstone_antenna": "create:block/redstone_antenna_powered", + "redstone_bridge": "create:block/redstone_bridge_powered" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/redstone_bridge_side.json b/src/main/resources/assets/create/models/block/redstone_bridge_side.json new file mode 100644 index 000000000..41798dcc1 --- /dev/null +++ b/src/main/resources/assets/create/models/block/redstone_bridge_side.json @@ -0,0 +1,51 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "parent": "block/block", + "textures": { + "redstone_antenna": "create:block/redstone_antenna", + "redstone_bridge_side": "create:block/redstone_bridge_side", + "particle": "#redstone_bridge_side" + }, + "elements": [ + { + "name": "Controller", + "from": [ 3, 1, -1 ], + "to": [ 13, 15, 2 ], + "faces": { + "north": { "texture": "#redstone_bridge_side", "uv": [ 0, 0, 10, 14 ] }, + "east": { "texture": "#redstone_bridge_side", "uv": [ 10, 0, 13, 14 ] }, + "south": { "texture": "#redstone_bridge_side", "uv": [ 0, 0, 10, 14 ] }, + "west": { "texture": "#redstone_bridge_side", "uv": [ 10, 0, 13, 14 ], "rotation": 180 }, + "up": { "texture": "#redstone_bridge_side", "uv": [ 13, 0, 16, 10 ], "rotation": 270 }, + "down": { "texture": "#redstone_bridge_side", "uv": [ 13, 0, 16, 10 ], "rotation": 90 } + } + }, + { + "name": "AntennaX", + "from": [ 3, 11, 2 ], + "to": [ 6, 21, 3 ], + "faces": { + "north": { "texture": "#redstone_antenna", "uv": [ 0, 0, 3, 10 ] }, + "south": { "texture": "#redstone_antenna", "uv": [ 0, 0, 3, 10 ] }, + "down": { "texture": "#redstone_antenna", "uv": [ 0, 9, 3, 10 ] } + } + }, + { + "name": "AntennaZ", + "from": [ 4, 11, 1 ], + "to": [ 5, 21, 4 ], + "faces": { + "east": { "texture": "#redstone_antenna", "uv": [ 0, 0, 3, 10 ] }, + "west": { "texture": "#redstone_antenna", "uv": [ 0, 0, 3, 10 ] } + } + }, + { + "name": "AntennaTop", + "from": [ 4, 19, 2 ], + "to": [ 5, 20, 3 ], + "faces": { + "up": { "texture": "#redstone_antenna", "uv": [ 1, 1, 2, 2 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/redstone_bridge_side_powered.json b/src/main/resources/assets/create/models/block/redstone_bridge_side_powered.json new file mode 100644 index 000000000..c32b98bf0 --- /dev/null +++ b/src/main/resources/assets/create/models/block/redstone_bridge_side_powered.json @@ -0,0 +1,7 @@ +{ + "parent": "create:block/redstone_bridge_side", + "textures": { + "redstone_antenna": "create:block/redstone_antenna_powered", + "redstone_bridge_side": "create:block/redstone_bridge_side_powered" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/redstone_bridge.json b/src/main/resources/assets/create/models/item/redstone_bridge.json new file mode 100644 index 000000000..c3649fcf8 --- /dev/null +++ b/src/main/resources/assets/create/models/item/redstone_bridge.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/redstone_bridge_powered" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/flex_crate.png b/src/main/resources/assets/create/textures/block/flex_crate.png new file mode 100644 index 0000000000000000000000000000000000000000..424a40ac7ad7e8f1e9aa89034fa13cf1a56197ff GIT binary patch literal 528 zcmV+r0`L8aP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0i{VqK~y+Tby7P| z!cZ9PgSN4S0s-stM71sVK8!t=y4T1++#4+Dz%a0%90QSzBl*BuANHg?%bC}p5ua! zWy!J{6Fey<-rn6a2k5RZu0YIU_Oj7tVHYUs+{<9e>*q%x%t4UUcGowu!t+b_xSH%* zLm0_oWSKgfN$7FKFbw^zDd7CxY9bO8;7}tE2-Hlw0E~l?OI$1;q)Xeo{pRCCE0DZE zQ~9sHgOJVFiR}d8;`v!_D<{bu3lsP(cGVQ3dG_~`lw?sDBcn;LWAzxL9#(yjCt6q` zlgDI*Tqfnu*vO&7qRB*k$POaP8jJ$6d|01glp5>5+GJ@lQe@B+9f~McYa=@#mdv#c zBh$Ef!ib_{Nhz#0nwvA8s;UxbzUO(%p2Cts{wvRB!32q+@uBVFAKe#V7U|0Xj_ZdH zI`O79Ed1$7{;*Pp4=GaVb!rY6+kNcxE1@aa@%Vn8H$7&&UhLr!AWL}UIPM!civTPW S*+HWK0000ZF652NZZ*w?6lI5GH$R=N!im zT4MWck1WcZ6)mq(cf|cl#qo@_cUL!lzx-{|V*hlG&nMR(kx+ag`e7lX=#nV{It~F| zjvE*l1r=>B#;`V-t8lVdrn7JhWW?97vTO}w;Z9O7DvQ~eYF*@@5GCB4L0!5Yg-(_l=W8Bp0K0DJqv-HUY^{hWki)5dz WHIG(q*rf|}2ZN`ppUXO@geCyC%T5>o literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/redstone_bridge.png b/src/main/resources/assets/create/textures/block/redstone_bridge.png new file mode 100644 index 0000000000000000000000000000000000000000..e0cd2900c6feee7b2023d3a9e3969050d87c508c GIT binary patch literal 584 zcmV-O0=NB%P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0o_SNK~y+Tol?7Q z)IbzHW6zAeyLd@fpfrdUiGm+Mw1_G_|B??#mpUJi51>kmpynYegs7;9&_1$Rzt&?< z?w#>$ypW0`S!XQ`FEZg0&r5(;=3TD0GKGCO1|}l~!;d3@wzH12u?FL6Ss>LCS1SX%1s>D){PhtoE`N*2-5~H| zMp2tRuD1Ie(~Cz|AWfwEcLJ;~$#$w^w;6bqQz*jGAzAF96)+`^rFZv_gCQj4&EV)9 zgj20av!=bSYu%X>2=?wn)$9vXc`zZ)sql=Q15UxvDcjv~OScIeeHi3V&y0v|F&?Cp z+&!oV53dVglmIhYPey$Wc$2{eV-apy;7KZ-lh8(nq0}2-S!$<%pev^J z_d05&0DW|B+6eDISNj6bp3a)ZubYX18G0000k}@P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0ntfBK~y+Tosuzc z)G!ps|IXP?dPk175@JCx!i2=a0$rGx*!eDe0JhFZdEKz(%_QL)8xLU1@U8 zT^#qlmpHv#H-3`!e{t;R|9iIj@cwPMDl1r%AcO|KZZOh`=%OmHolj9wY)1;(q&PbI zh2rE4f66&Ne=U@HFh#gK1}0kuHE&K7d=o_Tu?2H_Q6jS%r?VQ<3V2Dwzq*Hy2WKjg z6$Ec)%BmiyTMm_ZMq?}05=#QkuE}<0M=}|8RxCyD?~uigET!)*W^OrHM^oJlpU#JH zsgCSFqPa!qP!g=$+r+JIC;rwc(>vf2YHA+a?bQeQ$EU|bxP<4VeGk|cb0;%xutBxv zZeF%}Ov7dqiIX_V4dWzyWl<-Y7ANr<8ScRoiCX#+)=!F@U%DQzPW#G_a&@#)KD`#3t(i>G5rkf;X61iDTIMN4Ymu50Kj6==}^+9x>t z;f4twKiriB)_54*KAI2|O2^N+U8_e8QtKuDe!Srzgua6R0JsL00MhTA{>B*q0000< KMNUMnLSTaFVE-Hd literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/redstone_bridge_side.png b/src/main/resources/assets/create/textures/block/redstone_bridge_side.png new file mode 100644 index 0000000000000000000000000000000000000000..28c13f8882573d9835e2981528f50813a6fe6416 GIT binary patch literal 538 zcmV+#0_FXQP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0k26!K~y+Tos&CG z!$1&*|Mfdh;s_}e9D!p{a0Twd0qCeX1|2o@l%$|S5ekXOJ9g~E@iMdPO>CutPl{$7 zduRUn#}<$Gw{jh)@LUU0=GbRBHfe-TtBsU$&lYf8AN~G2#*-gR<}>)hrhG*?ATHaG zXLX=abCJ;j+Y)HiJustLjKFg+nrDz(Alw00*FCtl#9%na*9frGlLQ}T;xtn+*;XTS zo(t3iN99Qh%$G$0?&3HWMO)pRN7Rn!g(R(@=99`IZ?r;qzAkj4fN^MUhP!id9+7F$ z&kLIRqCgcW%QPgrV?ky^l4lUuCTn%=dlowFk^&wf%cYW??WOvUyO)cHkcg9v=HFt! z*9|NquNk;HDM(8P7qO1tI$%ocjAMQOU?Stt3d`^s4Q%2CMY9DGaomD|M_9#r1KoC@ zqAAX>2PY=7Jf4$R$7Aq&(4a1^U8${1WDl69m!)|7kYc=&;_y^?=IJsivg(G|1G5D~ z#e;RSL%n!Gn6iBHBJmc=h=;oyxr#_%K_~3ehjl!-i54n;4u*%1>G?G}xGkjAbN!d9 cQ-22d1-5;|AJ&n7&;S4c07*qoM6N<$f)(xSr~m)} literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/redstone_bridge_side_powered.png b/src/main/resources/assets/create/textures/block/redstone_bridge_side_powered.png new file mode 100644 index 0000000000000000000000000000000000000000..7edf512335daa35f1be0a3e78c6a55fa5d2e14cc GIT binary patch literal 544 zcmV+*0^j|KP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0kug)K~y+Tos&II z!$1&)-}*lZF-asugG5V9Lq$c!6}Srrprhs(bkxvMKu3_MAVN_h67qu`+p)9Etk;RH zRPafwnT@@(Z{Eb>=ITQJgfSf3fRrm_=?aTDK&$B^rra?FEZar5`+}f9#78)VD@+VW zbBrc{IPf8N>p-JsBc%hTA<(QlUC9uiNWN5wt|fT7+b_%IX3 zsftljjm$Bvnro>%qGFSoF2J`~mO;@}4<|vQ;(nW?X*`$qI&U=FaCD(91&l>~GkiN2 z=N6emT8`JqHyTx-EVCe5ZVECi`ITZ41#0g)23mee0k@E@q>`OxQvJramx~|KT98Lk zoFL2c3yebEj%VkICN3SEhIxF<1ID8-gkk=CZ6agQ2+Qyo3)sXHip3O2#AXTw+`>G} zC(!Xd6^r5wd$469%i}(Ible924;r2Y+pN@9Cb9?2?fpzVy-6{gOR;{d-1B%A>8v^- z_Mn(TLB)fgXoD!%vn>yPQ~Ay~UD iq|9gjU#d?18Q>SkH^Bgd;jU)@0000_b literal 0 HcmV?d00001