Issues with Nested Config groups

- Fixed prefix "kinetics" added to unrelated subsequent config keys due to inconsistent push/pop
- Removed obsolete config values
This commit is contained in:
simibubi 2020-10-07 11:46:55 +02:00
parent 378164b8b9
commit 699dc7bb5c
71 changed files with 194 additions and 226 deletions

View file

@ -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.clock.CuckooClockBlock;
import com.simibubi.create.content.contraptions.components.crafter.CrafterCTBehaviour; 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.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.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.CrushingWheelBlock;
import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelControllerBlock; import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelControllerBlock;
import com.simibubi.create.content.contraptions.components.deployer.DeployerBlock; import com.simibubi.create.content.contraptions.components.deployer.DeployerBlock;

View file

@ -200,7 +200,7 @@ public class RotationPropagator {
* @param pos * @param pos
*/ */
public static void handleAdded(World worldIn, BlockPos pos, KineticTileEntity addedTE) { public static void handleAdded(World worldIn, BlockPos pos, KineticTileEntity addedTE) {
if (worldIn.isRemote || isFrozen()) if (worldIn.isRemote)
return; return;
if (!worldIn.isBlockPresent(pos)) if (!worldIn.isBlockPresent(pos))
return; return;
@ -297,7 +297,7 @@ public class RotationPropagator {
* @param removedTE * @param removedTE
*/ */
public static void handleRemoved(World worldIn, BlockPos pos, KineticTileEntity removedTE) { public static void handleRemoved(World worldIn, BlockPos pos, KineticTileEntity removedTE) {
if (worldIn.isRemote || isFrozen()) if (worldIn.isRemote)
return; return;
if (removedTE == null) if (removedTE == null)
return; return;
@ -454,8 +454,4 @@ public class RotationPropagator {
return neighbours; return neighbours;
} }
public static boolean isFrozen() {
return AllConfigs.SERVER.control.freezeRotationPropagator.get();
}
} }

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.contraptions.components.actors; package com.simibubi.create.content.contraptions.components.actors;
import javax.annotation.ParametersAreNonnullByDefault;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.content.contraptions.wrench.IWrenchable; 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.IBlockReader;
import net.minecraft.world.IWorldReader; import net.minecraft.world.IWorldReader;
import javax.annotation.ParametersAreNonnullByDefault;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
public abstract class AttachedActorBlock extends HorizontalBlock implements IWrenchable { public abstract class AttachedActorBlock extends HorizontalBlock implements IWrenchable {

View file

@ -1,10 +1,13 @@
package com.simibubi.create.content.contraptions.components.actors; package com.simibubi.create.content.contraptions.components.actors;
import javax.annotation.ParametersAreNonnullByDefault;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock; import com.simibubi.create.content.contraptions.base.DirectionalKineticBlock;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.ITE;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.material.PushReaction; import net.minecraft.block.material.PushReaction;
@ -23,9 +26,6 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader; import net.minecraft.world.IWorldReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
public class DrillBlock extends DirectionalKineticBlock implements ITE<DrillTileEntity> { public class DrillBlock extends DirectionalKineticBlock implements ITE<DrillTileEntity> {

View file

@ -1,6 +1,9 @@
package com.simibubi.create.content.contraptions.components.actors.dispenser; package com.simibubi.create.content.contraptions.components.actors.dispenser;
import javax.annotation.Nullable;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import mcp.MethodsReturnNonnullByDefault; import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.dispenser.IBlockSource; import net.minecraft.dispenser.IBlockSource;
@ -10,8 +13,6 @@ import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import javax.annotation.Nullable;
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
public class ContraptionBlockSource implements IBlockSource { public class ContraptionBlockSource implements IBlockSource {
private final BlockPos pos; private final BlockPos pos;

View file

@ -1,7 +1,12 @@
package com.simibubi.create.content.contraptions.components.actors.dispenser; 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.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
import mcp.MethodsReturnNonnullByDefault; import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.Blocks; 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.BlockPos;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import javax.annotation.ParametersAreNonnullByDefault;
import java.util.HashMap;
public class DispenserMovementBehaviour extends DropperMovementBehaviour { public class DispenserMovementBehaviour extends DropperMovementBehaviour {
private static final HashMap<Item, IMovedDispenseItemBehaviour> MOVED_DISPENSE_ITEM_BEHAVIOURS = new HashMap<>(); private static final HashMap<Item, IMovedDispenseItemBehaviour> MOVED_DISPENSE_ITEM_BEHAVIOURS = new HashMap<>();
private static final HashMap<Item, IMovedDispenseItemBehaviour> MOVED_PROJECTILE_DISPENSE_BEHAVIOURS = new HashMap<>(); private static final HashMap<Item, IMovedDispenseItemBehaviour> MOVED_PROJECTILE_DISPENSE_BEHAVIOURS = new HashMap<>();

View file

@ -1,8 +1,13 @@
package com.simibubi.create.content.contraptions.components.actors.dispenser; 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.MovementBehaviour;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.item.ItemHelper;
import net.minecraft.inventory.ItemStackHelper; import net.minecraft.inventory.ItemStackHelper;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.Items; import net.minecraft.item.Items;
@ -10,10 +15,6 @@ import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.server.ServerWorld; import net.minecraft.world.server.ServerWorld;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class DropperMovementBehaviour extends MovementBehaviour { public class DropperMovementBehaviour extends MovementBehaviour {
protected static final MovedDefaultDispenseItemBehaviour defaultBehaviour = new MovedDefaultDispenseItemBehaviour(); protected static final MovedDefaultDispenseItemBehaviour defaultBehaviour = new MovedDefaultDispenseItemBehaviour();
private static final Random RNG = new Random(); private static final Random RNG = new Random();

View file

@ -1,6 +1,9 @@
package com.simibubi.create.content.contraptions.components.actors.dispenser; package com.simibubi.create.content.contraptions.components.actors.dispenser;
import java.util.Random;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import net.minecraft.block.BeehiveBlock; import net.minecraft.block.BeehiveBlock;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
@ -11,7 +14,8 @@ import net.minecraft.entity.IProjectile;
import net.minecraft.entity.SpawnReason; import net.minecraft.entity.SpawnReason;
import net.minecraft.entity.item.FireworkRocketEntity; import net.minecraft.entity.item.FireworkRocketEntity;
import net.minecraft.entity.item.TNTEntity; 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.FlowingFluid;
import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluid;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -30,8 +34,6 @@ import net.minecraft.util.math.Vec3d;
import net.minecraft.world.IWorld; import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import java.util.Random;
public interface IMovedDispenseItemBehaviour { public interface IMovedDispenseItemBehaviour {
static void init() { static void init() {
MovedProjectileDispenserBehaviour movedPotionDispenseItemBehaviour = new MovedProjectileDispenserBehaviour() { MovedProjectileDispenserBehaviour movedPotionDispenseItemBehaviour = new MovedProjectileDispenserBehaviour() {

View file

@ -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.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.DispenserBlock; import net.minecraft.block.DispenserBlock;
import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.item.ItemEntity;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;

View file

@ -1,6 +1,11 @@
package com.simibubi.create.content.contraptions.components.actors.dispenser; 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 com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import net.minecraft.dispenser.IPosition; import net.minecraft.dispenser.IPosition;
import net.minecraft.dispenser.ProjectileDispenseBehavior; import net.minecraft.dispenser.ProjectileDispenseBehavior;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@ -12,9 +17,6 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper; import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
import javax.annotation.Nullable;
import java.lang.reflect.Method;
public abstract class MovedProjectileDispenserBehaviour extends MovedDefaultDispenseItemBehaviour { public abstract class MovedProjectileDispenserBehaviour extends MovedDefaultDispenseItemBehaviour {
@Override @Override

View file

@ -1,14 +1,15 @@
package com.simibubi.create.content.contraptions.components.crank; 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.AllTags;
import com.simibubi.create.foundation.config.StressConfigDefaults; import com.simibubi.create.foundation.config.StressConfigDefaults;
import com.simibubi.create.foundation.data.CreateRegistrate; import com.simibubi.create.foundation.data.CreateRegistrate;
import com.simibubi.create.foundation.data.SharedProperties; import com.simibubi.create.foundation.data.SharedProperties;
import com.tterrag.registrate.util.entry.BlockEntry; import com.tterrag.registrate.util.entry.BlockEntry;
import net.minecraft.item.DyeColor;
import java.util.ArrayList; import net.minecraft.item.DyeColor;
import java.util.List;
public class AllValveHandles { public class AllValveHandles {
private static final List<String> types = new ArrayList<>(); private static final List<String> types = new ArrayList<>();

View file

@ -1,9 +1,10 @@
package com.simibubi.create.content.contraptions.components.crank; package com.simibubi.create.content.contraptions.components.crank;
import javax.annotation.ParametersAreNonnullByDefault;
import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack; 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.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import javax.annotation.ParametersAreNonnullByDefault;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public class ValveHandleBlock extends HandCrankBlock { public class ValveHandleBlock extends HandCrankBlock {
private final boolean inCreativeTab; private final boolean inCreativeTab;

View file

@ -69,7 +69,7 @@ public class CrushingWheelControllerBlock extends Block
} }
public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) { public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) {
if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen()) if (!state.get(VALID))
return; return;
withTileEntityDo(worldIn, pos, te -> { withTileEntityDo(worldIn, pos, te -> {
if (te.processingEntity == entityIn) if (te.processingEntity == entityIn)
@ -80,9 +80,6 @@ public class CrushingWheelControllerBlock extends Block
@Override @Override
public void onLanded(IBlockReader worldIn, Entity entityIn) { public void onLanded(IBlockReader worldIn, Entity entityIn) {
super.onLanded(worldIn, entityIn); super.onLanded(worldIn, entityIn);
if (CrushingWheelControllerTileEntity.isFrozen())
return;
try { try {
CrushingWheelControllerTileEntity te = getTileEntity(worldIn, entityIn.getPosition().down()); CrushingWheelControllerTileEntity te = getTileEntity(worldIn, entityIn.getPosition().down());
if (te.crushingspeed == 0) if (te.crushingspeed == 0)
@ -122,7 +119,7 @@ public class CrushingWheelControllerBlock extends Block
public void updateSpeed(BlockState state, World world, BlockPos pos) { public void updateSpeed(BlockState state, World world, BlockPos pos) {
withTileEntityDo(world, pos, te -> { withTileEntityDo(world, pos, te -> {
if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen()) { if (!state.get(VALID)) {
if (te.crushingspeed != 0) { if (te.crushingspeed != 0) {
te.crushingspeed = 0; te.crushingspeed = 0;
te.sendData(); te.sendData();

View file

@ -69,8 +69,6 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity {
@Override @Override
public void tick() { public void tick() {
super.tick(); super.tick();
if (isFrozen())
return;
if (searchForEntity) { if (searchForEntity) {
searchForEntity = false; searchForEntity = false;
List<Entity> search = world.getEntitiesInAABBexcluding(null, new AxisAlignedBB(getPos()), List<Entity> search = world.getEntitiesInAABBexcluding(null, new AxisAlignedBB(getPos()),
@ -224,7 +222,7 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity {
@Override @Override
protected void read(CompoundNBT compound, boolean clientPacket) { protected void read(CompoundNBT compound, boolean clientPacket) {
super.read(compound, clientPacket); super.read(compound, clientPacket);
if (compound.contains("Entity") && !isFrozen() && !isOccupied()) { if (compound.contains("Entity") && !isOccupied()) {
entityUUID = NBTUtil.readUniqueId(compound.getCompound("Entity")); entityUUID = NBTUtil.readUniqueId(compound.getCompound("Entity"));
this.searchForEntity = true; this.searchForEntity = true;
} }
@ -264,8 +262,4 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity {
return processingEntity != null; return processingEntity != null;
} }
public static boolean isFrozen() {
return AllConfigs.SERVER.control.freezeCrushing.get();
}
} }

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.contraptions.components.deployer; package com.simibubi.create.content.contraptions.components.deployer;
import javax.annotation.ParametersAreNonnullByDefault;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities; 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.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.material.PushReaction; import net.minecraft.block.material.PushReaction;
import net.minecraft.entity.player.PlayerEntity; 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.IBlockReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE<DeployerTileEntity> { public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE<DeployerTileEntity> {

View file

@ -104,9 +104,6 @@ public class AirCurrent {
if (entity instanceof ServerPlayerEntity) if (entity instanceof ServerPlayerEntity)
((ServerPlayerEntity) entity).connection.floatingTickCount = 0; ((ServerPlayerEntity) entity).connection.floatingTickCount = 0;
if (InWorldProcessing.isFrozen())
return;
entityDistance -= .5f; entityDistance -= .5f;
InWorldProcessing.Type processingType = getSegmentAt((float) entityDistance); InWorldProcessing.Type processingType = getSegmentAt((float) entityDistance);
if (processingType != null) { if (processingType != null) {

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.contraptions.components.saw; package com.simibubi.create.content.contraptions.components.saw;
import javax.annotation.ParametersAreNonnullByDefault;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock; 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.item.ItemHelper;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour;
import mcp.MethodsReturnNonnullByDefault; import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
@ -29,8 +32,6 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorldReader; import net.minecraft.world.IWorldReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import javax.annotation.ParametersAreNonnullByDefault;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
public class SawBlock extends DirectionalAxisKineticBlock implements ITE<SawTileEntity> { public class SawBlock extends DirectionalAxisKineticBlock implements ITE<SawTileEntity> {

View file

@ -141,10 +141,6 @@ public abstract class Contraption {
return contraption; return contraption;
} }
public static boolean isFrozen() {
return AllConfigs.SERVER.control.freezeContraptions.get();
}
protected static MovementBehaviour getMovement(BlockState state) { protected static MovementBehaviour getMovement(BlockState state) {
Block block = state.getBlock(); Block block = state.getBlock();
if (!AllMovementBehaviours.hasMovementBehaviour(block)) if (!AllMovementBehaviours.hasMovementBehaviour(block))

View file

@ -358,8 +358,6 @@ public class ContraptionCollider {
} }
public static boolean collideBlocks(ContraptionEntity contraptionEntity) { public static boolean collideBlocks(ContraptionEntity contraptionEntity) {
if (Contraption.isFrozen())
return true;
if (!contraptionEntity.collisionEnabled()) if (!contraptionEntity.collisionEnabled())
return false; return false;

View file

@ -24,8 +24,6 @@ public class BearingContraption extends Contraption {
} }
public static BearingContraption assembleBearingAt(World world, BlockPos pos, Direction direction) { public static BearingContraption assembleBearingAt(World world, BlockPos pos, Direction direction) {
if (isFrozen())
return null;
BearingContraption construct = new BearingContraption(); BearingContraption construct = new BearingContraption();
construct.facing = direction; construct.facing = direction;
BlockPos offset = pos.offset(direction); BlockPos offset = pos.offset(direction);

View file

@ -3,7 +3,6 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; 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.ContraptionEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.bearing.ClockworkContraption.HandType; import com.simibubi.create.content.contraptions.components.structureMovement.bearing.ClockworkContraption.HandType;
import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.AngleHelper;
@ -45,9 +44,6 @@ public class ClockworkBearingTileEntity extends KineticTileEntity implements IBe
clientHourAngleDiff /= 2; clientHourAngleDiff /= 2;
} }
if (running && Contraption.isFrozen())
disassemble();
if (!world.isRemote && assembleNextTick) { if (!world.isRemote && assembleNextTick) {
assembleNextTick = false; assembleNextTick = false;
if (running) { if (running) {

View file

@ -39,9 +39,6 @@ public class ClockworkContraption extends Contraption {
public static Pair<ClockworkContraption, ClockworkContraption> assembleClockworkAt(World world, BlockPos pos, public static Pair<ClockworkContraption, ClockworkContraption> assembleClockworkAt(World world, BlockPos pos,
Direction direction) { Direction direction) {
if (isFrozen())
return null;
int hourArmBlocks = 0; int hourArmBlocks = 0;
ClockworkContraption hourArm = new ClockworkContraption(); ClockworkContraption hourArm = new ClockworkContraption();

View file

@ -5,7 +5,6 @@ import static net.minecraft.state.properties.BlockStateProperties.FACING;
import java.util.List; import java.util.List;
import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity; 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.ContraptionEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.DirectionalExtenderScrollOptionSlot; import com.simibubi.create.content.contraptions.components.structureMovement.DirectionalExtenderScrollOptionSlot;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
@ -206,8 +205,6 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp
if (world.isRemote) if (world.isRemote)
clientAngleDiff /= 2; clientAngleDiff /= 2;
if (running && Contraption.isFrozen())
disassemble();
if (!world.isRemote && assembleNextTick) { if (!world.isRemote && assembleNextTick) {
assembleNextTick = false; assembleNextTick = false;

View file

@ -1,14 +1,14 @@
package com.simibubi.create.content.contraptions.components.structureMovement.mounted; package com.simibubi.create.content.contraptions.components.structureMovement.mounted;
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault; import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.items.ItemHandlerHelper;
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault

View file

@ -15,7 +15,9 @@ import com.simibubi.create.foundation.utility.NBTHelper;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.minecart.AbstractMinecartEntity; import net.minecraft.entity.item.minecart.AbstractMinecartEntity;
import net.minecraft.inventory.IInventory;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.state.properties.RailShape; 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.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.gen.feature.template.Template.BlockInfo; 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; import net.minecraftforge.items.wrapper.CombinedInvWrapper;
public class MountedContraption extends Contraption { public class MountedContraption extends Contraption {
@ -46,9 +46,6 @@ public class MountedContraption extends Contraption {
} }
public static MountedContraption assembleMinecart(World world, BlockPos pos) { public static MountedContraption assembleMinecart(World world, BlockPos pos) {
if (isFrozen())
return null;
BlockState state = world.getBlockState(pos); BlockState state = world.getBlockState(pos);
if (!state.has(RAIL_SHAPE)) if (!state.has(RAIL_SHAPE))
return null; return null;

View file

@ -1,9 +1,12 @@
package com.simibubi.create.content.contraptions.components.structureMovement.piston; 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.AllBlocks;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.PistonState; import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.PistonState;
import com.simibubi.create.foundation.block.ProperDirectionalBlock; import com.simibubi.create.foundation.block.ProperDirectionalBlock;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.IWaterLoggable; import net.minecraft.block.IWaterLoggable;
@ -26,8 +29,6 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld; import net.minecraft.world.IWorld;
import net.minecraft.world.World; 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 class MechanicalPistonHeadBlock extends ProperDirectionalBlock implements IWaterLoggable {
public static final EnumProperty<PistonType> TYPE = BlockStateProperties.PISTON_TYPE; public static final EnumProperty<PistonType> TYPE = BlockStateProperties.PISTON_TYPE;

View file

@ -49,8 +49,6 @@ public class PistonContraption extends Contraption {
} }
public static PistonContraption movePistonAt(World world, BlockPos pos, Direction direction, boolean retract) { public static PistonContraption movePistonAt(World world, BlockPos pos, Direction direction, boolean retract) {
if (isFrozen())
return null;
PistonContraption construct = new PistonContraption(); PistonContraption construct = new PistonContraption();
construct.orientation = direction; construct.orientation = direction;
if (!construct.collectExtensions(world, pos, direction)) if (!construct.collectExtensions(world, pos, direction))

View file

@ -1,9 +1,14 @@
package com.simibubi.create.content.contraptions.components.structureMovement.piston; 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.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.content.contraptions.wrench.IWrenchable;
import com.simibubi.create.foundation.block.ProperDirectionalBlock; import com.simibubi.create.foundation.block.ProperDirectionalBlock;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.IWaterLoggable; import net.minecraft.block.IWaterLoggable;
@ -24,8 +29,6 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld; import net.minecraft.world.IWorld;
import net.minecraft.world.World; 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 class PistonExtensionPoleBlock extends ProperDirectionalBlock implements IWrenchable, IWaterLoggable {
public PistonExtensionPoleBlock(Properties properties) { public PistonExtensionPoleBlock(Properties properties) {

View file

@ -5,6 +5,7 @@ import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.HorizontalAxisKineticBlock; import com.simibubi.create.content.contraptions.base.HorizontalAxisKineticBlock;
import com.simibubi.create.foundation.block.ITE; import com.simibubi.create.foundation.block.ITE;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.IWaterLoggable; import net.minecraft.block.IWaterLoggable;

View file

@ -17,8 +17,6 @@ public class PulleyContraption extends Contraption {
} }
public static PulleyContraption assemblePulleyAt(World world, BlockPos pos, int initialOffset) { public static PulleyContraption assemblePulleyAt(World world, BlockPos pos, int initialOffset) {
if (isFrozen())
return null;
PulleyContraption construct = new PulleyContraption(); PulleyContraption construct = new PulleyContraption();
construct.initialOffset = initialOffset; construct.initialOffset = initialOffset;
if (!construct.searchMovedStructure(world, pos, null)) if (!construct.searchMovedStructure(world, pos, null))

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.contraptions.components.tracks; package com.simibubi.create.content.contraptions.components.tracks;
import javax.annotation.Nonnull;
import net.minecraft.block.AbstractRailBlock; import net.minecraft.block.AbstractRailBlock;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
@ -13,8 +15,8 @@ import net.minecraft.state.EnumProperty;
import net.minecraft.state.IProperty; import net.minecraft.state.IProperty;
import net.minecraft.state.StateContainer.Builder; import net.minecraft.state.StateContainer.Builder;
import net.minecraft.state.properties.RailShape; import net.minecraft.state.properties.RailShape;
import net.minecraft.util.NonNullList;
import net.minecraft.util.Direction.Axis; import net.minecraft.util.Direction.Axis;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape; 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.IWorldReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import javax.annotation.Nonnull;
public class ReinforcedRailBlock extends AbstractRailBlock { public class ReinforcedRailBlock extends AbstractRailBlock {
public static IProperty<RailShape> RAIL_SHAPE = public static IProperty<RailShape> RAIL_SHAPE =

View file

@ -10,7 +10,6 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import com.google.common.collect.ImmutableList; 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.BlockFace;
import com.simibubi.create.foundation.utility.Pair; import com.simibubi.create.foundation.utility.Pair;

View file

@ -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.config.AllConfigs;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.BlockFace; 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.Iterate;
import com.simibubi.create.foundation.utility.outliner.Outline.OutlineParams; import com.simibubi.create.foundation.utility.outliner.Outline.OutlineParams;

View file

@ -1,18 +1,19 @@
package com.simibubi.create.content.contraptions.goggles; package com.simibubi.create.content.contraptions.goggles;
import java.util.ArrayList;
import java.util.List;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.AbstractSimiScreen;
import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.gui.GuiGameElement;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import java.util.ArrayList;
import java.util.List;
public class GoggleConfigScreen extends AbstractSimiScreen { public class GoggleConfigScreen extends AbstractSimiScreen {
private int offsetX; private int offsetX;

View file

@ -1,9 +1,13 @@
package com.simibubi.create.content.contraptions.goggles; package com.simibubi.create.content.contraptions.goggles;
import java.util.ArrayList;
import java.util.List;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.gui.GuiGameElement;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.world.ClientWorld; 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.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import java.util.ArrayList;
import java.util.List;
@EventBusSubscriber(value = Dist.CLIENT) @EventBusSubscriber(value = Dist.CLIENT)
public class GoggleOverlayRenderer { public class GoggleOverlayRenderer {

View file

@ -1,17 +1,18 @@
package com.simibubi.create.content.contraptions.processing; 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.MovementBehaviour;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.item.ItemEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import net.minecraftforge.items.ItemStackHandler; import net.minecraftforge.items.ItemStackHandler;
import java.util.HashMap;
import java.util.Map;
public class BasinMovementBehaviour extends MovementBehaviour { public class BasinMovementBehaviour extends MovementBehaviour {
public Map<String, ItemStackHandler> getOrReadInventory(MovementContext context) { public Map<String, ItemStackHandler> getOrReadInventory(MovementContext context) {
Map<String, ItemStackHandler> map = new HashMap<>(); Map<String, ItemStackHandler> map = new HashMap<>();

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.contraptions.relays.advanced.sequencer; package com.simibubi.create.content.contraptions.relays.advanced.sequencer;
import java.util.Vector;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.AbstractSimiScreen;
import com.simibubi.create.foundation.gui.AllGuiTextures; import com.simibubi.create.foundation.gui.AllGuiTextures;
@ -16,8 +18,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.ListNBT; import net.minecraft.nbt.ListNBT;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import java.util.Vector;
public class SequencedGearshiftScreen extends AbstractSimiScreen { public class SequencedGearshiftScreen extends AbstractSimiScreen {
private final ItemStack renderedItem = AllBlocks.SEQUENCED_GEARSHIFT.asStack(); private final ItemStack renderedItem = AllBlocks.SEQUENCED_GEARSHIFT.asStack();

View file

@ -9,9 +9,9 @@ import java.util.List;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionEntity; 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.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.BeltPart;
import com.simibubi.create.content.contraptions.relays.belt.BeltSlope; 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.block.BlockState;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;

View file

@ -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.BeltBlock;
import com.simibubi.create.content.contraptions.relays.belt.BeltHelper; 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.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.BeltTunnelBlock;
import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity; import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity;
import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelBlock; import com.simibubi.create.content.logistics.block.belts.tunnel.BrassTunnelBlock;

View file

@ -4,6 +4,7 @@ import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes; import com.simibubi.create.AllShapes;
import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.IRotate;
import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock; import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerBlock;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.fluid.Fluids; import net.minecraft.fluid.Fluids;

View file

@ -6,6 +6,7 @@ import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock; import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock;
import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftBlock; import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftBlock;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;

View file

@ -4,9 +4,9 @@ import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.contraptions.base.CasingBlock; import com.simibubi.create.content.contraptions.base.CasingBlock;
import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import com.tterrag.registrate.util.entry.BlockEntry; import com.tterrag.registrate.util.entry.BlockEntry;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;

View file

@ -1,13 +1,13 @@
package com.simibubi.create.content.contraptions.wrench; package com.simibubi.create.content.contraptions.wrench;
import javax.annotation.Nonnull;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemUseContext; import net.minecraft.item.ItemUseContext;
import net.minecraft.util.ActionResultType; import net.minecraft.util.ActionResultType;
import javax.annotation.Nonnull;
public class WrenchItem extends Item { public class WrenchItem extends Item {
public WrenchItem(Properties properties) { public WrenchItem(Properties properties) {

View file

@ -6,7 +6,7 @@ import java.util.Random;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.advancement.AllTriggers;
import com.simibubi.create.foundation.config.AllConfigs; 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.ColorHelper;
import com.simibubi.create.foundation.utility.VecHelper; 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.BeaconTileEntity;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction; 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.BlockMode;
import net.minecraft.util.math.RayTraceContext.FluidMode; import net.minecraft.util.math.RayTraceContext.FluidMode;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.gen.Heightmap; import net.minecraft.world.gen.Heightmap;
@ -42,7 +46,7 @@ public class ChromaticCompoundItem extends Item {
public double getDurabilityForDisplay(ItemStack stack) { public double getDurabilityForDisplay(ItemStack stack) {
int light = stack.getOrCreateTag() int light = stack.getOrCreateTag()
.getInt("CollectingLight"); .getInt("CollectingLight");
return 1 - light / (float) AllConfigs.SERVER.curiosities.lightSourceCountForRefinedRadiance.get(); return 1 - light / (float) AllConfigs.SERVER.recipes.lightSourceCountForRefinedRadiance.get();
} }
@Override @Override
@ -72,7 +76,7 @@ public class ChromaticCompoundItem extends Item {
.getOrCreateTag(); .getOrCreateTag();
Vec3d positionVec = entity.getPositionVec(); Vec3d positionVec = entity.getPositionVec();
CCuriosities config = AllConfigs.SERVER.curiosities; CRecipes config = AllConfigs.SERVER.recipes;
if (world.isRemote) { if (world.isRemote) {
int light = itemData.getInt("CollectingLight"); int light = itemData.getInt("CollectingLight");
if (random.nextInt(config.lightSourceCountForRefinedRadiance.get() + 20) < light) { if (random.nextInt(config.lightSourceCountForRefinedRadiance.get() + 20) < light) {

View file

@ -5,6 +5,8 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; 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.CrossPlaneMirror;
import com.simibubi.create.content.curiosities.symmetry.mirror.EmptyMirror; import com.simibubi.create.content.curiosities.symmetry.mirror.EmptyMirror;
import com.simibubi.create.content.curiosities.symmetry.mirror.PlaneMirror; 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.DistExecutor;
import net.minecraftforge.fml.network.PacketDistributor; import net.minecraftforge.fml.network.PacketDistributor;
import javax.annotation.Nonnull;
public class SymmetryWandItem extends Item { public class SymmetryWandItem extends Item {
public static final String SYMMETRY = "symmetry"; public static final String SYMMETRY = "symmetry";

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.curiosities.tools; package com.simibubi.create.content.curiosities.tools;
import javax.annotation.ParametersAreNonnullByDefault;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
import mcp.MethodsReturnNonnullByDefault; import mcp.MethodsReturnNonnullByDefault;
@ -25,8 +27,6 @@ import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.common.util.FakePlayer;
import javax.annotation.ParametersAreNonnullByDefault;
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
public class SandPaperItem extends Item { public class SandPaperItem extends Item {

View file

@ -2,6 +2,8 @@ package com.simibubi.create.content.curiosities.zapper;
import java.util.List; import java.util.List;
import javax.annotation.Nonnull;
import com.simibubi.create.AllSoundEvents; import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.foundation.item.ItemDescription; import com.simibubi.create.foundation.item.ItemDescription;
import com.simibubi.create.foundation.networking.AllPackets; 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.DistExecutor;
import net.minecraftforge.fml.network.PacketDistributor; import net.minecraftforge.fml.network.PacketDistributor;
import javax.annotation.Nonnull;
public abstract class ZapperItem extends Item { public abstract class ZapperItem extends Item {
public ZapperItem(Properties properties) { public ZapperItem(Properties properties) {

View file

@ -4,8 +4,6 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.simibubi.create.foundation.config.AllConfigs;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -30,8 +28,8 @@ public class ZapperLog {
*/ */
public void record(World world, List<BlockPos> positions) { public void record(World world, List<BlockPos> positions) {
if (maxLogLength() == 0) // if (maxLogLength() == 0)
return; // return;
if (world != activeWorld) if (world != activeWorld)
log.clear(); log.clear();
activeWorld = world; activeWorld = world;
@ -44,13 +42,13 @@ public class ZapperLog {
log.add(0, blocks); log.add(0, blocks);
// redoIndex = 0; // redoIndex = 0;
if (maxLogLength() < log.size()) // if (maxLogLength() < log.size())
log.remove(log.size() - 1); // log.remove(log.size() - 1);
} }
protected Integer maxLogLength() { // protected Integer maxLogLength() {
return AllConfigs.SERVER.curiosities.zapperUndoLogLength.get(); // return AllConfigs.SERVER.curiosities.zapperUndoLogLength.get();
} // }
public void undo() { public void undo() {

View file

@ -321,8 +321,4 @@ public class InWorldProcessing {
} }
} }
public static boolean isFrozen() {
return AllConfigs.SERVER.control.freezeInWorldProcessing.get();
}
} }

View file

@ -2,10 +2,14 @@ package com.simibubi.create.content.logistics.block.redstone;
import java.util.Random; import java.util.Random;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.content.contraptions.wrench.IWrenchable; import com.simibubi.create.content.contraptions.wrench.IWrenchable;
import com.simibubi.create.foundation.block.ProperDirectionalBlock; import com.simibubi.create.foundation.block.ProperDirectionalBlock;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.BlockItemUseContext;
@ -19,10 +23,6 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld; import net.minecraft.world.server.ServerWorld;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
public class RedstoneContactBlock extends ProperDirectionalBlock implements IWrenchable { public class RedstoneContactBlock extends ProperDirectionalBlock implements IWrenchable {

View file

@ -4,14 +4,24 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; 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.Entity;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;
import net.minecraft.entity.item.ArmorStandEntity; import net.minecraft.entity.item.ArmorStandEntity;
import net.minecraft.entity.item.BoatEntity; import net.minecraft.entity.item.BoatEntity;
import net.minecraft.entity.item.ItemFrameEntity; import net.minecraft.entity.item.ItemFrameEntity;
import net.minecraft.entity.item.minecart.AbstractMinecartEntity; 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.BlockStateProperties;
import net.minecraft.state.properties.SlabType; import net.minecraft.state.properties.SlabType;

View file

@ -1,5 +1,11 @@
package com.simibubi.create.content.schematics.block; 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.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.CreateClient; 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.ScrollInput;
import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput; import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.client.gui.IHasContainer; import net.minecraft.client.gui.IHasContainer;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -20,12 +27,6 @@ import net.minecraft.util.Util;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent; 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<SchematicTableContainer> public class SchematicTableScreen extends AbstractSimiContainerScreen<SchematicTableContainer>
implements IHasContainer<SchematicTableContainer> { implements IHasContainer<SchematicTableContainer> {

View file

@ -1,5 +1,12 @@
package com.simibubi.create.content.schematics.block; 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.google.common.collect.ImmutableList;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.content.schematics.packet.ConfigureSchematicannonPacket; 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.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent; 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<SchematicannonContainer> { public class SchematicannonScreen extends AbstractSimiContainerScreen<SchematicannonContainer> {
private static final AllGuiTextures BG_BOTTOM = AllGuiTextures.SCHEMATICANNON_BOTTOM; private static final AllGuiTextures BG_BOTTOM = AllGuiTextures.SCHEMATICANNON_BOTTOM;

View file

@ -22,8 +22,8 @@ import com.simibubi.create.foundation.item.ItemHelper;
import com.simibubi.create.foundation.item.ItemHelper.ExtractionCountMode; import com.simibubi.create.foundation.item.ItemHelper.ExtractionCountMode;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.BlockHelper; import com.simibubi.create.foundation.utility.BlockHelper;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.block.PistonHeadBlock; import net.minecraft.block.PistonHeadBlock;

View file

@ -7,6 +7,8 @@ import java.nio.file.Paths;
import java.nio.file.StandardOpenOption; import java.nio.file.StandardOpenOption;
import java.util.List; import java.util.List;
import javax.annotation.Nonnull;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
@ -41,8 +43,6 @@ import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.common.thread.SidedThreadGroups; import net.minecraftforge.fml.common.thread.SidedThreadGroups;
import javax.annotation.Nonnull;
public class SchematicItem extends Item { public class SchematicItem extends Item {
public SchematicItem(Properties properties) { public SchematicItem(Properties properties) {

View file

@ -1,6 +1,7 @@
package com.simibubi.create.foundation.command; package com.simibubi.create.foundation.command;
import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.CommandDispatcher;
import net.minecraft.command.CommandSource; import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands; import net.minecraft.command.Commands;

View file

@ -1,5 +1,12 @@
package com.simibubi.create.foundation.command; 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.util.math.ChunkPos;
import net.minecraft.world.chunk.ChunkStatus; import net.minecraft.world.chunk.ChunkStatus;
import net.minecraft.world.gen.Heightmap; import net.minecraft.world.gen.Heightmap;
@ -7,12 +14,6 @@ import net.minecraft.world.server.ChunkHolder;
import net.minecraft.world.server.ServerChunkProvider; import net.minecraft.world.server.ServerChunkProvider;
import net.minecraftforge.event.world.ChunkEvent; import net.minecraftforge.event.world.ChunkEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; 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 { public class ChunkUtil {
private static final Logger LOGGER = LogManager.getLogger("Create/ChunkUtil"); private static final Logger LOGGER = LogManager.getLogger("Create/ChunkUtil");

View file

@ -2,6 +2,7 @@ package com.simibubi.create.foundation.command;
import com.mojang.brigadier.builder.ArgumentBuilder; import com.mojang.brigadier.builder.ArgumentBuilder;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import net.minecraft.command.CommandSource; import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands; import net.minecraft.command.Commands;
import net.minecraft.command.arguments.ColumnPosArgument; import net.minecraft.command.arguments.ColumnPosArgument;

View file

@ -1,18 +1,20 @@
package com.simibubi.create.foundation.command; 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.content.contraptions.goggles.GoggleConfigScreen;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.gui.ScreenOpener;
import com.simibubi.create.foundation.networking.SimplePacketBase; import com.simibubi.create.foundation.networking.SimplePacketBase;
import net.minecraft.network.PacketBuffer; import net.minecraft.network.PacketBuffer;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.network.NetworkEvent; 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 { public class ConfigureConfigPacket extends SimplePacketBase {

View file

@ -2,6 +2,7 @@ package com.simibubi.create.foundation.command;
import com.mojang.brigadier.builder.ArgumentBuilder; import com.mojang.brigadier.builder.ArgumentBuilder;
import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.networking.AllPackets;
import net.minecraft.command.CommandSource; import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands; import net.minecraft.command.Commands;
import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity;

View file

@ -3,15 +3,7 @@ package com.simibubi.create.foundation.config;
public class CCuriosities extends ConfigBase { public class CCuriosities extends ConfigBase {
public ConfigInt maxSymmetryWandRange = i(50, 10, "maxSymmetryWandRange", Comments.symmetryRange); public ConfigInt maxSymmetryWandRange = i(50, 10, "maxSymmetryWandRange", Comments.symmetryRange);
public ConfigInt zapperUndoLogLength = i(10, 0, "zapperUndoLogLength", Comments.zapperUndoLogLength); // public ConfigInt zapperUndoLogLength = i(10, 0, "zapperUndoLogLength", Comments.zapperUndoLogLength); NYI
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);
@Override @Override
public String getName() { public String getName() {
@ -20,12 +12,7 @@ public class CCuriosities extends ConfigBase {
private static class Comments { private static class Comments {
static String symmetryRange = "The Maximum Distance to an active mirror for the symmetry wand to trigger."; 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 zapperUndoLogLength = "The maximum amount of operations, a blockzapper can remember for undoing. (0 to disable undo)";
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)";
} }
} }

View file

@ -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.";
}
}

View file

@ -13,7 +13,7 @@ public class CKinetics extends ConfigBase {
e(DeployerAggroSetting.CREEPERS, "ignoreDeployerAttacks", Comments.ignoreDeployerAttacks); e(DeployerAggroSetting.CREEPERS, "ignoreDeployerAttacks", Comments.ignoreDeployerAttacks);
public ConfigInt kineticValidationFrequency = i(60, 5, "kineticValidationFrequency", Comments.kineticValidationFrequency); 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 fanPushDistance = i(20, 5, "fanPushDistance", Comments.fanPushDistance);
public ConfigInt fanPullDistance = i(20, 5, "fanPullDistance", Comments.fanPullDistance); public ConfigInt fanPullDistance = i(20, 5, "fanPullDistance", Comments.fanPullDistance);
public ConfigInt fanBlockCheckRate = i(30, 10, "fanBlockCheckRate", Comments.fanBlockCheckRate); 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 generatingFanSpeed = i(16, 0, "generatingFanSpeed", Comments.rpm, Comments.generatingFanSpeed);
public ConfigInt inWorldProcessingTime = i(150, 0, "inWorldProcessingTime", Comments.inWorldProcessingTime); 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 maxBlocksMoved = i(2048, 1, "maxBlocksMoved", Comments.maxBlocksMoved);
public ConfigInt maxChassisRange = i(16, 1, "maxChassisRange", Comments.maxChassisRange); public ConfigInt maxChassisRange = i(16, 1, "maxChassisRange", Comments.maxChassisRange);
public ConfigInt maxPistonPoles = i(64, 1, "maxPistonPoles", Comments.maxPistonPoles); public ConfigInt maxPistonPoles = i(64, 1, "maxPistonPoles", Comments.maxPistonPoles);
public ConfigInt maxRopeLength = i(128, 1, "maxRopeLength", Comments.maxRopeLength); public ConfigInt maxRopeLength = i(128, 1, "maxRopeLength", Comments.maxRopeLength);
public ConfigInt maxCartCouplingLength = i(32, 1, "maxCartCouplingLength", Comments.maxCartCouplingLength); 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 mediumSpeed = f(30, 0, 4096, "mediumSpeed", Comments.rpm, Comments.mediumSpeed);
public ConfigFloat fastSpeed = f(100, 0, 65535, "fastSpeed", Comments.rpm, Comments.fastSpeed); public ConfigFloat fastSpeed = f(100, 0, 65535, "fastSpeed", Comments.rpm, Comments.fastSpeed);
public ConfigFloat mediumStressImpact = public ConfigFloat mediumStressImpact =

View file

@ -4,8 +4,14 @@ public class CRecipes extends ConfigBase {
public ConfigBool allowShapelessInMixer = b(true, "allowShapelessInMixer", Comments.allowShapelessInMixer); public ConfigBool allowShapelessInMixer = b(true, "allowShapelessInMixer", Comments.allowShapelessInMixer);
public ConfigBool allowShapedSquareInPress = b(true, "allowShapedSquareInPress", Comments.allowShapedSquareInPress); 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 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 @Override
public String getName() { 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."; "When true, allows any standard crafting recipes to be processed by Mechanical Crafters.";
static String allowStonecuttingOnSaw = static String allowStonecuttingOnSaw =
"When true, allows any stonecutting recipes to be processed by a Mechanical Saw."; "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.";
} }
} }

View file

@ -12,7 +12,6 @@ public class CServer extends ConfigBase {
public CLogistics logistics = nested(0, CLogistics::new, Comments.logistics); public CLogistics logistics = nested(0, CLogistics::new, Comments.logistics);
public CSchematics schematics = nested(0, CSchematics::new, Comments.schematics); public CSchematics schematics = nested(0, CSchematics::new, Comments.schematics);
public CCuriosities curiosities = nested(0, CCuriosities::new, Comments.curiosities); public CCuriosities curiosities = nested(0, CCuriosities::new, Comments.curiosities);
public CDamageControl control = nested(0, CDamageControl::new, Comments.control);
@Override @Override
public String getName() { public String getName() {
@ -26,7 +25,6 @@ public class CServer extends ConfigBase {
static String fluids = "Create's liquid manipulation tools"; static String fluids = "Create's liquid manipulation tools";
static String logistics = "Tweaks for logistical components"; static String logistics = "Tweaks for logistical components";
static String curiosities = "Gadgets and other Shenanigans added by Create"; 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 infrastructure = "The Backbone of Create";
static String tickrateSyncTimer = static String tickrateSyncTimer =
"The amount of time a server waits before sending out tickrate synchronization packets."; "The amount of time a server waits before sending out tickrate synchronization packets.";

View file

@ -75,9 +75,10 @@ public abstract class ConfigBase {
T config = constructor.get(); T config = constructor.get();
new ConfigGroup(config.getName(), depth, comment); new ConfigGroup(config.getName(), depth, comment);
new CValue<Boolean, ForgeConfigSpec.BooleanValue>(config.getName(), builder -> { new CValue<Boolean, ForgeConfigSpec.BooleanValue>(config.getName(), builder -> {
config.depth = depth;
config.registerAll(builder); config.registerAll(builder);
if (config.depth > 0) if (config.depth > depth)
builder.pop(config.depth); builder.pop(config.depth - depth);
return null; return null;
}); });
if (children == null) if (children == null)
@ -124,6 +125,10 @@ public abstract class ConfigBase {
public void set(V value) { public void set(V value) {
this.value.set(value); this.value.set(value);
} }
public String getName() {
return name;
}
} }
/** /**
@ -146,7 +151,7 @@ public abstract class ConfigBase {
builder.pop(depth - groupDepth); builder.pop(depth - groupDepth);
depth = groupDepth; depth = groupDepth;
addComments(builder, comment); addComments(builder, comment);
builder.push(name); builder.push(getName());
depth++; depth++;
} }

View file

@ -1,7 +1,6 @@
package com.simibubi.create.foundation.data; package com.simibubi.create.foundation.data;
import mcp.MethodsReturnNonnullByDefault; import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;

View file

@ -19,7 +19,12 @@ import net.minecraft.block.Blocks;
import net.minecraft.block.FireBlock; import net.minecraft.block.FireBlock;
import net.minecraft.block.FlowingFluidBlock; import net.minecraft.block.FlowingFluidBlock;
import net.minecraft.client.Minecraft; 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.model.IBakedModel;
import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.client.world.ClientWorld; import net.minecraft.client.world.ClientWorld;

View file

@ -6,7 +6,6 @@ import java.util.function.Predicate;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import com.google.common.base.Predicates; 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.item.ItemHelper;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
@ -103,8 +102,6 @@ public class InvManipulationBehaviour extends TileEntityBehaviour {
if (getWorld().isRemote) if (getWorld().isRemote)
return ItemStack.EMPTY; return ItemStack.EMPTY;
if (AllConfigs.SERVER.control.freezeExtractors.get())
return ItemStack.EMPTY;
IItemHandler inventory = targetCapability.orElse(null); IItemHandler inventory = targetCapability.orElse(null);
if (inventory == null) if (inventory == null)
return ItemStack.EMPTY; return ItemStack.EMPTY;

View file

@ -2,7 +2,6 @@ package com.simibubi.create.foundation.utility;
import java.util.function.Consumer; import java.util.function.Consumer;
import net.minecraft.item.Items;
import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.mutable.MutableInt;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -13,6 +12,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.IFluidState; import net.minecraft.fluid.IFluidState;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.state.properties.SlabType; import net.minecraft.state.properties.SlabType;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;

View file

@ -1,7 +1,12 @@
package com.simibubi.create.foundation.worldgen; 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.curiosities.tools.SandPaperItem;
import com.simibubi.create.content.palettes.MetalBlock; import com.simibubi.create.content.palettes.MetalBlock;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
@ -16,10 +21,6 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld; import net.minecraft.world.server.ServerWorld;
import java.util.LinkedList;
import java.util.OptionalDouble;
import java.util.Random;
public class OxidizingBlock extends MetalBlock { public class OxidizingBlock extends MetalBlock {
public static final IntegerProperty OXIDIZATION = IntegerProperty.create("oxidization", 0, 7); public static final IntegerProperty OXIDIZATION = IntegerProperty.create("oxidization", 0, 7);