diff --git a/src/main/java/com/simibubi/create/AllBlocksNew.java b/src/main/java/com/simibubi/create/AllBlocksNew.java index 2b9886edb..144b0a1cf 100644 --- a/src/main/java/com/simibubi/create/AllBlocksNew.java +++ b/src/main/java/com/simibubi/create/AllBlocksNew.java @@ -8,7 +8,6 @@ import com.simibubi.create.modules.contraptions.relays.elementary.CogWheelBlock; import com.simibubi.create.modules.contraptions.relays.elementary.CogwheelBlockItem; import com.simibubi.create.modules.contraptions.relays.elementary.ShaftBlock; import com.simibubi.create.modules.contraptions.relays.encased.EncasedShaftBlock; -import com.simibubi.create.modules.schematics.block.CreativeCrateBlock; import com.simibubi.create.modules.schematics.block.SchematicTableBlock; import com.simibubi.create.modules.schematics.block.SchematicannonBlock; import com.tterrag.registrate.util.RegistryEntry; @@ -34,13 +33,6 @@ public class AllBlocksNew { .build() .register(); - - public static final RegistryEntry CREATIVE_CRATE = REGISTRATE.block("creative_crate", CreativeCrateBlock::new) - .initialProperties(() -> Blocks.CHEST) - .blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), prov.models().getExistingFile(ctx.getId()))) - .simpleItem() - .register(); - public static final RegistryEntry SCHEMATIC_TABLE = REGISTRATE.block("schematic_table", SchematicTableBlock::new) .initialProperties(() -> Blocks.LECTERN) .blockstate((ctx, prov) -> prov.horizontalBlock(ctx.getEntry(), prov.models().getExistingFile(ctx.getId()), 0)) diff --git a/src/main/java/com/simibubi/create/compat/jei/category/MechanicalCraftingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/MechanicalCraftingCategory.java index 7cc21a0ea..989e7106e 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/MechanicalCraftingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/MechanicalCraftingCategory.java @@ -5,7 +5,7 @@ import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; -import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.AllBlocks; import com.simibubi.create.ScreenResources; import com.simibubi.create.compat.jei.category.animations.AnimatedCrafter; @@ -41,23 +41,24 @@ public class MechanicalCraftingCategory extends CreateRecipeCategory t, Advancement root) { String id = Create.ID; - Advancement its_alive = advancement("its_alive", AllBlocks.COGWHEEL.get(), TaskType.NORMAL) + Advancement its_alive = advancement("its_alive", AllBlocksNew.COGWHEEL.get(), TaskType.NORMAL) .withParent(root) .withCriterion("0", AllTriggers.ROTATION.instance()) .register(t, id + ":its_alive"); @@ -158,7 +159,7 @@ public class CreateAdvancements implements IDataProvider { .withParent(goggles) .register(t, id + ":stress_gauge"); - Advancement shifting_gears = advancement("shifting_gears", AllBlocks.LARGE_COGWHEEL.get(), TaskType.NORMAL) + Advancement shifting_gears = advancement("shifting_gears", AllBlocksNew.LARGE_COGWHEEL.get(), TaskType.NORMAL) .withParent(its_alive) .withCriterion("0", AllTriggers.SHIFTING_GEARS.instance()) .register(t, id + ":shifting_gears"); diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/StockswitchBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/StockswitchBlock.java index 90636a5e9..a7b943d82 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/StockswitchBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/StockswitchBlock.java @@ -87,7 +87,7 @@ public class StockswitchBlock extends HorizontalBlock implements ITE () -> withTileEntityDo(worldIn, pos, te -> this.displayScreen(te, player))); return ActionResultType.SUCCESS; diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/CrateBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/CrateBlock.java index b72733e50..6b6c0d8b5 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/CrateBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/CrateBlock.java @@ -59,7 +59,7 @@ public class CrateBlock extends ProperDirectionalBlock implements IWrenchable { BlockPos pos = context.getPos(); World world = context.getWorld(); - if (!context.isPlacerSneaking()) { + if (!context.getPlayer().isSneaking()) { for (Direction d : Direction.values()) { BlockState state = world.getBlockState(pos.offset(d)); if (state.getBlock() == this && !state.get(DOUBLE)) diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/LaunchedItem.java b/src/main/java/com/simibubi/create/modules/schematics/block/LaunchedItem.java index f283eb3fe..e325b7279 100644 --- a/src/main/java/com/simibubi/create/modules/schematics/block/LaunchedItem.java +++ b/src/main/java/com/simibubi/create/modules/schematics/block/LaunchedItem.java @@ -3,6 +3,7 @@ package com.simibubi.create.modules.schematics.block; import java.util.Optional; import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllBlocksNew; import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock; import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Part; import com.simibubi.create.modules.contraptions.relays.belt.item.BeltConnectorItem; @@ -151,7 +152,7 @@ public abstract class LaunchedItem { BlockPos offset = BeltBlock.nextSegmentPosition(state, BlockPos.ZERO, isStart); int i = length - 1; Axis axis = state.get(BeltBlock.HORIZONTAL_FACING).rotateY().getAxis(); - world.setBlockState(target, AllBlocks.SHAFT.getDefault().with(ShaftBlock.AXIS, axis)); + world.setBlockState(target, AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(ShaftBlock.AXIS, axis)); BeltConnectorItem .createBelts(world, target, target.add(offset.getX() * i, offset.getY() * i, offset.getZ() * i)); } diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonTileEntity.java b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonTileEntity.java index 82e1c65fd..d98f99b34 100644 --- a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonTileEntity.java @@ -3,6 +3,7 @@ package com.simibubi.create.modules.schematics.block; import java.util.LinkedList; import java.util.List; +import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocksNew; import com.simibubi.create.AllItems; import com.simibubi.create.AllSoundEvents; @@ -151,7 +152,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC if (!world.isBlockPresent(pos.offset(facing))) continue; - if (AllBlocksNew.CREATIVE_CRATE.get() == world.getBlockState(pos.offset(facing)).getBlock()) { + if (AllBlocks.CREATIVE_CRATE.get() == world.getBlockState(pos.offset(facing)).getBlock()) { hasCreativeCrate = true; } @@ -503,7 +504,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC } if (!isLastSegment) blockState = (blockState.get(BeltBlock.PART) == Part.MIDDLE) ? Blocks.AIR.getDefaultState() - : AllBlocks.SHAFT.getDefault().with(ShaftBlock.AXIS, facing.rotateY().getAxis()); + : AllBlocksNew.getDefault(AllBlocksNew.SHAFT).with(ShaftBlock.AXIS, facing.rotateY().getAxis()); return blockState; } @@ -599,10 +600,8 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC int amountFound = 0; for (IItemHandler iItemHandler : attachedInventories) { - amountFound += ItemHelper - .extract(iItemHandler, s -> ItemRequirement.validate(required, s), ExtractionCountMode.UPTO, - required.getCount(), true) - .getCount(); + amountFound += ItemHelper.extract(iItemHandler, s -> ItemRequirement.validate(required, s), + ExtractionCountMode.UPTO, required.getCount(), true).getCount(); if (amountFound < required.getCount()) continue; @@ -615,10 +614,8 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC if (!simulate && success) { int amountFound = 0; for (IItemHandler iItemHandler : attachedInventories) { - amountFound += ItemHelper - .extract(iItemHandler, s -> ItemRequirement.validate(required, s), ExtractionCountMode.UPTO, - required.getCount(), false) - .getCount(); + amountFound += ItemHelper.extract(iItemHandler, s -> ItemRequirement.validate(required, s), + ExtractionCountMode.UPTO, required.getCount(), false).getCount(); if (amountFound < required.getCount()) continue; break; @@ -665,16 +662,14 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC public void finishedPrinting() { inventory.setStackInSlot(0, ItemStack.EMPTY); - inventory - .setStackInSlot(1, - new ItemStack(AllItems.EMPTY_BLUEPRINT.get(), inventory.getStackInSlot(1).getCount() + 1)); + inventory.setStackInSlot(1, + new ItemStack(AllItems.EMPTY_BLUEPRINT.get(), inventory.getStackInSlot(1).getCount() + 1)); state = State.STOPPED; statusMsg = "finished"; resetPrinter(); target = getPos().add(1, 0, 0); - world - .playSound(null, pos.getX(), pos.getY(), pos.getZ(), AllSoundEvents.SCHEMATICANNON_FINISH.get(), - SoundCategory.BLOCKS, 1, .7f); + world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), AllSoundEvents.SCHEMATICANNON_FINISH.get(), + SoundCategory.BLOCKS, 1, .7f); sendUpdate = true; } @@ -830,9 +825,8 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC } public void playFiringSound() { - world - .playSound(null, pos.getX(), pos.getY(), pos.getZ(), AllSoundEvents.SCHEMATICANNON_LAUNCH_BLOCK.get(), - SoundCategory.BLOCKS, .1f, 1.1f); + world.playSound(null, pos.getX(), pos.getY(), pos.getZ(), AllSoundEvents.SCHEMATICANNON_LAUNCH_BLOCK.get(), + SoundCategory.BLOCKS, .1f, 1.1f); } public void sendToContainer(PacketBuffer buffer) { @@ -896,7 +890,8 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC } @Override - public void addBehaviours(List behaviours) {} + public void addBehaviours(List behaviours) { + } @Override public void lazyTick() {