diff --git a/src/main/java/com/hechu/mindustry/block/MechanicalDrill.java b/src/main/java/com/hechu/mindustry/block/MechanicalDrill.java index b1ebeb9..39e604e 100644 --- a/src/main/java/com/hechu/mindustry/block/MechanicalDrill.java +++ b/src/main/java/com/hechu/mindustry/block/MechanicalDrill.java @@ -1,9 +1,7 @@ package com.hechu.mindustry.block; import net.minecraft.core.BlockPos; -import net.minecraft.tags.BlockTags; import net.minecraft.world.level.Level; -import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.BaseEntityBlock; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.entity.BlockEntity; @@ -30,7 +28,6 @@ public BlockEntity newBlockEntity(@NotNull BlockPos pos, @NotNull BlockState sta @Override public @NotNull RenderShape getRenderShape(@NotNull BlockState state) { return RenderShape.ENTITYBLOCK_ANIMATED; -// return RenderShape.MODEL; } @Nullable diff --git a/src/main/java/com/hechu/mindustry/block/MechanicalDrillBlockEntity.java b/src/main/java/com/hechu/mindustry/block/MechanicalDrillBlockEntity.java index de1e89d..aa9f7fd 100644 --- a/src/main/java/com/hechu/mindustry/block/MechanicalDrillBlockEntity.java +++ b/src/main/java/com/hechu/mindustry/block/MechanicalDrillBlockEntity.java @@ -23,17 +23,12 @@ public class MechanicalDrillBlockEntity extends BlockEntity implements GeoBlockEntity { public static final String NAME = "mechanical_drill"; private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); - - // We statically instantiate our RawAnimations for efficiency, consistency, and error-proofing private static final RawAnimation ROTATION_ANIMS = RawAnimation.begin().thenLoop("mechanical_drill.rotation"); public MechanicalDrillBlockEntity(BlockPos pos, BlockState state) { super(MECHANICAL_DRILL_BLOCK_ENTITY.get(), pos, state); } - // Let's set our animations up - // For this one, we want it to play the "Fertilizer" animation set if it's raining, - // or switch to a botarium if it's not. @Override public void registerControllers(AnimatableManager.ControllerRegistrar controllerRegistrar) { controllerRegistrar.add(new AnimationController<>(this, state -> state.setAndContinue(ROTATION_ANIMS))); @@ -75,12 +70,6 @@ public void tick() { } if (isMining) { progress += 0.4 / 20; - /*PlayerList playerList = level.getServer() == null ? null : level.getServer().getPlayerList(); - if (playerList != null && playerList.getPlayerCount() > 0) { - for (ServerPlayer player : playerList.getPlayers()) { - level.destroyBlockProgress(player.getId(), miningBlockPos, (int) Math.ceil(counter * 10)); - } - }*/ if (progress >= 1) { for (ItemStack drop : Block.getDrops(miningBlockState, (ServerLevel) level, miningBlockPos, null)) { Block.popResource(level, getBlockPos().above(), drop); @@ -91,15 +80,6 @@ public void tick() { } else { progress = 0; } - /*if (counter++ % 100 == 0) { - BlockState belowBlockState = level.getBlockState(getBlockPos().below()); - if (belowBlockState.getTags().anyMatch(tag -> tag.equals(BlockTags.COPPER_ORES))) { - level.removeBlock(getBlockPos().below(), true); - for (ItemStack drop : Block.getDrops(belowBlockState, (ServerLevel) level, getBlockPos().below(), null)) { - Block.popResource(level, getBlockPos().below(), drop); - } - } - }*/ } public float getProgress() { diff --git a/src/main/java/com/hechu/mindustry/block/MechanicalDrillBlockEntityRenderer.java b/src/main/java/com/hechu/mindustry/block/MechanicalDrillBlockEntityRenderer.java index 8ea0df3..683a417 100644 --- a/src/main/java/com/hechu/mindustry/block/MechanicalDrillBlockEntityRenderer.java +++ b/src/main/java/com/hechu/mindustry/block/MechanicalDrillBlockEntityRenderer.java @@ -1,7 +1,6 @@ package com.hechu.mindustry.block; import com.hechu.mindustry.model.MechanicalDrillModel; -import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; import software.bernie.geckolib.renderer.GeoBlockRenderer; public class MechanicalDrillBlockEntityRenderer extends GeoBlockRenderer { diff --git a/src/main/java/com/hechu/mindustry/item/MechanicalDrill.java b/src/main/java/com/hechu/mindustry/item/MechanicalDrill.java index 013731e..68cbb3b 100644 --- a/src/main/java/com/hechu/mindustry/item/MechanicalDrill.java +++ b/src/main/java/com/hechu/mindustry/item/MechanicalDrill.java @@ -14,7 +14,7 @@ import java.util.function.Consumer; public class MechanicalDrill extends BlockItem implements GeoItem { - private AnimatableInstanceCache cache = new SingletonAnimatableInstanceCache(this); + private final AnimatableInstanceCache cache = new SingletonAnimatableInstanceCache(this); private static final RawAnimation ROTATION_ANIMS = RawAnimation.begin().thenLoop("mechanical_drill.rotation"); diff --git a/src/main/java/com/hechu/mindustry/item/MechanicalDrillModel.java b/src/main/java/com/hechu/mindustry/item/MechanicalDrillModel.java index cc19a50..eddbf1d 100644 --- a/src/main/java/com/hechu/mindustry/item/MechanicalDrillModel.java +++ b/src/main/java/com/hechu/mindustry/item/MechanicalDrillModel.java @@ -1,7 +1,6 @@ package com.hechu.mindustry.item; import com.hechu.mindustry.Mindustry; -import com.hechu.mindustry.block.MechanicalDrillBlockEntity; import net.minecraft.resources.ResourceLocation; import software.bernie.geckolib.model.GeoModel; diff --git a/src/main/java/com/hechu/mindustry/jade/ExampleComponentProvider.java b/src/main/java/com/hechu/mindustry/jade/ExampleComponentProvider.java index f2d443c..de89508 100644 --- a/src/main/java/com/hechu/mindustry/jade/ExampleComponentProvider.java +++ b/src/main/java/com/hechu/mindustry/jade/ExampleComponentProvider.java @@ -6,7 +6,6 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity; import net.minecraft.world.level.block.entity.BlockEntity; import snownee.jade.api.*; import snownee.jade.api.config.IPluginConfig; diff --git a/src/main/java/com/hechu/mindustry/jade/ExamplePlugin.java b/src/main/java/com/hechu/mindustry/jade/ExamplePlugin.java index f5a450c..8deb423 100644 --- a/src/main/java/com/hechu/mindustry/jade/ExamplePlugin.java +++ b/src/main/java/com/hechu/mindustry/jade/ExamplePlugin.java @@ -4,9 +4,6 @@ import com.hechu.mindustry.block.MechanicalDrill; import com.hechu.mindustry.block.MechanicalDrillBlockEntity; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.level.block.AbstractFurnaceBlock; -import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity; -import net.minecraft.world.level.block.entity.BlockEntity; import snownee.jade.api.*; @WailaPlugin