From 699dc7bb5c51cec89ffa16b3a66d4535154dd511 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Wed, 7 Oct 2020 11:46:55 +0200 Subject: [PATCH] Issues with Nested Config groups - Fixed prefix "kinetics" added to unrelated subsequent config keys due to inconsistent push/pop - Removed obsolete config values --- .../java/com/simibubi/create/AllBlocks.java | 2 +- .../contraptions/RotationPropagator.java | 8 ++---- .../components/actors/AttachedActorBlock.java | 4 +-- .../components/actors/DrillBlock.java | 6 ++--- .../dispenser/ContraptionBlockSource.java | 5 ++-- .../dispenser/DispenserMovementBehaviour.java | 8 +++--- .../dispenser/DropperMovementBehaviour.java | 9 ++++--- .../IMovedDispenseItemBehaviour.java | 8 +++--- .../MovedDefaultDispenseItemBehaviour.java | 1 + .../MovedProjectileDispenserBehaviour.java | 8 +++--- .../components/crank/AllValveHandles.java | 7 ++--- .../components/crank/ValveHandleBlock.java | 5 ++-- .../crusher/CrushingWheelControllerBlock.java | 7 ++--- .../CrushingWheelControllerTileEntity.java | 8 +----- .../components/deployer/DeployerBlock.java | 6 ++--- .../components/fan/AirCurrent.java | 3 --- .../contraptions/components/saw/SawBlock.java | 5 ++-- .../structureMovement/Contraption.java | 4 --- .../ContraptionCollider.java | 2 -- .../bearing/BearingContraption.java | 2 -- .../bearing/ClockworkBearingTileEntity.java | 4 --- .../bearing/ClockworkContraption.java | 3 --- .../bearing/MechanicalBearingTileEntity.java | 3 --- .../ItemHandlerModifiableFromIInventory.java | 6 ++--- .../mounted/MountedContraption.java | 7 ++--- .../piston/MechanicalPistonHeadBlock.java | 5 ++-- .../piston/PistonContraption.java | 2 -- .../piston/PistonExtensionPoleBlock.java | 9 ++++--- .../structureMovement/pulley/PulleyBlock.java | 1 + .../pulley/PulleyContraption.java | 2 -- .../tracks/ReinforcedRailBlock.java | 6 ++--- .../contraptions/fluids/FluidNetwork.java | 1 - .../contraptions/fluids/FluidPropagator.java | 1 - .../goggles/GoggleConfigScreen.java | 7 ++--- .../goggles/GoggleOverlayRenderer.java | 7 ++--- .../processing/BasinMovementBehaviour.java | 7 ++--- .../sequencer/SequencedGearshiftScreen.java | 4 +-- .../belt/transport/BeltMovementHandler.java | 2 +- .../BeltTunnelInteractionHandler.java | 2 +- .../relays/elementary/CogWheelBlock.java | 1 + .../relays/elementary/ShaftBlock.java | 1 + .../relays/encased/EncasedShaftBlock.java | 2 +- .../contraptions/wrench/WrenchItem.java | 4 +-- .../curiosities/ChromaticCompoundItem.java | 12 ++++++--- .../symmetry/SymmetryWandItem.java | 4 +-- .../curiosities/tools/SandPaperItem.java | 4 +-- .../curiosities/zapper/ZapperItem.java | 4 +-- .../content/curiosities/zapper/ZapperLog.java | 16 +++++------- .../content/logistics/InWorldProcessing.java | 4 --- .../block/redstone/RedstoneContactBlock.java | 8 +++--- .../content/schematics/ItemRequirement.java | 14 ++++++++-- .../block/SchematicTableScreen.java | 13 +++++----- .../block/SchematicannonScreen.java | 14 +++++----- .../block/SchematicannonTileEntity.java | 2 +- .../schematics/item/SchematicItem.java | 4 +-- .../foundation/command/AllCommands.java | 1 + .../create/foundation/command/ChunkUtil.java | 13 +++++----- .../foundation/command/ChunkUtilCommand.java | 1 + .../command/ConfigureConfigPacket.java | 10 ++++--- .../command/OverlayConfigCommand.java | 1 + .../foundation/config/CCuriosities.java | 17 ++---------- .../foundation/config/CDamageControl.java | 26 ------------------- .../create/foundation/config/CKinetics.java | 8 +++--- .../create/foundation/config/CRecipes.java | 12 ++++++++- .../create/foundation/config/CServer.java | 2 -- .../create/foundation/config/ConfigBase.java | 13 +++++++--- .../foundation/data/SharedProperties.java | 1 - .../create/foundation/gui/GuiGameElement.java | 7 ++++- .../inventory/InvManipulationBehaviour.java | 3 --- .../foundation/utility/BlockHelper.java | 2 +- .../foundation/worldgen/OxidizingBlock.java | 9 ++++--- 71 files changed, 194 insertions(+), 226 deletions(-) delete mode 100644 src/main/java/com/simibubi/create/foundation/config/CDamageControl.java diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index c7f9c8cef..e764dd788 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -27,8 +27,8 @@ import com.simibubi.create.content.contraptions.components.actors.SeatMovementBe import com.simibubi.create.content.contraptions.components.clock.CuckooClockBlock; import com.simibubi.create.content.contraptions.components.crafter.CrafterCTBehaviour; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterBlock; -import com.simibubi.create.content.contraptions.components.crank.HandCrankBlock; import com.simibubi.create.content.contraptions.components.crank.AllValveHandles; +import com.simibubi.create.content.contraptions.components.crank.HandCrankBlock; import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelBlock; import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelControllerBlock; import com.simibubi.create.content.contraptions.components.deployer.DeployerBlock; diff --git a/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java b/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java index dd1a9350a..5eba3d335 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java +++ b/src/main/java/com/simibubi/create/content/contraptions/RotationPropagator.java @@ -200,7 +200,7 @@ public class RotationPropagator { * @param pos */ public static void handleAdded(World worldIn, BlockPos pos, KineticTileEntity addedTE) { - if (worldIn.isRemote || isFrozen()) + if (worldIn.isRemote) return; if (!worldIn.isBlockPresent(pos)) return; @@ -297,7 +297,7 @@ public class RotationPropagator { * @param removedTE */ public static void handleRemoved(World worldIn, BlockPos pos, KineticTileEntity removedTE) { - if (worldIn.isRemote || isFrozen()) + if (worldIn.isRemote) return; if (removedTE == null) return; @@ -454,8 +454,4 @@ public class RotationPropagator { return neighbours; } - public static boolean isFrozen() { - return AllConfigs.SERVER.control.freezeRotationPropagator.get(); - } - } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/AttachedActorBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/AttachedActorBlock.java index 161d1828f..3893fc9a9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/AttachedActorBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/AttachedActorBlock.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.components.actors; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.wrench.IWrenchable; @@ -18,8 +20,6 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; -import javax.annotation.ParametersAreNonnullByDefault; - @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public abstract class AttachedActorBlock extends HorizontalBlock implements IWrenchable { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillBlock.java index f82c646c0..ced7a4f2f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillBlock.java @@ -1,10 +1,13 @@ package com.simibubi.create.content.contraptions.components.actors; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock; import com.simibubi.create.foundation.block.ITE; +import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.material.PushReaction; @@ -23,9 +26,6 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -import javax.annotation.ParametersAreNonnullByDefault; -import mcp.MethodsReturnNonnullByDefault; - @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class DrillBlock extends DirectionalKineticBlock implements ITE { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/ContraptionBlockSource.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/ContraptionBlockSource.java index 9ff2f2d53..edc415d09 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/ContraptionBlockSource.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/ContraptionBlockSource.java @@ -1,6 +1,9 @@ package com.simibubi.create.content.contraptions.components.actors.dispenser; +import javax.annotation.Nullable; + import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.BlockState; import net.minecraft.dispenser.IBlockSource; @@ -10,8 +13,6 @@ import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import javax.annotation.Nullable; - @MethodsReturnNonnullByDefault public class ContraptionBlockSource implements IBlockSource { private final BlockPos pos; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DispenserMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DispenserMovementBehaviour.java index 19674c065..ac78f32f6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DispenserMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DispenserMovementBehaviour.java @@ -1,7 +1,12 @@ package com.simibubi.create.content.contraptions.components.actors.dispenser; +import java.util.HashMap; + +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.foundation.utility.VecHelper; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.Blocks; @@ -15,9 +20,6 @@ import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; -import javax.annotation.ParametersAreNonnullByDefault; -import java.util.HashMap; - public class DispenserMovementBehaviour extends DropperMovementBehaviour { private static final HashMap MOVED_DISPENSE_ITEM_BEHAVIOURS = new HashMap<>(); private static final HashMap MOVED_PROJECTILE_DISPENSE_BEHAVIOURS = new HashMap<>(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DropperMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DropperMovementBehaviour.java index 29ddec09b..a7b9e19fe 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DropperMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/DropperMovementBehaviour.java @@ -1,8 +1,13 @@ package com.simibubi.create.content.contraptions.components.actors.dispenser; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.foundation.item.ItemHelper; + import net.minecraft.inventory.ItemStackHelper; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; @@ -10,10 +15,6 @@ import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.server.ServerWorld; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - public class DropperMovementBehaviour extends MovementBehaviour { protected static final MovedDefaultDispenseItemBehaviour defaultBehaviour = new MovedDefaultDispenseItemBehaviour(); private static final Random RNG = new Random(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/IMovedDispenseItemBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/IMovedDispenseItemBehaviour.java index fba60a901..952dc986f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/IMovedDispenseItemBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/IMovedDispenseItemBehaviour.java @@ -1,6 +1,9 @@ package com.simibubi.create.content.contraptions.components.actors.dispenser; +import java.util.Random; + import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; + import net.minecraft.block.BeehiveBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -11,7 +14,8 @@ import net.minecraft.entity.IProjectile; import net.minecraft.entity.SpawnReason; import net.minecraft.entity.item.FireworkRocketEntity; import net.minecraft.entity.item.TNTEntity; -import net.minecraft.entity.projectile.*; +import net.minecraft.entity.projectile.PotionEntity; +import net.minecraft.entity.projectile.SmallFireballEntity; import net.minecraft.fluid.FlowingFluid; import net.minecraft.fluid.Fluid; import net.minecraft.item.ItemStack; @@ -30,8 +34,6 @@ import net.minecraft.util.math.Vec3d; import net.minecraft.world.IWorld; import net.minecraft.world.World; -import java.util.Random; - public interface IMovedDispenseItemBehaviour { static void init() { MovedProjectileDispenserBehaviour movedPotionDispenseItemBehaviour = new MovedProjectileDispenserBehaviour() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedDefaultDispenseItemBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedDefaultDispenseItemBehaviour.java index 6318da0f4..bcd4e4b59 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedDefaultDispenseItemBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedDefaultDispenseItemBehaviour.java @@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.components.actors.dispenser; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.block.DispenserBlock; import net.minecraft.entity.item.ItemEntity; import net.minecraft.inventory.IInventory; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedProjectileDispenserBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedProjectileDispenserBehaviour.java index aa332a1f6..939f6457a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedProjectileDispenserBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedProjectileDispenserBehaviour.java @@ -1,6 +1,11 @@ package com.simibubi.create.content.contraptions.components.actors.dispenser; +import java.lang.reflect.Method; + +import javax.annotation.Nullable; + import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; + import net.minecraft.dispenser.IPosition; import net.minecraft.dispenser.ProjectileDispenseBehavior; import net.minecraft.entity.Entity; @@ -12,9 +17,6 @@ import net.minecraft.world.IWorld; import net.minecraft.world.World; import net.minecraftforge.fml.common.ObfuscationReflectionHelper; -import javax.annotation.Nullable; -import java.lang.reflect.Method; - public abstract class MovedProjectileDispenserBehaviour extends MovedDefaultDispenseItemBehaviour { @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/AllValveHandles.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/AllValveHandles.java index a6faae88f..a512095a0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/AllValveHandles.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/AllValveHandles.java @@ -1,14 +1,15 @@ package com.simibubi.create.content.contraptions.components.crank; +import java.util.ArrayList; +import java.util.List; + import com.simibubi.create.AllTags; import com.simibubi.create.foundation.config.StressConfigDefaults; import com.simibubi.create.foundation.data.CreateRegistrate; import com.simibubi.create.foundation.data.SharedProperties; import com.tterrag.registrate.util.entry.BlockEntry; -import net.minecraft.item.DyeColor; -import java.util.ArrayList; -import java.util.List; +import net.minecraft.item.DyeColor; public class AllValveHandles { private static final List types = new ArrayList<>(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java index e93a929eb..48cdabe20 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java @@ -1,9 +1,10 @@ package com.simibubi.create.content.contraptions.components.crank; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllShapes; -import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.BlockState; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; @@ -15,8 +16,6 @@ import net.minecraft.world.IBlockReader; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import javax.annotation.ParametersAreNonnullByDefault; - @ParametersAreNonnullByDefault public class ValveHandleBlock extends HandCrankBlock { private final boolean inCreativeTab; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerBlock.java index f5dc51ac1..94d6eccf6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerBlock.java @@ -69,7 +69,7 @@ public class CrushingWheelControllerBlock extends Block } public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) { - if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen()) + if (!state.get(VALID)) return; withTileEntityDo(worldIn, pos, te -> { if (te.processingEntity == entityIn) @@ -80,9 +80,6 @@ public class CrushingWheelControllerBlock extends Block @Override public void onLanded(IBlockReader worldIn, Entity entityIn) { super.onLanded(worldIn, entityIn); - if (CrushingWheelControllerTileEntity.isFrozen()) - return; - try { CrushingWheelControllerTileEntity te = getTileEntity(worldIn, entityIn.getPosition().down()); if (te.crushingspeed == 0) @@ -122,7 +119,7 @@ public class CrushingWheelControllerBlock extends Block public void updateSpeed(BlockState state, World world, BlockPos pos) { withTileEntityDo(world, pos, te -> { - if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen()) { + if (!state.get(VALID)) { if (te.crushingspeed != 0) { te.crushingspeed = 0; te.sendData(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java index 010bf1610..2c1eb2f3b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java @@ -69,8 +69,6 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity { @Override public void tick() { super.tick(); - if (isFrozen()) - return; if (searchForEntity) { searchForEntity = false; List search = world.getEntitiesInAABBexcluding(null, new AxisAlignedBB(getPos()), @@ -224,7 +222,7 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity { @Override protected void read(CompoundNBT compound, boolean clientPacket) { super.read(compound, clientPacket); - if (compound.contains("Entity") && !isFrozen() && !isOccupied()) { + if (compound.contains("Entity") && !isOccupied()) { entityUUID = NBTUtil.readUniqueId(compound.getCompound("Entity")); this.searchForEntity = true; } @@ -264,8 +262,4 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity { return processingEntity != null; } - public static boolean isFrozen() { - return AllConfigs.SERVER.control.freezeCrushing.get(); - } - } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java index 4e407038a..47cbabe5d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.components.deployer; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.AllItems; import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; @@ -8,6 +10,7 @@ import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; +import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.BlockState; import net.minecraft.block.material.PushReaction; import net.minecraft.entity.player.PlayerEntity; @@ -23,9 +26,6 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -import javax.annotation.ParametersAreNonnullByDefault; -import mcp.MethodsReturnNonnullByDefault; - @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/fan/AirCurrent.java b/src/main/java/com/simibubi/create/content/contraptions/components/fan/AirCurrent.java index a92bb9181..a44ac37cb 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/fan/AirCurrent.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/fan/AirCurrent.java @@ -104,9 +104,6 @@ public class AirCurrent { if (entity instanceof ServerPlayerEntity) ((ServerPlayerEntity) entity).connection.floatingTickCount = 0; - if (InWorldProcessing.isFrozen()) - return; - entityDistance -= .5f; InWorldProcessing.Type processingType = getSegmentAt((float) entityDistance); if (processingType != null) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlock.java index 7e5f74f9b..56bbebc51 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawBlock.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.components.saw; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock; @@ -8,6 +10,7 @@ import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -29,8 +32,6 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -import javax.annotation.ParametersAreNonnullByDefault; - @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class SawBlock extends DirectionalAxisKineticBlock implements ITE { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java index 6a88cc1a0..9260c54e6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java @@ -141,10 +141,6 @@ public abstract class Contraption { return contraption; } - public static boolean isFrozen() { - return AllConfigs.SERVER.control.freezeContraptions.get(); - } - protected static MovementBehaviour getMovement(BlockState state) { Block block = state.getBlock(); if (!AllMovementBehaviours.hasMovementBehaviour(block)) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java index 9484af64c..39f5f66bd 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionCollider.java @@ -358,8 +358,6 @@ public class ContraptionCollider { } public static boolean collideBlocks(ContraptionEntity contraptionEntity) { - if (Contraption.isFrozen()) - return true; if (!contraptionEntity.collisionEnabled()) return false; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java index 4806c00e0..a29da4fa1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java @@ -24,8 +24,6 @@ public class BearingContraption extends Contraption { } public static BearingContraption assembleBearingAt(World world, BlockPos pos, Direction direction) { - if (isFrozen()) - return null; BearingContraption construct = new BearingContraption(); construct.facing = direction; BlockPos offset = pos.offset(direction); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java index f610c284c..440ed16b0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java @@ -3,7 +3,6 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be import org.apache.commons.lang3.tuple.Pair; import com.simibubi.create.content.contraptions.base.KineticTileEntity; -import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionEntity; import com.simibubi.create.content.contraptions.components.structureMovement.bearing.ClockworkContraption.HandType; import com.simibubi.create.foundation.utility.AngleHelper; @@ -45,9 +44,6 @@ public class ClockworkBearingTileEntity extends KineticTileEntity implements IBe clientHourAngleDiff /= 2; } - if (running && Contraption.isFrozen()) - disassemble(); - if (!world.isRemote && assembleNextTick) { assembleNextTick = false; if (running) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkContraption.java index 97abf1372..7cc15d761 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkContraption.java @@ -39,9 +39,6 @@ public class ClockworkContraption extends Contraption { public static Pair assembleClockworkAt(World world, BlockPos pos, Direction direction) { - if (isFrozen()) - return null; - int hourArmBlocks = 0; ClockworkContraption hourArm = new ClockworkContraption(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java index 1f3713701..787e5f2ad 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java @@ -5,7 +5,6 @@ import static net.minecraft.state.properties.BlockStateProperties.FACING; import java.util.List; import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity; -import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionEntity; import com.simibubi.create.content.contraptions.components.structureMovement.DirectionalExtenderScrollOptionSlot; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; @@ -206,8 +205,6 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp if (world.isRemote) clientAngleDiff /= 2; - if (running && Contraption.isFrozen()) - disassemble(); if (!world.isRemote && assembleNextTick) { assembleNextTick = false; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/ItemHandlerModifiableFromIInventory.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/ItemHandlerModifiableFromIInventory.java index f0eae3e70..3dd313411 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/ItemHandlerModifiableFromIInventory.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/ItemHandlerModifiableFromIInventory.java @@ -1,14 +1,14 @@ package com.simibubi.create.content.contraptions.components.structureMovement.mounted; +import javax.annotation.Nonnull; +import javax.annotation.ParametersAreNonnullByDefault; + import mcp.MethodsReturnNonnullByDefault; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.ItemHandlerHelper; -import javax.annotation.Nonnull; -import javax.annotation.ParametersAreNonnullByDefault; - @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MountedContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MountedContraption.java index 1ac7813f6..91cb2ed84 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MountedContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MountedContraption.java @@ -15,7 +15,9 @@ import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; +import net.minecraft.entity.Entity; import net.minecraft.entity.item.minecart.AbstractMinecartEntity; +import net.minecraft.inventory.IInventory; import net.minecraft.nbt.CompoundNBT; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.properties.RailShape; @@ -27,8 +29,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.IWorld; import net.minecraft.world.World; import net.minecraft.world.gen.feature.template.Template.BlockInfo; -import net.minecraft.entity.Entity; -import net.minecraft.inventory.IInventory; import net.minecraftforge.items.wrapper.CombinedInvWrapper; public class MountedContraption extends Contraption { @@ -46,9 +46,6 @@ public class MountedContraption extends Contraption { } public static MountedContraption assembleMinecart(World world, BlockPos pos) { - if (isFrozen()) - return null; - BlockState state = world.getBlockState(pos); if (!state.has(RAIL_SHAPE)) return null; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/MechanicalPistonHeadBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/MechanicalPistonHeadBlock.java index 5c21f6c80..a8a70ae88 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/MechanicalPistonHeadBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/MechanicalPistonHeadBlock.java @@ -1,9 +1,12 @@ package com.simibubi.create.content.contraptions.components.structureMovement.piston; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isExtensionPole; + import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.PistonState; import com.simibubi.create.foundation.block.ProperDirectionalBlock; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.IWaterLoggable; @@ -26,8 +29,6 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; -import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isExtensionPole; - public class MechanicalPistonHeadBlock extends ProperDirectionalBlock implements IWaterLoggable { public static final EnumProperty TYPE = BlockStateProperties.PISTON_TYPE; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java index 7af815d55..79b69b36f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonContraption.java @@ -49,8 +49,6 @@ public class PistonContraption extends Contraption { } public static PistonContraption movePistonAt(World world, BlockPos pos, Direction direction, boolean retract) { - if (isFrozen()) - return null; PistonContraption construct = new PistonContraption(); construct.orientation = direction; if (!construct.collectExtensions(world, pos, direction)) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonExtensionPoleBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonExtensionPoleBlock.java index 379d3c202..7e38330ad 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonExtensionPoleBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonExtensionPoleBlock.java @@ -1,9 +1,14 @@ package com.simibubi.create.content.contraptions.components.structureMovement.piston; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isExtensionPole; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPiston; +import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.isPistonHead; + import com.simibubi.create.AllShapes; -import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.*; +import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.PistonState; import com.simibubi.create.content.contraptions.wrench.IWrenchable; import com.simibubi.create.foundation.block.ProperDirectionalBlock; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.IWaterLoggable; @@ -24,8 +29,6 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; -import static com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.*; - public class PistonExtensionPoleBlock extends ProperDirectionalBlock implements IWrenchable, IWaterLoggable { public PistonExtensionPoleBlock(Properties properties) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyBlock.java index 2f650d4e9..901c64f1a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyBlock.java @@ -5,6 +5,7 @@ import com.simibubi.create.AllShapes; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.base.HorizontalAxisKineticBlock; import com.simibubi.create.foundation.block.ITE; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.IWaterLoggable; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyContraption.java index 68a21a1f0..32b8b3a3f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyContraption.java @@ -17,8 +17,6 @@ public class PulleyContraption extends Contraption { } public static PulleyContraption assemblePulleyAt(World world, BlockPos pos, int initialOffset) { - if (isFrozen()) - return null; PulleyContraption construct = new PulleyContraption(); construct.initialOffset = initialOffset; if (!construct.searchMovedStructure(world, pos, null)) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/tracks/ReinforcedRailBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/tracks/ReinforcedRailBlock.java index 7d713c155..e71d12134 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/tracks/ReinforcedRailBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/tracks/ReinforcedRailBlock.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.components.tracks; +import javax.annotation.Nonnull; + import net.minecraft.block.AbstractRailBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -13,8 +15,8 @@ import net.minecraft.state.EnumProperty; import net.minecraft.state.IProperty; import net.minecraft.state.StateContainer.Builder; import net.minecraft.state.properties.RailShape; -import net.minecraft.util.NonNullList; import net.minecraft.util.Direction.Axis; +import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; @@ -23,8 +25,6 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; -import javax.annotation.Nonnull; - public class ReinforcedRailBlock extends AbstractRailBlock { public static IProperty RAIL_SHAPE = diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetwork.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetwork.java index 9fcdb4b3e..32aad3077 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetwork.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidNetwork.java @@ -10,7 +10,6 @@ import java.util.Map; import java.util.Set; import com.google.common.collect.ImmutableList; -import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.foundation.utility.BlockFace; import com.simibubi.create.foundation.utility.Pair; diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java index 8345cf985..066750b38 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/FluidPropagator.java @@ -14,7 +14,6 @@ import com.simibubi.create.content.contraptions.fluids.pipes.FluidPipeBlock; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.utility.BlockFace; -import com.simibubi.create.foundation.utility.Debug; import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.outliner.Outline.OutlineParams; diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleConfigScreen.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleConfigScreen.java index edb006233..407190ddd 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleConfigScreen.java +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleConfigScreen.java @@ -1,18 +1,19 @@ package com.simibubi.create.content.contraptions.goggles; +import java.util.ArrayList; +import java.util.List; + import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.AllItems; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.utility.Lang; + import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; import net.minecraft.util.text.TextFormatting; -import java.util.ArrayList; -import java.util.List; - public class GoggleConfigScreen extends AbstractSimiScreen { private int offsetX; diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java index 2e728d649..f3ee2f579 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java @@ -1,9 +1,13 @@ package com.simibubi.create.content.contraptions.goggles; +import java.util.ArrayList; +import java.util.List; + import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.AllItems; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.GuiGameElement; + import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.world.ClientWorld; @@ -20,9 +24,6 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; -import java.util.ArrayList; -import java.util.List; - @EventBusSubscriber(value = Dist.CLIENT) public class GoggleOverlayRenderer { diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinMovementBehaviour.java index 39b6f3d3b..2bb4a4b60 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinMovementBehaviour.java @@ -1,17 +1,18 @@ package com.simibubi.create.content.contraptions.processing; +import java.util.HashMap; +import java.util.Map; + import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.foundation.utility.VecHelper; + import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.Direction; import net.minecraft.util.math.Vec3d; import net.minecraftforge.items.ItemStackHandler; -import java.util.HashMap; -import java.util.Map; - public class BasinMovementBehaviour extends MovementBehaviour { public Map getOrReadInventory(MovementContext context) { Map map = new HashMap<>(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftScreen.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftScreen.java index 500240631..fb8aa11ef 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftScreen.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftScreen.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.contraptions.relays.advanced.sequencer; +import java.util.Vector; + import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.AllGuiTextures; @@ -16,8 +18,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.ListNBT; import net.minecraft.util.math.BlockPos; -import java.util.Vector; - public class SequencedGearshiftScreen extends AbstractSimiScreen { private final ItemStack renderedItem = AllBlocks.SEQUENCED_GEARSHIFT.asStack(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltMovementHandler.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltMovementHandler.java index cbea2b1dc..2d18780d1 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltMovementHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltMovementHandler.java @@ -9,9 +9,9 @@ import java.util.List; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionEntity; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; -import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.BeltPart; import com.simibubi.create.content.contraptions.relays.belt.BeltSlope; +import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltTunnelInteractionHandler.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltTunnelInteractionHandler.java index 0ad9792fd..d7ff62dff 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltTunnelInteractionHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltTunnelInteractionHandler.java @@ -2,8 +2,8 @@ package com.simibubi.create.content.contraptions.relays.belt.transport; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; import com.simibubi.create.content.contraptions.relays.belt.BeltHelper; -import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.BeltSlope; +import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock; import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity; import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelBlock; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java index e8d7e1310..4dd0b1310 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/CogWheelBlock.java @@ -4,6 +4,7 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.fluid.Fluids; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ShaftBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ShaftBlock.java index c63cde09c..3a82af260 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ShaftBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/elementary/ShaftBlock.java @@ -6,6 +6,7 @@ import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock; import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftBlock; + import net.minecraft.block.Block; import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockState; diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedShaftBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedShaftBlock.java index a62db1860..44c419e75 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedShaftBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/EncasedShaftBlock.java @@ -4,9 +4,9 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.base.CasingBlock; import com.simibubi.create.content.contraptions.base.KineticTileEntity; - import com.simibubi.create.foundation.utility.Lang; import com.tterrag.registrate.util.entry.BlockEntry; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; diff --git a/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java b/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java index 839d6ec74..1673d855c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java @@ -1,13 +1,13 @@ package com.simibubi.create.content.contraptions.wrench; +import javax.annotation.Nonnull; + import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemUseContext; import net.minecraft.util.ActionResultType; -import javax.annotation.Nonnull; - public class WrenchItem extends Item { public WrenchItem(Properties properties) { diff --git a/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundItem.java b/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundItem.java index c9de59089..4777a2730 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundItem.java @@ -6,7 +6,7 @@ import java.util.Random; import com.simibubi.create.AllItems; import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.config.AllConfigs; -import com.simibubi.create.foundation.config.CCuriosities; +import com.simibubi.create.foundation.config.CRecipes; import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.VecHelper; @@ -21,9 +21,13 @@ import net.minecraft.particles.ParticleTypes; import net.minecraft.tileentity.BeaconTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; -import net.minecraft.util.math.*; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.RayTraceContext; import net.minecraft.util.math.RayTraceContext.BlockMode; import net.minecraft.util.math.RayTraceContext.FluidMode; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; import net.minecraft.world.gen.Heightmap; @@ -42,7 +46,7 @@ public class ChromaticCompoundItem extends Item { public double getDurabilityForDisplay(ItemStack stack) { int light = stack.getOrCreateTag() .getInt("CollectingLight"); - return 1 - light / (float) AllConfigs.SERVER.curiosities.lightSourceCountForRefinedRadiance.get(); + return 1 - light / (float) AllConfigs.SERVER.recipes.lightSourceCountForRefinedRadiance.get(); } @Override @@ -72,7 +76,7 @@ public class ChromaticCompoundItem extends Item { .getOrCreateTag(); Vec3d positionVec = entity.getPositionVec(); - CCuriosities config = AllConfigs.SERVER.curiosities; + CRecipes config = AllConfigs.SERVER.recipes; if (world.isRemote) { int light = itemData.getInt("CollectingLight"); if (random.nextInt(config.lightSourceCountForRefinedRadiance.get() + 20) < light) { diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java index 9c1121f73..28edd0ef8 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java @@ -5,6 +5,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.annotation.Nonnull; + import com.simibubi.create.content.curiosities.symmetry.mirror.CrossPlaneMirror; import com.simibubi.create.content.curiosities.symmetry.mirror.EmptyMirror; import com.simibubi.create.content.curiosities.symmetry.mirror.PlaneMirror; @@ -38,8 +40,6 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.network.PacketDistributor; -import javax.annotation.Nonnull; - public class SymmetryWandItem extends Item { public static final String SYMMETRY = "symmetry"; diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItem.java b/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItem.java index d06c16b4c..1915a3e3b 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItem.java @@ -1,5 +1,7 @@ package com.simibubi.create.content.curiosities.tools; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.foundation.utility.VecHelper; import mcp.MethodsReturnNonnullByDefault; @@ -25,8 +27,6 @@ import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; -import javax.annotation.ParametersAreNonnullByDefault; - @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault public class SandPaperItem extends Item { diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java index 90f7e067b..25f32bb99 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java @@ -2,6 +2,8 @@ package com.simibubi.create.content.curiosities.zapper; import java.util.List; +import javax.annotation.Nonnull; + import com.simibubi.create.AllSoundEvents; import com.simibubi.create.foundation.item.ItemDescription; import com.simibubi.create.foundation.networking.AllPackets; @@ -42,8 +44,6 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.network.PacketDistributor; -import javax.annotation.Nonnull; - public abstract class ZapperItem extends Item { public ZapperItem(Properties properties) { diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperLog.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperLog.java index 13d826bb4..99955c390 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperLog.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperLog.java @@ -4,8 +4,6 @@ import java.util.LinkedList; import java.util.List; import java.util.stream.Collectors; -import com.simibubi.create.foundation.config.AllConfigs; - import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -30,8 +28,8 @@ public class ZapperLog { */ public void record(World world, List positions) { - if (maxLogLength() == 0) - return; +// if (maxLogLength() == 0) +// return; if (world != activeWorld) log.clear(); activeWorld = world; @@ -44,13 +42,13 @@ public class ZapperLog { log.add(0, blocks); // redoIndex = 0; - if (maxLogLength() < log.size()) - log.remove(log.size() - 1); +// if (maxLogLength() < log.size()) +// log.remove(log.size() - 1); } - protected Integer maxLogLength() { - return AllConfigs.SERVER.curiosities.zapperUndoLogLength.get(); - } +// protected Integer maxLogLength() { +// return AllConfigs.SERVER.curiosities.zapperUndoLogLength.get(); +// } public void undo() { diff --git a/src/main/java/com/simibubi/create/content/logistics/InWorldProcessing.java b/src/main/java/com/simibubi/create/content/logistics/InWorldProcessing.java index 97aea25f9..6631aaeef 100644 --- a/src/main/java/com/simibubi/create/content/logistics/InWorldProcessing.java +++ b/src/main/java/com/simibubi/create/content/logistics/InWorldProcessing.java @@ -321,8 +321,4 @@ public class InWorldProcessing { } } - public static boolean isFrozen() { - return AllConfigs.SERVER.control.freezeInWorldProcessing.get(); - } - } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneContactBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneContactBlock.java index 6f4286162..5815f778b 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneContactBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneContactBlock.java @@ -2,10 +2,14 @@ package com.simibubi.create.content.logistics.block.redstone; import java.util.Random; +import javax.annotation.Nullable; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.AllBlocks; import com.simibubi.create.content.contraptions.wrench.IWrenchable; import com.simibubi.create.foundation.block.ProperDirectionalBlock; +import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.item.BlockItemUseContext; @@ -19,10 +23,6 @@ import net.minecraft.world.IWorld; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; -import javax.annotation.Nullable; -import javax.annotation.ParametersAreNonnullByDefault; -import mcp.MethodsReturnNonnullByDefault; - @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class RedstoneContactBlock extends ProperDirectionalBlock implements IWrenchable { diff --git a/src/main/java/com/simibubi/create/content/schematics/ItemRequirement.java b/src/main/java/com/simibubi/create/content/schematics/ItemRequirement.java index 1d8602b6c..0d5a37e56 100644 --- a/src/main/java/com/simibubi/create/content/schematics/ItemRequirement.java +++ b/src/main/java/com/simibubi/create/content/schematics/ItemRequirement.java @@ -4,14 +4,24 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import net.minecraft.block.*; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.FarmlandBlock; +import net.minecraft.block.GrassPathBlock; +import net.minecraft.block.SeaPickleBlock; +import net.minecraft.block.SnowBlock; +import net.minecraft.block.TurtleEggBlock; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; import net.minecraft.entity.item.ArmorStandEntity; import net.minecraft.entity.item.BoatEntity; import net.minecraft.entity.item.ItemFrameEntity; import net.minecraft.entity.item.minecart.AbstractMinecartEntity; -import net.minecraft.item.*; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.properties.SlabType; diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableScreen.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableScreen.java index 14a8052f9..c627dc07d 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableScreen.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableScreen.java @@ -1,5 +1,11 @@ package com.simibubi.create.content.schematics.block; +import static com.simibubi.create.foundation.gui.AllGuiTextures.SCHEMATIC_TABLE; +import static com.simibubi.create.foundation.gui.AllGuiTextures.SCHEMATIC_TABLE_PROGRESS; + +import java.nio.file.Paths; +import java.util.List; + import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.AllBlocks; import com.simibubi.create.CreateClient; @@ -13,6 +19,7 @@ import com.simibubi.create.foundation.gui.widgets.Label; import com.simibubi.create.foundation.gui.widgets.ScrollInput; import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput; import com.simibubi.create.foundation.utility.Lang; + import net.minecraft.client.gui.IHasContainer; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.item.ItemStack; @@ -20,12 +27,6 @@ import net.minecraft.util.Util; import net.minecraft.util.math.MathHelper; import net.minecraft.util.text.ITextComponent; -import java.nio.file.Paths; -import java.util.List; - -import static com.simibubi.create.foundation.gui.AllGuiTextures.SCHEMATIC_TABLE; -import static com.simibubi.create.foundation.gui.AllGuiTextures.SCHEMATIC_TABLE_PROGRESS; - public class SchematicTableScreen extends AbstractSimiContainerScreen implements IHasContainer { diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonScreen.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonScreen.java index ddcad6026..3fbca68d4 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonScreen.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonScreen.java @@ -1,5 +1,12 @@ package com.simibubi.create.content.schematics.block; +import static net.minecraft.util.text.TextFormatting.GRAY; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Vector; + import com.google.common.collect.ImmutableList; import com.simibubi.create.AllBlocks; import com.simibubi.create.content.schematics.packet.ConfigureSchematicannonPacket; @@ -25,13 +32,6 @@ import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TranslationTextComponent; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Vector; - -import static net.minecraft.util.text.TextFormatting.GRAY; - public class SchematicannonScreen extends AbstractSimiContainerScreen { private static final AllGuiTextures BG_BOTTOM = AllGuiTextures.SCHEMATICANNON_BOTTOM; diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java index a339e48dc..a2008395d 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java @@ -22,8 +22,8 @@ import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.item.ItemHelper.ExtractionCountMode; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; - import com.simibubi.create.foundation.utility.BlockHelper; + import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.PistonHeadBlock; diff --git a/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java b/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java index 521d74a2e..2ddf14b10 100644 --- a/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java +++ b/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java @@ -7,6 +7,8 @@ import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.util.List; +import javax.annotation.Nonnull; + import org.apache.commons.io.IOUtils; import com.simibubi.create.AllItems; @@ -41,8 +43,6 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.common.thread.SidedThreadGroups; -import javax.annotation.Nonnull; - public class SchematicItem extends Item { public SchematicItem(Properties properties) { diff --git a/src/main/java/com/simibubi/create/foundation/command/AllCommands.java b/src/main/java/com/simibubi/create/foundation/command/AllCommands.java index e726181f4..e78fed99e 100644 --- a/src/main/java/com/simibubi/create/foundation/command/AllCommands.java +++ b/src/main/java/com/simibubi/create/foundation/command/AllCommands.java @@ -1,6 +1,7 @@ package com.simibubi.create.foundation.command; import com.mojang.brigadier.CommandDispatcher; + import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; diff --git a/src/main/java/com/simibubi/create/foundation/command/ChunkUtil.java b/src/main/java/com/simibubi/create/foundation/command/ChunkUtil.java index f88e9ab3d..52e687cf5 100644 --- a/src/main/java/com/simibubi/create/foundation/command/ChunkUtil.java +++ b/src/main/java/com/simibubi/create/foundation/command/ChunkUtil.java @@ -1,5 +1,12 @@ package com.simibubi.create.foundation.command; +import java.util.EnumSet; +import java.util.LinkedList; +import java.util.List; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + import net.minecraft.util.math.ChunkPos; import net.minecraft.world.chunk.ChunkStatus; import net.minecraft.world.gen.Heightmap; @@ -7,12 +14,6 @@ import net.minecraft.world.server.ChunkHolder; import net.minecraft.world.server.ServerChunkProvider; import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import java.util.EnumSet; -import java.util.LinkedList; -import java.util.List; public class ChunkUtil { private static final Logger LOGGER = LogManager.getLogger("Create/ChunkUtil"); diff --git a/src/main/java/com/simibubi/create/foundation/command/ChunkUtilCommand.java b/src/main/java/com/simibubi/create/foundation/command/ChunkUtilCommand.java index 48272f723..c470ea90c 100644 --- a/src/main/java/com/simibubi/create/foundation/command/ChunkUtilCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/ChunkUtilCommand.java @@ -2,6 +2,7 @@ package com.simibubi.create.foundation.command; import com.mojang.brigadier.builder.ArgumentBuilder; import com.simibubi.create.Create; + import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; import net.minecraft.command.arguments.ColumnPosArgument; diff --git a/src/main/java/com/simibubi/create/foundation/command/ConfigureConfigPacket.java b/src/main/java/com/simibubi/create/foundation/command/ConfigureConfigPacket.java index 45d17d4b4..6932543e3 100644 --- a/src/main/java/com/simibubi/create/foundation/command/ConfigureConfigPacket.java +++ b/src/main/java/com/simibubi/create/foundation/command/ConfigureConfigPacket.java @@ -1,18 +1,20 @@ package com.simibubi.create.foundation.command; +import java.util.function.Consumer; +import java.util.function.Supplier; + +import org.apache.logging.log4j.LogManager; + import com.simibubi.create.content.contraptions.goggles.GoggleConfigScreen; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.networking.SimplePacketBase; + import net.minecraft.network.PacketBuffer; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.network.NetworkEvent; -import org.apache.logging.log4j.LogManager; - -import java.util.function.Consumer; -import java.util.function.Supplier; public class ConfigureConfigPacket extends SimplePacketBase { diff --git a/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java b/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java index 632782c06..9497a7de6 100644 --- a/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/OverlayConfigCommand.java @@ -2,6 +2,7 @@ package com.simibubi.create.foundation.command; import com.mojang.brigadier.builder.ArgumentBuilder; import com.simibubi.create.foundation.networking.AllPackets; + import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; import net.minecraft.entity.player.ServerPlayerEntity; diff --git a/src/main/java/com/simibubi/create/foundation/config/CCuriosities.java b/src/main/java/com/simibubi/create/foundation/config/CCuriosities.java index 04dc72f7d..21f79c1ee 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CCuriosities.java +++ b/src/main/java/com/simibubi/create/foundation/config/CCuriosities.java @@ -3,15 +3,7 @@ package com.simibubi.create.foundation.config; public class CCuriosities extends ConfigBase { public ConfigInt maxSymmetryWandRange = i(50, 10, "maxSymmetryWandRange", Comments.symmetryRange); - public ConfigInt zapperUndoLogLength = i(10, 0, "zapperUndoLogLength", Comments.zapperUndoLogLength); - public ConfigInt lightSourceCountForRefinedRadiance = i(10, 1, "lightSourceCountForRefinedRadiance", - Comments.refinedRadiance); - public ConfigBool allowGlassPanesInPartialBlocks = b(true, "allowGlassPanesInPartialBlocks", - Comments.windowsInBlocks); - public ConfigBool enableRefinedRadianceRecipe = b(true, "enableRefinedRadianceRecipe", - Comments.refinedRadianceRecipe); - public ConfigBool enableShadowSteelRecipe = b(true, "enableShadowSteelRecipe", Comments.shadowSteelRecipe); - public ConfigFloat cocoaLogGrowthSpeed = f(20, 0, 100, "cocoaLogGrowthSpeed", Comments.cocoa); +// public ConfigInt zapperUndoLogLength = i(10, 0, "zapperUndoLogLength", Comments.zapperUndoLogLength); NYI @Override public String getName() { @@ -20,12 +12,7 @@ public class CCuriosities extends ConfigBase { private static class Comments { static String symmetryRange = "The Maximum Distance to an active mirror for the symmetry wand to trigger."; - static String refinedRadiance = "The amount of Light sources destroyed before Chromatic Compound turns into Refined Radiance."; - static String refinedRadianceRecipe = "Allow the standard Refined Radiance recipes."; - static String shadowSteelRecipe = "Allow the standard Shadow Steel recipe."; - static String windowsInBlocks = "Allow Glass Panes to be put inside Blocks like Stairs, Slabs, Fences etc."; - static String cocoa = "% of random Ticks causing a Cocoa log to grow."; - static String zapperUndoLogLength = "The maximum amount of operations, a blockzapper can remember for undoing. (0 to disable undo)"; +// static String zapperUndoLogLength = "The maximum amount of operations, a blockzapper can remember for undoing. (0 to disable undo)"; } } diff --git a/src/main/java/com/simibubi/create/foundation/config/CDamageControl.java b/src/main/java/com/simibubi/create/foundation/config/CDamageControl.java deleted file mode 100644 index 50400c322..000000000 --- a/src/main/java/com/simibubi/create/foundation/config/CDamageControl.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.simibubi.create.foundation.config; - -public class CDamageControl extends ConfigBase { - - public ConfigBool freezeCrushing = b(false, "freezeCrushing", Comments.freezeCrushing); - public ConfigBool freezeExtractors = b(false, "freezeExtractors", Comments.freezeExtractors); - public ConfigBool freezeInWorldProcessing = b(false, "freezeInWorldProcessing", Comments.freezeInWorldProcessing); - public ConfigBool freezeRotationPropagator = - b(false, "freezeRotationPropagator", Comments.freezeRotationPropagator); - public ConfigBool freezeContraptions = b(false, "freezeContraptions", Comments.freezeContraptions); - - @Override - public String getName() { - return "damageControl"; - } - - private static class Comments { - static String freezeCrushing = "In case Crushing Wheels crushed your server."; - static String freezeExtractors = "In case Extractors pulled the plug."; - static String freezeInWorldProcessing = "In case Encased Fans tried smelting your hardware."; - static String freezeRotationPropagator = - "Pauses rotation logic altogether - Use if crash mentions RotationPropagators."; - static String freezeContraptions = "In case Moving contraptions pushed it too far."; - } - -} diff --git a/src/main/java/com/simibubi/create/foundation/config/CKinetics.java b/src/main/java/com/simibubi/create/foundation/config/CKinetics.java index 31a728123..34446abe4 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CKinetics.java +++ b/src/main/java/com/simibubi/create/foundation/config/CKinetics.java @@ -13,7 +13,7 @@ public class CKinetics extends ConfigBase { e(DeployerAggroSetting.CREEPERS, "ignoreDeployerAttacks", Comments.ignoreDeployerAttacks); public ConfigInt kineticValidationFrequency = i(60, 5, "kineticValidationFrequency", Comments.kineticValidationFrequency); - public ConfigGroup fan = group(0, "encasedFan", "Encased Fan"); + public ConfigGroup fan = group(1, "encasedFan", "Encased Fan"); public ConfigInt fanPushDistance = i(20, 5, "fanPushDistance", Comments.fanPushDistance); public ConfigInt fanPullDistance = i(20, 5, "fanPullDistance", Comments.fanPullDistance); public ConfigInt fanBlockCheckRate = i(30, 10, "fanBlockCheckRate", Comments.fanBlockCheckRate); @@ -21,16 +21,16 @@ public class CKinetics extends ConfigBase { public ConfigInt generatingFanSpeed = i(16, 0, "generatingFanSpeed", Comments.rpm, Comments.generatingFanSpeed); public ConfigInt inWorldProcessingTime = i(150, 0, "inWorldProcessingTime", Comments.inWorldProcessingTime); - public ConfigGroup contraptions = group(0, "contraptions", "Moving Contraptions"); + public ConfigGroup contraptions = group(1, "contraptions", "Moving Contraptions"); public ConfigInt maxBlocksMoved = i(2048, 1, "maxBlocksMoved", Comments.maxBlocksMoved); public ConfigInt maxChassisRange = i(16, 1, "maxChassisRange", Comments.maxChassisRange); public ConfigInt maxPistonPoles = i(64, 1, "maxPistonPoles", Comments.maxPistonPoles); public ConfigInt maxRopeLength = i(128, 1, "maxRopeLength", Comments.maxRopeLength); public ConfigInt maxCartCouplingLength = i(32, 1, "maxCartCouplingLength", Comments.maxCartCouplingLength); - public CStress stressValues = nested(0, CStress::new, Comments.stress); + public CStress stressValues = nested(1, CStress::new, Comments.stress); - public ConfigGroup state = group(0, "stats", Comments.stats); + public ConfigGroup state = group(1, "stats", Comments.stats); public ConfigFloat mediumSpeed = f(30, 0, 4096, "mediumSpeed", Comments.rpm, Comments.mediumSpeed); public ConfigFloat fastSpeed = f(100, 0, 65535, "fastSpeed", Comments.rpm, Comments.fastSpeed); public ConfigFloat mediumStressImpact = diff --git a/src/main/java/com/simibubi/create/foundation/config/CRecipes.java b/src/main/java/com/simibubi/create/foundation/config/CRecipes.java index b7eba1242..2f5ebcd65 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CRecipes.java +++ b/src/main/java/com/simibubi/create/foundation/config/CRecipes.java @@ -4,8 +4,14 @@ public class CRecipes extends ConfigBase { public ConfigBool allowShapelessInMixer = b(true, "allowShapelessInMixer", Comments.allowShapelessInMixer); public ConfigBool allowShapedSquareInPress = b(true, "allowShapedSquareInPress", Comments.allowShapedSquareInPress); - public ConfigBool allowRegularCraftingInCrafter = b(true, "allowRegularCraftingInCrafter", Comments.allowRegularCraftingInCrafter); + public ConfigBool allowRegularCraftingInCrafter = + b(true, "allowRegularCraftingInCrafter", Comments.allowRegularCraftingInCrafter); public ConfigBool allowStonecuttingOnSaw = b(true, "allowStonecuttingOnSaw", Comments.allowStonecuttingOnSaw); + public ConfigInt lightSourceCountForRefinedRadiance = + i(10, 1, "lightSourceCountForRefinedRadiance", Comments.refinedRadiance); + public ConfigBool enableRefinedRadianceRecipe = + b(true, "enableRefinedRadianceRecipe", Comments.refinedRadianceRecipe); + public ConfigBool enableShadowSteelRecipe = b(true, "enableShadowSteelRecipe", Comments.shadowSteelRecipe); @Override public String getName() { @@ -21,6 +27,10 @@ public class CRecipes extends ConfigBase { "When true, allows any standard crafting recipes to be processed by Mechanical Crafters."; static String allowStonecuttingOnSaw = "When true, allows any stonecutting recipes to be processed by a Mechanical Saw."; + static String refinedRadiance = + "The amount of Light sources destroyed before Chromatic Compound turns into Refined Radiance."; + static String refinedRadianceRecipe = "Allow the standard in-world Refined Radiance recipes."; + static String shadowSteelRecipe = "Allow the standard in-world Shadow Steel recipe."; } } diff --git a/src/main/java/com/simibubi/create/foundation/config/CServer.java b/src/main/java/com/simibubi/create/foundation/config/CServer.java index 8ce3783bd..e5cf81cfd 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CServer.java +++ b/src/main/java/com/simibubi/create/foundation/config/CServer.java @@ -12,7 +12,6 @@ public class CServer extends ConfigBase { public CLogistics logistics = nested(0, CLogistics::new, Comments.logistics); public CSchematics schematics = nested(0, CSchematics::new, Comments.schematics); public CCuriosities curiosities = nested(0, CCuriosities::new, Comments.curiosities); - public CDamageControl control = nested(0, CDamageControl::new, Comments.control); @Override public String getName() { @@ -26,7 +25,6 @@ public class CServer extends ConfigBase { static String fluids = "Create's liquid manipulation tools"; static String logistics = "Tweaks for logistical components"; static String curiosities = "Gadgets and other Shenanigans added by Create"; - static String control = "You can try inhibiting related game mechanics for troubleshooting repeated crashes."; static String infrastructure = "The Backbone of Create"; static String tickrateSyncTimer = "The amount of time a server waits before sending out tickrate synchronization packets."; diff --git a/src/main/java/com/simibubi/create/foundation/config/ConfigBase.java b/src/main/java/com/simibubi/create/foundation/config/ConfigBase.java index 86c290f67..e9a84e696 100644 --- a/src/main/java/com/simibubi/create/foundation/config/ConfigBase.java +++ b/src/main/java/com/simibubi/create/foundation/config/ConfigBase.java @@ -22,7 +22,7 @@ public abstract class ConfigBase { protected List children; protected void registerAll(final ForgeConfigSpec.Builder builder) { - for (CValue cValue : allValues) + for (CValue cValue : allValues) cValue.register(builder); } @@ -75,9 +75,10 @@ public abstract class ConfigBase { T config = constructor.get(); new ConfigGroup(config.getName(), depth, comment); new CValue(config.getName(), builder -> { + config.depth = depth; config.registerAll(builder); - if (config.depth > 0) - builder.pop(config.depth); + if (config.depth > depth) + builder.pop(config.depth - depth); return null; }); if (children == null) @@ -124,6 +125,10 @@ public abstract class ConfigBase { public void set(V value) { this.value.set(value); } + + public String getName() { + return name; + } } /** @@ -146,7 +151,7 @@ public abstract class ConfigBase { builder.pop(depth - groupDepth); depth = groupDepth; addComments(builder, comment); - builder.push(name); + builder.push(getName()); depth++; } diff --git a/src/main/java/com/simibubi/create/foundation/data/SharedProperties.java b/src/main/java/com/simibubi/create/foundation/data/SharedProperties.java index f5f82a7f6..a563b4d49 100644 --- a/src/main/java/com/simibubi/create/foundation/data/SharedProperties.java +++ b/src/main/java/com/simibubi/create/foundation/data/SharedProperties.java @@ -1,7 +1,6 @@ package com.simibubi.create.foundation.data; import mcp.MethodsReturnNonnullByDefault; - import net.minecraft.block.Block; import net.minecraft.block.Blocks; import net.minecraft.block.material.Material; diff --git a/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java b/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java index 556fe5444..6c23fa6d3 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java +++ b/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java @@ -19,7 +19,12 @@ import net.minecraft.block.Blocks; import net.minecraft.block.FireBlock; import net.minecraft.block.FlowingFluidBlock; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.*; +import net.minecraft.client.renderer.Atlases; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.RenderTypeLookup; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.world.ClientWorld; diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/inventory/InvManipulationBehaviour.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/inventory/InvManipulationBehaviour.java index 727544e9a..04e57538d 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/inventory/InvManipulationBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/inventory/InvManipulationBehaviour.java @@ -6,7 +6,6 @@ import java.util.function.Predicate; import javax.annotation.Nullable; import com.google.common.base.Predicates; -import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; @@ -103,8 +102,6 @@ public class InvManipulationBehaviour extends TileEntityBehaviour { if (getWorld().isRemote) return ItemStack.EMPTY; - if (AllConfigs.SERVER.control.freezeExtractors.get()) - return ItemStack.EMPTY; IItemHandler inventory = targetCapability.orElse(null); if (inventory == null) return ItemStack.EMPTY; diff --git a/src/main/java/com/simibubi/create/foundation/utility/BlockHelper.java b/src/main/java/com/simibubi/create/foundation/utility/BlockHelper.java index e730b1133..c5fd57453 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/BlockHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/BlockHelper.java @@ -2,7 +2,6 @@ package com.simibubi.create.foundation.utility; import java.util.function.Consumer; -import net.minecraft.item.Items; import org.apache.commons.lang3.mutable.MutableInt; import net.minecraft.block.Block; @@ -13,6 +12,7 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.fluid.IFluidState; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.properties.SlabType; import net.minecraft.tileentity.TileEntity; diff --git a/src/main/java/com/simibubi/create/foundation/worldgen/OxidizingBlock.java b/src/main/java/com/simibubi/create/foundation/worldgen/OxidizingBlock.java index 0d3104747..c7b975c9b 100644 --- a/src/main/java/com/simibubi/create/foundation/worldgen/OxidizingBlock.java +++ b/src/main/java/com/simibubi/create/foundation/worldgen/OxidizingBlock.java @@ -1,7 +1,12 @@ package com.simibubi.create.foundation.worldgen; +import java.util.LinkedList; +import java.util.OptionalDouble; +import java.util.Random; + import com.simibubi.create.content.curiosities.tools.SandPaperItem; import com.simibubi.create.content.palettes.MetalBlock; + import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; @@ -16,10 +21,6 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; -import java.util.LinkedList; -import java.util.OptionalDouble; -import java.util.Random; - public class OxidizingBlock extends MetalBlock { public static final IntegerProperty OXIDIZATION = IntegerProperty.create("oxidization", 0, 7);