From ad19df6d3a0b102c2e54ce2975be76e725f3d9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20Vo=C3=9Fg=C3=A4tter?= Date: Wed, 30 Oct 2024 21:08:51 +0100 Subject: [PATCH] spotless apply --- .../java/techreborn/client/gui/GuiMiner.java | 7 ---- .../machine/tier2/MinerBlockEntity.java | 28 +++++++++++++- .../tier2/miner/MinerProcessingState.java | 30 +++++++++++++-- .../tier2/miner/MinerProcessingStatus.java | 24 ++++++++++++ .../blocks/machine/tier2/MiningPipeBlock.java | 37 ++++++++++++------- 5 files changed, 101 insertions(+), 25 deletions(-) diff --git a/src/client/java/techreborn/client/gui/GuiMiner.java b/src/client/java/techreborn/client/gui/GuiMiner.java index b4f25152d..e82bdbb07 100644 --- a/src/client/java/techreborn/client/gui/GuiMiner.java +++ b/src/client/java/techreborn/client/gui/GuiMiner.java @@ -24,18 +24,11 @@ package techreborn.client.gui; -import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; import net.minecraft.client.gui.DrawContext; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.text.Text; import reborncore.client.gui.GuiBase; -import reborncore.client.gui.widget.GuiButtonUpDown; import reborncore.common.screen.BuiltScreenHandler; import techreborn.blockentity.machine.tier2.MinerBlockEntity; -import techreborn.blockentity.machine.tier2.PumpBlockEntity; -import techreborn.init.TRContent; -import techreborn.packets.serverbound.PumpDepthPayload; -import techreborn.packets.serverbound.PumpRangePayload; public class GuiMiner extends GuiBase { diff --git a/src/main/java/techreborn/blockentity/machine/tier2/MinerBlockEntity.java b/src/main/java/techreborn/blockentity/machine/tier2/MinerBlockEntity.java index 27dbca80a..d436015fe 100644 --- a/src/main/java/techreborn/blockentity/machine/tier2/MinerBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/tier2/MinerBlockEntity.java @@ -1,3 +1,27 @@ +/* + * This file is part of TechReborn, licensed under the MIT License (MIT). + * + * Copyright (c) 2024 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.fabricmc.fabric.api.tag.convention.v2.ConventionalBlockTags; @@ -192,8 +216,8 @@ public void tick(World world, BlockPos pos, BlockState state, MachineBaseBlockEn this.state = new MinerProcessingState.NoPipe(); break; } - if (!moveDrillHead(world, Direction.DOWN, probingState.getHeadPosition())){ - + if (!moveDrillHead(world, Direction.DOWN, probingState.getHeadPosition())){ + //TODO This should basically not happen but change state to drilling maybe? } probingState.setHeadPosition(probingState.getHeadPosition().down()); probingState.setSkipProspectionNextBlock(false); diff --git a/src/main/java/techreborn/blockentity/machine/tier2/miner/MinerProcessingState.java b/src/main/java/techreborn/blockentity/machine/tier2/miner/MinerProcessingState.java index 1b5d37d41..44f6b233f 100644 --- a/src/main/java/techreborn/blockentity/machine/tier2/miner/MinerProcessingState.java +++ b/src/main/java/techreborn/blockentity/machine/tier2/miner/MinerProcessingState.java @@ -1,3 +1,27 @@ +/* + * This file is part of TechReborn, licensed under the MIT License (MIT). + * + * Copyright (c) 2024 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.miner; @@ -233,10 +257,10 @@ public int getRemainingDrillingTime() { public static class Retracting extends MinerProcessingState { BlockPos headPosition; - public Retracting(BlockPos headPosition) { - super(MinerProcessingStatus.RETRACTING); + public Retracting(BlockPos headPosition) { + super(MinerProcessingStatus.RETRACTING); this.headPosition = headPosition; - } + } public BlockPos getHeadPosition() { return headPosition; diff --git a/src/main/java/techreborn/blockentity/machine/tier2/miner/MinerProcessingStatus.java b/src/main/java/techreborn/blockentity/machine/tier2/miner/MinerProcessingStatus.java index 5ea66470a..36505211f 100644 --- a/src/main/java/techreborn/blockentity/machine/tier2/miner/MinerProcessingStatus.java +++ b/src/main/java/techreborn/blockentity/machine/tier2/miner/MinerProcessingStatus.java @@ -1,3 +1,27 @@ +/* + * This file is part of TechReborn, licensed under the MIT License (MIT). + * + * Copyright (c) 2024 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.miner; import net.minecraft.text.Text; diff --git a/src/main/java/techreborn/blocks/machine/tier2/MiningPipeBlock.java b/src/main/java/techreborn/blocks/machine/tier2/MiningPipeBlock.java index d584e7238..9a60fec99 100644 --- a/src/main/java/techreborn/blocks/machine/tier2/MiningPipeBlock.java +++ b/src/main/java/techreborn/blocks/machine/tier2/MiningPipeBlock.java @@ -1,29 +1,40 @@ +/* + * This file is part of TechReborn, licensed under the MIT License (MIT). + * + * Copyright (c) 2024 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.blocks.machine.tier2; -import com.mojang.serialization.MapCodec; -import it.unimi.dsi.fastutil.objects.Object2IntMap; -import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import net.minecraft.block.*; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.entity.player.PlayerEntity; import net.minecraft.state.StateManager; -import net.minecraft.state.property.DirectionProperty; import net.minecraft.state.property.EnumProperty; -import net.minecraft.state.property.Properties; -import net.minecraft.util.ActionResult; import net.minecraft.util.StringIdentifiable; -import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Direction; import net.minecraft.util.shape.VoxelShape; import net.minecraft.util.shape.VoxelShapes; import net.minecraft.world.BlockView; import net.minecraft.world.World; -import org.jetbrains.annotations.Nullable; import techreborn.init.TRBlockSettings; -import techreborn.init.TRContent; -import java.util.Objects; public class MiningPipeBlock extends Block implements Waterloggable {