From ad81e8cc8c5ef1a26b6b7d0aefce94435fb61f61 Mon Sep 17 00:00:00 2001 From: Ayutac Date: Sun, 18 Dec 2022 13:24:10 +0100 Subject: [PATCH] 1.19 fishing station (#3071) * added fishing station w/o recipe or functionality * added render cutout * fixed model parent * added config stuff and water check * added inventory * added functionality * added fishing station to vanilla creative menu * fixed GUI rendering * added recipe+advancement * fixed hotbar icon Co-authored-by: modmuss50 --- .../java/techreborn/TechRebornClient.java | 1 + .../java/techreborn/client/ClientGuiType.java | 2 + .../client/gui/GuiFishingStation.java | 67 ++++++ .../java/techreborn/blockentity/GuiType.java | 2 + .../tier2/FishingStationBlockEntity.java | 192 ++++++++++++++++++ .../techreborn/config/TechRebornConfig.java | 12 ++ .../java/techreborn/init/TRBlockEntities.java | 2 + src/main/java/techreborn/init/TRContent.java | 2 + .../java/techreborn/init/TRItemGroup.java | 3 +- .../blockstates/fishing_station.json | 8 + .../assets/techreborn/lang/en_us.json | 1 + .../tier2_machines/fishing_station.json | 94 +++++++++ .../models/item/fishing_station.json | 10 + .../tier2_machines/fishing_station.png | Bin 0 -> 644 bytes .../tier2_machines/fishing_station_net.png | Bin 0 -> 351 bytes .../fishing_station_net_side.png | Bin 0 -> 183 bytes .../machine/fishing_station.json | 32 +++ .../machine/fishing_station.json | 28 +++ 18 files changed, 455 insertions(+), 1 deletion(-) create mode 100644 src/client/java/techreborn/client/gui/GuiFishingStation.java create mode 100644 src/main/java/techreborn/blockentity/machine/tier2/FishingStationBlockEntity.java create mode 100644 src/main/resources/assets/techreborn/blockstates/fishing_station.json create mode 100644 src/main/resources/assets/techreborn/models/block/machines/tier2_machines/fishing_station.json create mode 100644 src/main/resources/assets/techreborn/models/item/fishing_station.json create mode 100644 src/main/resources/assets/techreborn/textures/block/machines/tier2_machines/fishing_station.png create mode 100644 src/main/resources/assets/techreborn/textures/block/machines/tier2_machines/fishing_station_net.png create mode 100644 src/main/resources/assets/techreborn/textures/block/machines/tier2_machines/fishing_station_net_side.png create mode 100644 src/main/resources/data/techreborn/advancements/recipes/crafting_table/machine/fishing_station.json create mode 100644 src/main/resources/data/techreborn/recipes/crafting_table/machine/fishing_station.json diff --git a/src/client/java/techreborn/TechRebornClient.java b/src/client/java/techreborn/TechRebornClient.java index 1a791ade4..ea6f7ab9c 100644 --- a/src/client/java/techreborn/TechRebornClient.java +++ b/src/client/java/techreborn/TechRebornClient.java @@ -132,6 +132,7 @@ public class TechRebornClient implements ClientModInitializer { BlockRenderLayerMap.INSTANCE.putBlock(TRContent.REINFORCED_GLASS, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(TRContent.Machine.RESIN_BASIN.block, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(TRContent.POTTED_RUBBER_SAPLING, RenderLayer.getCutout()); + BlockRenderLayerMap.INSTANCE.putBlock(TRContent.Machine.FISHING_STATION.block, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(TRContent.RUBBER_LEAVES, RenderLayer.getCutoutMipped()); diff --git a/src/client/java/techreborn/client/ClientGuiType.java b/src/client/java/techreborn/client/ClientGuiType.java index e29bcb67e..767cd3a0d 100644 --- a/src/client/java/techreborn/client/ClientGuiType.java +++ b/src/client/java/techreborn/client/ClientGuiType.java @@ -44,6 +44,7 @@ import techreborn.blockentity.machine.multiblock.*; import techreborn.blockentity.machine.tier0.block.BlockBreakerBlockEntity; import techreborn.blockentity.machine.tier0.block.BlockPlacerBlockEntity; import techreborn.blockentity.machine.tier1.*; +import techreborn.blockentity.machine.tier2.FishingStationBlockEntity; import techreborn.blockentity.machine.tier2.LaunchpadBlockEntity; import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity; import techreborn.blockentity.machine.tier3.IndustrialCentrifugeBlockEntity; @@ -115,6 +116,7 @@ public class ClientGuiType { public static final ClientGuiType BLOCK_PLACER = register(GuiType.BLOCK_PLACER, GuiBlockPlacer::new); public static final ClientGuiType LAUNCHPAD = register(GuiType.LAUNCHPAD, GuiLaunchpad::new); public static final ClientGuiType ELEVATOR = register(GuiType.ELEVATOR, GuiElevator::new); + public static final ClientGuiType FISHING_STATION = register(GuiType.FISHING_STATION, GuiFishingStation::new); private static ClientGuiType register(GuiType type, GuiFactory factory) { return new ClientGuiType<>(type, factory); diff --git a/src/client/java/techreborn/client/gui/GuiFishingStation.java b/src/client/java/techreborn/client/gui/GuiFishingStation.java new file mode 100644 index 000000000..bac523af6 --- /dev/null +++ b/src/client/java/techreborn/client/gui/GuiFishingStation.java @@ -0,0 +1,67 @@ +/* + * This file is part of TechReborn, licensed under the MIT License (MIT). + * + * Copyright (c) 2020 TechReborn + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package techreborn.client.gui; + +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.entity.player.PlayerEntity; +import reborncore.client.gui.builder.GuiBase; +import reborncore.common.screen.BuiltScreenHandler; +import techreborn.blockentity.machine.tier2.FishingStationBlockEntity; + +public class GuiFishingStation extends GuiBase { + + FishingStationBlockEntity blockEntity; + + public GuiFishingStation(int syncID, final PlayerEntity player, final FishingStationBlockEntity blockEntity) { + super(player, blockEntity, blockEntity.createScreenHandler(syncID, player)); + this.blockEntity = blockEntity; + } + + @Override + protected void drawBackground(MatrixStack matrixStack, final float f, final int mouseX, final int mouseY) { + super.drawBackground(matrixStack, f, mouseX, mouseY); + final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND; + + drawSlot(matrixStack, 8, 72, layer); + + int gridYPos = 22; + drawSlot(matrixStack, 30, gridYPos, layer); + drawSlot(matrixStack, 48, gridYPos, layer); + drawSlot(matrixStack, 30, gridYPos + 18, layer); + drawSlot(matrixStack, 48, gridYPos + 18, layer); + drawSlot(matrixStack, 30, gridYPos + 36, layer); + drawSlot(matrixStack, 48, gridYPos + 36, layer); + + } + + @Override + protected void drawForeground(MatrixStack matrixStack, final int mouseX, final int mouseY) { + super.drawForeground(matrixStack, mouseX, mouseY); + final Layer layer = Layer.FOREGROUND; + + builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer); + } + +} diff --git a/src/main/java/techreborn/blockentity/GuiType.java b/src/main/java/techreborn/blockentity/GuiType.java index 6f9b31732..f39bd462f 100644 --- a/src/main/java/techreborn/blockentity/GuiType.java +++ b/src/main/java/techreborn/blockentity/GuiType.java @@ -57,6 +57,7 @@ import techreborn.blockentity.machine.multiblock.*; import techreborn.blockentity.machine.tier0.block.BlockBreakerBlockEntity; import techreborn.blockentity.machine.tier0.block.BlockPlacerBlockEntity; import techreborn.blockentity.machine.tier1.*; +import techreborn.blockentity.machine.tier2.FishingStationBlockEntity; import techreborn.blockentity.machine.tier2.LaunchpadBlockEntity; import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity; import techreborn.blockentity.machine.tier3.IndustrialCentrifugeBlockEntity; @@ -125,6 +126,7 @@ public final class GuiType implements IMachineGuiHandler public static final GuiType BLOCK_PLACER = register("block_placer"); public static final GuiType LAUNCHPAD = register("launchpad"); public static final GuiType ELEVATOR = register("elevator"); + public static final GuiType FISHING_STATION = register("fishing_station"); private static GuiType register(String id) { return register(new Identifier("techreborn", id)); diff --git a/src/main/java/techreborn/blockentity/machine/tier2/FishingStationBlockEntity.java b/src/main/java/techreborn/blockentity/machine/tier2/FishingStationBlockEntity.java new file mode 100644 index 000000000..c372c01a5 --- /dev/null +++ b/src/main/java/techreborn/blockentity/machine/tier2/FishingStationBlockEntity.java @@ -0,0 +1,192 @@ +/* + * This file is part of TechReborn, licensed under the MIT License (MIT). + * + * Copyright (c) 2020 TechReborn + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package techreborn.blockentity.machine.tier2; + +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.fluid.FluidState; +import net.minecraft.fluid.Fluids; +import net.minecraft.item.ItemStack; +import net.minecraft.loot.LootTable; +import net.minecraft.loot.LootTables; +import net.minecraft.loot.context.LootContext; +import net.minecraft.loot.context.LootContextParameters; +import net.minecraft.loot.context.LootContextTypes; +import net.minecraft.nbt.NbtCompound; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; +import reborncore.api.IToolDrop; +import reborncore.api.blockentity.InventoryProvider; +import reborncore.common.blockentity.MachineBaseBlockEntity; +import reborncore.common.blockentity.RedstoneConfiguration; +import reborncore.common.powerSystem.PowerAcceptorBlockEntity; +import reborncore.common.screen.BuiltScreenHandler; +import reborncore.common.screen.BuiltScreenHandlerProvider; +import reborncore.common.screen.builder.ScreenHandlerBuilder; +import reborncore.common.util.ItemUtils; +import reborncore.common.util.RebornInventory; +import techreborn.config.TechRebornConfig; +import techreborn.init.TRBlockEntities; +import techreborn.init.TRContent; + +import java.util.List; + +public class FishingStationBlockEntity extends PowerAcceptorBlockEntity implements IToolDrop, InventoryProvider, BuiltScreenHandlerProvider { + + private final RebornInventory inventory = new RebornInventory<>(7, "FishingStationBlockEntity", 64, this); + + public FishingStationBlockEntity(BlockPos pos, BlockState state) { + super(TRBlockEntities.FISHING_STATION, pos, state); + } + + private boolean insertIntoInv(List stacks) { + boolean result = false; + for (ItemStack stack : stacks) { + for (int i = 0; i < 6; i++) { + if (insertIntoInv(i, stack)) result = true; + if (stack.isEmpty()) break; + } + } + return result; + } + + private boolean insertIntoInv(int slot, ItemStack stack) { + ItemStack targetStack = inventory.getStack(slot); + if (targetStack.isEmpty()) { + inventory.setStack(slot, stack.copy()); + stack.decrement(stack.getCount()); + return true; + } else { + if (ItemUtils.isItemEqual(stack, targetStack, true, false)) { + int freeStackSpace = targetStack.getMaxCount() - targetStack.getCount(); + if (freeStackSpace > 0) { + int transferAmount = Math.min(freeStackSpace, stack.getCount()); + targetStack.increment(transferAmount); + stack.decrement(transferAmount); + return true; + } + } + } + return false; + } + + // PowerAcceptorBlockEntity + @Override + public void tick(World world, BlockPos pos, BlockState state, MachineBaseBlockEntity blockEntity) { + super.tick(world, pos, state, blockEntity); + if (!(world instanceof ServerWorld) || getStored() <= TechRebornConfig.fishingStationEnergyPerCatch || !isActive(RedstoneConfiguration.POWER_IO)) { + return; + } + + if (world.getTime() % TechRebornConfig.fishingStationInterval != 0) { + return; + } + + BlockPos frontPos = pos.offset(getFacing()); + FluidState frontFluid = world.getFluidState(frontPos); + if (!frontFluid.isEqualAndStill(Fluids.WATER)) { + return; + } + + if (getStored() > TechRebornConfig.fishingStationEnergyPerCatch) { + LootContext.Builder builder = (new LootContext.Builder((ServerWorld)this.world)).parameter(LootContextParameters.ORIGIN, new Vec3d(frontPos.getX()+0.5,frontPos.getY()-0.5,frontPos.getZ()+0.5)).parameter(LootContextParameters.TOOL, TRContent.Machine.FISHING_STATION.getStack()).random(world.random); + LootTable lootTable = this.world.getServer().getLootManager().getTable(LootTables.FISHING_GAMEPLAY); + List list = lootTable.generateLoot(builder.build(LootContextTypes.FISHING)); + insertIntoInv(list); + useEnergy(TechRebornConfig.fishingStationEnergyPerCatch); + } + } + + @Override + public long getBaseMaxPower() { + return TechRebornConfig.fishingStationMaxEnergy; + } + + @Override + public boolean canProvideEnergy(@Nullable Direction side) { + return false; + } + + @Override + public long getBaseMaxOutput() { + return 0; + } + + @Override + public long getBaseMaxInput() { + return TechRebornConfig.fishingStationMaxInput; + } + + @Override + public void readNbt(NbtCompound tag) { + super.readNbt(tag); + } + + @Override + public void writeNbt(NbtCompound tag) { + super.writeNbt(tag); + } + + // MachineBaseBlockEntity + @Override + public boolean hasSlotConfig() { + return false; + } + + @Override + public boolean canBeUpgraded() { + return false; + } + + // IToolDrop + @Override + public ItemStack getToolDrop(PlayerEntity p0) { + return TRContent.Machine.FISHING_STATION.getStack(); + } + + // InventoryProvider + @Override + public RebornInventory getInventory() { + return this.inventory; + } + + // BuiltScreenHandlerProvider + @Override + public BuiltScreenHandler createScreenHandler(int syncID, PlayerEntity player) { + return new ScreenHandlerBuilder("fishing_station") + .player(player.getInventory()) + .inventory().hotbar().addInventory() + .blockEntity(this) + .outputSlot(0, 30, 22).outputSlot(1, 48, 22) + .outputSlot(2, 30, 40).outputSlot(3, 48, 40) + .outputSlot(4, 30, 58).outputSlot(5, 48, 58) + .energySlot(6, 8, 72).syncEnergyValue() + .addInventory().create(this, syncID); + } +} diff --git a/src/main/java/techreborn/config/TechRebornConfig.java b/src/main/java/techreborn/config/TechRebornConfig.java index eea93cb60..9086919aa 100644 --- a/src/main/java/techreborn/config/TechRebornConfig.java +++ b/src/main/java/techreborn/config/TechRebornConfig.java @@ -633,6 +633,18 @@ public class TechRebornConfig { @Config(config = "machines", category = "elevator", key = "AllowElevatingThroughBlocks", comment = "Allow elevating through blocks (i.e. non air)") public static boolean allowElevatingThroughBlocks = true; + @Config(config = "machines", category = "fishing_station", key = "FishingStationMaxInput", comment = "Fishing Station Max Input (Energy per tick)") + public static int fishingStationMaxInput = 128; + + @Config(config = "machines", category = "fishing_station", key = "FishingStationMaxEnergy", comment = "Fishing Station Max Energy") + public static int fishingStationMaxEnergy = 10_000; + + @Config(config = "machines", category = "fishing_station", key = "FishingStationEnergyPerCatch", comment = "How much energy the Fishing Station uses per catch") + public static int fishingStationEnergyPerCatch = 500; + + @Config(config = "machines", category = "fishing_station", key = "FishingStationInterval", comment = "Fishing Station Catch Interval in Ticks > 0") + public static int fishingStationInterval = 400; // 20 seconds + // Misc @Config(config = "misc", category = "general", key = "IC2TransformersStyle", comment = "Input from dots side, output from other sides, like in IC2.") public static boolean IC2TransformersStyle = true; diff --git a/src/main/java/techreborn/init/TRBlockEntities.java b/src/main/java/techreborn/init/TRBlockEntities.java index 37c056eba..cac5fca52 100644 --- a/src/main/java/techreborn/init/TRBlockEntities.java +++ b/src/main/java/techreborn/init/TRBlockEntities.java @@ -55,6 +55,7 @@ import techreborn.blockentity.machine.multiblock.casing.MachineCasingBlockEntity import techreborn.blockentity.machine.tier0.block.BlockBreakerBlockEntity; import techreborn.blockentity.machine.tier0.block.BlockPlacerBlockEntity; import techreborn.blockentity.machine.tier1.*; +import techreborn.blockentity.machine.tier2.FishingStationBlockEntity; import techreborn.blockentity.machine.tier2.LaunchpadBlockEntity; import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity; import techreborn.blockentity.machine.tier3.IndustrialCentrifugeBlockEntity; @@ -147,6 +148,7 @@ public class TRBlockEntities { public static final BlockEntityType BLOCK_PLACER = register(BlockPlacerBlockEntity::new, "block_placer", TRContent.Machine.BLOCK_PLACER); public static final BlockEntityType LAUNCHPAD = register(LaunchpadBlockEntity::new, "launchpad", TRContent.Machine.LAUNCHPAD); public static final BlockEntityType ELEVATOR = register(ElevatorBlockEntity::new, "elevator", TRContent.Machine.ELEVATOR); + public static final BlockEntityType FISHING_STATION = register(FishingStationBlockEntity::new, "fishing_station", TRContent.Machine.FISHING_STATION); public static BlockEntityType register(BiFunction supplier, String name, ItemConvertible... items) { return register(supplier, name, Arrays.stream(items).map(itemConvertible -> Block.getBlockFromItem(itemConvertible.asItem())).toArray(Block[]::new)); diff --git a/src/main/java/techreborn/init/TRContent.java b/src/main/java/techreborn/init/TRContent.java index b6a5bd0a4..9bbe3f569 100644 --- a/src/main/java/techreborn/init/TRContent.java +++ b/src/main/java/techreborn/init/TRContent.java @@ -92,6 +92,7 @@ import techreborn.blockentity.machine.tier1.RollingMachineBlockEntity; import techreborn.blockentity.machine.tier1.ScrapboxinatorBlockEntity; import techreborn.blockentity.machine.tier1.SolidCanningMachineBlockEntity; import techreborn.blockentity.machine.tier1.WireMillBlockEntity; +import techreborn.blockentity.machine.tier2.FishingStationBlockEntity; import techreborn.blockentity.machine.tier2.LaunchpadBlockEntity; import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity; import techreborn.blockentity.machine.tier3.IndustrialCentrifugeBlockEntity; @@ -816,6 +817,7 @@ public class TRContent { BLOCK_PLACER(new GenericMachineBlock(GuiType.BLOCK_PLACER, BlockPlacerBlockEntity::new)), LAUNCHPAD(new GenericMachineBlock(GuiType.LAUNCHPAD, LaunchpadBlockEntity::new)), ELEVATOR(new GenericMachineBlock(GuiType.ELEVATOR, ElevatorBlockEntity::new)), + FISHING_STATION(new GenericMachineBlock(GuiType.FISHING_STATION, FishingStationBlockEntity::new)), DIESEL_GENERATOR(new GenericGeneratorBlock(GuiType.DIESEL_GENERATOR, DieselGeneratorBlockEntity::new)), DRAGON_EGG_SYPHON(new GenericGeneratorBlock(null, DragonEggSyphonBlockEntity::new)), diff --git a/src/main/java/techreborn/init/TRItemGroup.java b/src/main/java/techreborn/init/TRItemGroup.java index 9da3e3fb4..b2af5f30b 100644 --- a/src/main/java/techreborn/init/TRItemGroup.java +++ b/src/main/java/techreborn/init/TRItemGroup.java @@ -462,7 +462,8 @@ public class TRItemGroup { TRContent.Machine.DISTILLATION_TOWER); entries.addAfter(Items.CAULDRON, TRContent.Machine.DRAIN, - TRContent.Machine.FLUID_REPLICATOR); + TRContent.Machine.FLUID_REPLICATOR, + TRContent.Machine.FISHING_STATION); entries.addAfter(Items.LODESTONE, TRContent.Machine.CHUNK_LOADER); entries.addAfter(Items.BEEHIVE, TRContent.Machine.GREENHOUSE_CONTROLLER); entries.addAfter(Items.LIGHTNING_ROD, TRContent.Machine.LIGHTNING_ROD); diff --git a/src/main/resources/assets/techreborn/blockstates/fishing_station.json b/src/main/resources/assets/techreborn/blockstates/fishing_station.json new file mode 100644 index 000000000..181bbab8a --- /dev/null +++ b/src/main/resources/assets/techreborn/blockstates/fishing_station.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=north": { "model": "techreborn:block/machines/tier2_machines/fishing_station" }, + "facing=south": { "model": "techreborn:block/machines/tier2_machines/fishing_station", "y": 180 }, + "facing=west": { "model": "techreborn:block/machines/tier2_machines/fishing_station", "y": 270 }, + "facing=east": { "model": "techreborn:block/machines/tier2_machines/fishing_station", "y": 90 } + } +} diff --git a/src/main/resources/assets/techreborn/lang/en_us.json b/src/main/resources/assets/techreborn/lang/en_us.json index afbd684d6..1c20e339b 100644 --- a/src/main/resources/assets/techreborn/lang/en_us.json +++ b/src/main/resources/assets/techreborn/lang/en_us.json @@ -34,6 +34,7 @@ "block.techreborn.industrial_grinder": "Industrial Grinder", "block.techreborn.launchpad": "Launchpad", "block.techreborn.elevator": "Elevator", + "block.techreborn.fishing_station": "Fishing Station", "block.techreborn.chunk_loader": "Industrial Chunkloader", "block.techreborn.diesel_generator": "Diesel Generator", "block.techreborn.drain": "Drain", diff --git a/src/main/resources/assets/techreborn/models/block/machines/tier2_machines/fishing_station.json b/src/main/resources/assets/techreborn/models/block/machines/tier2_machines/fishing_station.json new file mode 100644 index 000000000..d5b9869a8 --- /dev/null +++ b/src/main/resources/assets/techreborn/models/block/machines/tier2_machines/fishing_station.json @@ -0,0 +1,94 @@ +{ + "parent": "minecraft:block/orientable", + "credit": "Made with Blockbench", + "textures": { + "0": "techreborn:block/machines/tier2_machines/machine_top", + "1": "techreborn:block/machines/tier2_machines/machine_east", + "2": "techreborn:block/machines/tier2_machines/machine_west", + "4": "techreborn:block/machines/tier2_machines/machine_bottom", + "5": "techreborn:block/machines/tier2_machines/machine_back", + "6": "techreborn:block/machines/tier2_machines/fishing_station", + "7": "techreborn:block/machines/tier2_machines/fishing_station_net", + "8": "techreborn:block/machines/tier2_machines/fishing_station_net_side", + "particle": "techreborn:block/machines/tier2_machines/machine_top" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#6"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#5"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#2"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#4"} + } + }, + { + "from": [1, 0, -10], + "to": [2, 1, 4], + "rotation": {"angle": 22.5, "axis": "x", "origin": [1, 0, 4]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#7"}, + "east": {"uv": [0, 0, 1, 14], "rotation": 90, "texture": "#7"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#7"}, + "west": {"uv": [0, 0, 1, 14], "rotation": 270, "texture": "#7"}, + "up": {"uv": [0, 0, 1, 14], "texture": "#7"}, + "down": {"uv": [0, 0, 1, 14], "rotation": 180, "texture": "#7"} + } + }, + { + "from": [14, 0, -10], + "to": [15, 1, 4], + "rotation": {"angle": 22.5, "axis": "x", "origin": [1, 0, 4]}, + "faces": { + "north": {"uv": [0, 0, 1, 1], "rotation": 180, "texture": "#7"}, + "east": {"uv": [0, 0, 1, 14], "rotation": 90, "texture": "#7"}, + "south": {"uv": [0, 0, 1, 1], "texture": "#7"}, + "west": {"uv": [0, 0, 1, 14], "rotation": 270, "texture": "#7"}, + "up": {"uv": [0, 0, 1, 14], "texture": "#7"}, + "down": {"uv": [0, 0, 1, 14], "rotation": 180, "texture": "#7"} + } + }, + { + "from": [2, 0.5, -9.5], + "to": [14, 0.5, 4.5], + "rotation": {"angle": 22.5, "axis": "x", "origin": [1, 0, 4]}, + "faces": { + "north": {"uv": [0, 0, 12, 0], "rotation": 180, "texture": "#7"}, + "east": {"uv": [0, 0, 0, 14], "rotation": 90, "texture": "#7"}, + "south": {"uv": [0, 0, 12, 0], "texture": "#7"}, + "west": {"uv": [0, 0, 0, 14], "rotation": 270, "texture": "#7"}, + "up": {"uv": [4, 0, 16, 14], "texture": "#7"}, + "down": {"uv": [4, 0, 16, 14], "rotation": 180, "texture": "#7"} + } + }, + { + "from": [14.5, 1, -5], + "to": [14.5, 10, 4], + "rotation": {"angle": -22.5, "axis": "x", "origin": [1, 0, 4]}, + "faces": { + "north": {"uv": [0, 0, 0, 9], "texture": "#missing"}, + "east": {"uv": [7, 0, 16, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 0, 9], "texture": "#missing"}, + "west": {"uv": [7, 0, 16, 9], "rotation": 90, "texture": "#8"}, + "up": {"uv": [0, 0, 0, 9], "texture": "#missing"}, + "down": {"uv": [0, 0, 0, 9], "texture": "#missing"} + } + }, + { + "from": [1.5, 1, -5], + "to": [1.5, 10, 4], + "rotation": {"angle": -22.5, "axis": "x", "origin": [1, 0, 4]}, + "faces": { + "north": {"uv": [0, 0, 0, 9], "texture": "#missing"}, + "east": {"uv": [7, 0, 16, 9], "texture": "#8"}, + "south": {"uv": [0, 0, 0, 9], "texture": "#missing"}, + "west": {"uv": [7, 0, 16, 9], "rotation": 90, "texture": "#8"}, + "up": {"uv": [0, 0, 0, 9], "texture": "#missing"}, + "down": {"uv": [0, 0, 0, 9], "texture": "#missing"} + } + } + ] +} diff --git a/src/main/resources/assets/techreborn/models/item/fishing_station.json b/src/main/resources/assets/techreborn/models/item/fishing_station.json new file mode 100644 index 000000000..8ad8a5c8c --- /dev/null +++ b/src/main/resources/assets/techreborn/models/item/fishing_station.json @@ -0,0 +1,10 @@ +{ + "parent": "techreborn:block/machines/tier2_machines/fishing_station", + "display": { + "gui": { + "rotation": [ 30, 225, 0 ], + "translation": [ -1, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/techreborn/textures/block/machines/tier2_machines/fishing_station.png b/src/main/resources/assets/techreborn/textures/block/machines/tier2_machines/fishing_station.png new file mode 100644 index 0000000000000000000000000000000000000000..1d16f7cd04987ea9442107fe007b4dc8734f1190 GIT binary patch literal 644 zcmV-~0(Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0vSm}K~y+TjZ-^| z6hRRFdZy>KbAlq9+^xz5W}1qzh=G})U?d`#8k-CL0})I`V=>nFFfbAkOvDF=atJ!^ z?7Vuqt*_RB4GgxR=$fJ)-&a**-n{=9y!Yt)0nRyCYsK!-y8$+~XxbJq1_nSkI1Iyp za%V?loEu>d-hBvXPcN`sE-{lav>fkNxC{>vJ z_~HF^VACLqjN0A@c}MxSlGGv+B;JqcrNM(o&!uPsOZa)7V-Uzsp1st>Nyc$hN)*zI z<5=xW7tf;=6flt#6(^y}Af!{I#i*%J;G1Qc>ZYGfS&&qtjsp{J?6$24Gu1Rn5m`Zy z$Y9ugvq(`C+L;unv?qUAWIB_Eb7{LCf9ghP2&WApt^W!Aq)^qZA~5&v+z5GIp!)p_ zPhY%No)mU9GIjE#B(hH0^j|o)k7H$_)CGBj-Mw86+E$2QKA-Cw5jrm_{l{?<&VwtR zW-zUneh$#dJ4jySM~~HNr9-6hd>Kr*JgPxXJV*w=sZ~`WOA{HqT_a#s-oP}(x~?^m z%3U*viCx>F<$obUKjVqS+`V}6b?tK4TP)-%V~kRnKa@h3({|EXX~_oKX5HO;r<7uw;M3|p7w)C3Vn*&WR6qx^4ytXY+D=eCHvPpK*)|)3o50`P)ZEwnd`&htlfn2!E z@glj!tiR4Gt*aNb3wO>~`*PWoSJ}pH>jMwG{nOn4w83fO%$;+q3SL{r^jYsYzvl~Y z*=M=9Y%|jiv05(Iv^0r53%^cst-0m=d+rzBo~?nKKGbt;l-sH)GIQp!DE%mlx8`4% zR?b{`#(C~4U*2iV?LgyZ$^>Sm+4W`^VKOhRzoV1>VK?uKkXb${X|wbnSXRzRmfdl6 d3h$I%%sHk7`+{j+g)d literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/techreborn/textures/block/machines/tier2_machines/fishing_station_net_side.png b/src/main/resources/assets/techreborn/textures/block/machines/tier2_machines/fishing_station_net_side.png new file mode 100644 index 0000000000000000000000000000000000000000..64f2f762763615a10cadec27fdb8345dbb26b170 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucK_5>S#}EturDr#CG8phMJDz_Xxu@8PCthWV z!6j3ttH%RFz3-iQvp7$Bs@?5nOUv~yD^<@FyQ#mDXEhHRmJyV$II+GlH)-Eypt%g5 Lu6{1-oD!M