From 1e8b38ab3ce2a137f50114a5a23f0822ee17c67b Mon Sep 17 00:00:00 2001 From: DrMangoTea Date: Wed, 25 Oct 2023 22:58:42 +0200 Subject: [PATCH] pumpjack rendering fix, flarestacks exhaust and casting jei interface --- .../BuldingCreativeModeTab.java | 3 +- .../tfmg/blocks/concrete/ConcreteFluid.java | 2 +- .../formwork/FormWorkBlockEntity.java | 3 +- .../engines/intake/AirIntakeBlockEntity.java | 21 +- .../blocks/machines/exhaust/ExhaustBlock.java | 91 ++++++ .../machines/exhaust/ExhaustTileEntity.java | 273 +++++++++++++++++ .../machines/flarestack/FlarestackBlock.java | 77 +++++ .../flarestack/FlarestackBlockEntity.java | 280 ++++++++++++++++++ .../CastingSpoutBlockEntity.java | 5 + .../pumpjack/crank/PumpjackCrankRenderer.java | 58 ++-- .../PumpjackHammerHolderBlockEntity.java | 6 + .../PumpjackHammerHolderRenderer.java | 22 +- .../machine_input/MachineInputRenderer.java | 3 +- .../tfmg/recipes/casting/CastingRecipe.java | 5 + .../tfmg/recipes/jei/CastingCategory.java | 88 ++++++ .../drmangotea/tfmg/recipes/jei/TFMGJei.java | 12 +- .../recipes/jei/machines/CastingSetup.java | 63 ++++ .../tfmg/registry/TFMGBlockEntities.java | 14 +- .../drmangotea/tfmg/registry/TFMGBlocks.java | 29 +- .../tfmg/registry/TFMGPartialModels.java | 1 + .../tfmg/worldgen/TFMGLayeredPatterns.java | 7 +- 21 files changed, 1014 insertions(+), 49 deletions(-) create mode 100644 src/main/java/com/drmangotea/tfmg/blocks/machines/exhaust/ExhaustBlock.java create mode 100644 src/main/java/com/drmangotea/tfmg/blocks/machines/exhaust/ExhaustTileEntity.java create mode 100644 src/main/java/com/drmangotea/tfmg/blocks/machines/flarestack/FlarestackBlock.java create mode 100644 src/main/java/com/drmangotea/tfmg/blocks/machines/flarestack/FlarestackBlockEntity.java create mode 100644 src/main/java/com/drmangotea/tfmg/recipes/jei/CastingCategory.java create mode 100644 src/main/java/com/drmangotea/tfmg/recipes/jei/machines/CastingSetup.java diff --git a/src/main/java/com/drmangotea/tfmg/base/creative_mode_tabs/BuldingCreativeModeTab.java b/src/main/java/com/drmangotea/tfmg/base/creative_mode_tabs/BuldingCreativeModeTab.java index d5853c17..0a593ce2 100644 --- a/src/main/java/com/drmangotea/tfmg/base/creative_mode_tabs/BuldingCreativeModeTab.java +++ b/src/main/java/com/drmangotea/tfmg/base/creative_mode_tabs/BuldingCreativeModeTab.java @@ -1,7 +1,6 @@ package com.drmangotea.tfmg.base.creative_mode_tabs; import com.drmangotea.tfmg.registry.TFMGBlocks; -import com.drmangotea.tfmg.registry.TFMGItems; import net.minecraft.core.NonNullList; import net.minecraft.world.item.ItemStack; @@ -17,6 +16,6 @@ public class BuldingCreativeModeTab extends TFMGCreativeModeTab { @Override public ItemStack makeIcon() { - return TFMGBlocks.CONCRETE_TEST.asStack(); + return TFMGBlocks.CONCRETE.asStack(); } } diff --git a/src/main/java/com/drmangotea/tfmg/blocks/concrete/ConcreteFluid.java b/src/main/java/com/drmangotea/tfmg/blocks/concrete/ConcreteFluid.java index 606a4a40..61e520b7 100644 --- a/src/main/java/com/drmangotea/tfmg/blocks/concrete/ConcreteFluid.java +++ b/src/main/java/com/drmangotea/tfmg/blocks/concrete/ConcreteFluid.java @@ -31,7 +31,7 @@ public class ConcreteFluid extends ForgeFlowingFluid { int random = randomSource.nextInt(7) ; if(random==2) { - level.setBlock(pos, TFMGBlocks.CONCRETE_TEST.get().defaultBlockState(), 3); + level.setBlock(pos, TFMGBlocks.CONCRETE.get().defaultBlockState(), 3); } } diff --git a/src/main/java/com/drmangotea/tfmg/blocks/concrete/formwork/FormWorkBlockEntity.java b/src/main/java/com/drmangotea/tfmg/blocks/concrete/formwork/FormWorkBlockEntity.java index f0212b00..39e120b1 100644 --- a/src/main/java/com/drmangotea/tfmg/blocks/concrete/formwork/FormWorkBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/blocks/concrete/formwork/FormWorkBlockEntity.java @@ -3,7 +3,6 @@ package com.drmangotea.tfmg.blocks.concrete.formwork; import com.drmangotea.tfmg.blocks.machines.TFMGMachineBlockEntity; import com.drmangotea.tfmg.registry.TFMGBlocks; import com.drmangotea.tfmg.registry.TFMGFluids; -import com.simibubi.create.Create; import com.simibubi.create.foundation.fluid.SmartFluidTank; import com.simibubi.create.foundation.utility.animation.LerpedFloat; import net.minecraft.core.BlockPos; @@ -64,7 +63,7 @@ public class FormWorkBlockEntity extends TFMGMachineBlockEntity { timer--; if(timer==0){ - level.setBlock(getBlockPos(), TFMGBlocks.CONCRETE_TEST.getDefaultState(),1); + level.setBlock(getBlockPos(), TFMGBlocks.CONCRETE.getDefaultState(),3); } } diff --git a/src/main/java/com/drmangotea/tfmg/blocks/engines/intake/AirIntakeBlockEntity.java b/src/main/java/com/drmangotea/tfmg/blocks/engines/intake/AirIntakeBlockEntity.java index b378629a..eb68dc7d 100644 --- a/src/main/java/com/drmangotea/tfmg/blocks/engines/intake/AirIntakeBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/blocks/engines/intake/AirIntakeBlockEntity.java @@ -131,6 +131,7 @@ public class AirIntakeBlockEntity extends KineticBlockEntity implements IWrencha controller = this.getBlockPos(); } else { + if(!(((AirIntakeBlockEntity) level.getBlockEntity(controller)).isController)) isUsedByController = false; } @@ -139,17 +140,19 @@ public class AirIntakeBlockEntity extends KineticBlockEntity implements IWrencha // controller = this.getBlockPos(); if(controller!=null) { - if(((AirIntakeBlockEntity)level.getBlockEntity(controller)).diameter==2) { - int x = Math.abs(this.getBlockPos().getX() - controller.getX()); - int y = Math.abs(this.getBlockPos().getY() - controller.getY()); - int z = Math.abs(this.getBlockPos().getZ() - controller.getZ()); + if(level.getBlockEntity(controller)!=null) + if(((AirIntakeBlockEntity)level.getBlockEntity(controller)).diameter==2) { + int x = Math.abs(this.getBlockPos().getX() - controller.getX()); + int y = Math.abs(this.getBlockPos().getY() - controller.getY()); + int z = Math.abs(this.getBlockPos().getZ() - controller.getZ()); - int distanceFromController = x + y + z; - if (x > 1 || y > 1 || z > 1) { - isUsedByController = false; - controller = this.getBlockPos(); + int distanceFromController = x + y + z; + if (x > 1 || y > 1 || z > 1) { + isUsedByController = false; + controller = this.getBlockPos(); + } } - } + if(level.getBlockEntity(controller)!=null) if(((AirIntakeBlockEntity)level.getBlockEntity(controller)).diameter==1) { isUsedByController = false; controller = this.getBlockPos(); diff --git a/src/main/java/com/drmangotea/tfmg/blocks/machines/exhaust/ExhaustBlock.java b/src/main/java/com/drmangotea/tfmg/blocks/machines/exhaust/ExhaustBlock.java new file mode 100644 index 00000000..9ee749ae --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/blocks/machines/exhaust/ExhaustBlock.java @@ -0,0 +1,91 @@ +package com.drmangotea.tfmg.blocks.machines.exhaust; + + +import com.drmangotea.tfmg.registry.TFMGBlockEntities; +import com.simibubi.create.Create; +import com.simibubi.create.content.equipment.wrench.IWrenchable; +import com.simibubi.create.foundation.block.IBE; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.RodBlock; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.Fluids; + +import java.util.Random; + +public class ExhaustBlock extends RodBlock implements IBE, IWrenchable { + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + //Direction facing = this.defaultBlockState().getValue(FACING); + public ExhaustBlock(Properties p_55926_) { + super(p_55926_); + this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.UP).setValue(WATERLOGGED, Boolean.valueOf(false))); + } + + + public BlockState getStateForPlacement(BlockPlaceContext p_153711_) { + FluidState fluidstate = p_153711_.getLevel().getFluidState(p_153711_.getClickedPos()); + boolean flag = fluidstate.getType() == Fluids.WATER; + return this.defaultBlockState().setValue(FACING, p_153711_.getClickedFace()).setValue(WATERLOGGED, Boolean.valueOf(flag)); + } + + public BlockState updateShape(BlockState p_153739_, Direction p_153740_, BlockState p_153741_, LevelAccessor p_153742_, BlockPos p_153743_, BlockPos p_153744_) { + if (p_153739_.getValue(WATERLOGGED)) { + p_153742_.scheduleTick(p_153743_, Fluids.WATER, Fluids.WATER.getTickDelay(p_153742_)); + } + + return super.updateShape(p_153739_, p_153740_, p_153741_, p_153742_, p_153743_, p_153744_); + } + public FluidState getFluidState(BlockState p_153759_) { + return p_153759_.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(p_153759_); + } + + public static void makeParticles(Level level,BlockPos pos, int particleRotation) { + Random random = Create.RANDOM; + int shouldSpawnSmoke = random.nextInt(7); + if(shouldSpawnSmoke==0) { + + + if(particleRotation==0) + level.addParticle(ParticleTypes.CAMPFIRE_SIGNAL_SMOKE, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 0.0D, 0.08D, 0.0D); + if(particleRotation==1) + level.addParticle(ParticleTypes.CAMPFIRE_SIGNAL_SMOKE, pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5, 0.0D, 0.08D, 0.0D); + + if(particleRotation==2) + level.addParticle(ParticleTypes.CAMPFIRE_SIGNAL_SMOKE, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ(), 0.0D, 0.08D, 0.0D); + if(particleRotation==3) + level.addParticle(ParticleTypes.CAMPFIRE_SIGNAL_SMOKE, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 1, 0.0D, 0.08D, 0.0D); + if(particleRotation==4) + level.addParticle(ParticleTypes.CAMPFIRE_SIGNAL_SMOKE, pos.getX() + 1, pos.getY() + 0.5, pos.getZ() + 0.5, 0.0D, 0.08D, 0.0D); + if(particleRotation==5) + level.addParticle(ParticleTypes.CAMPFIRE_SIGNAL_SMOKE, pos.getX(), pos.getY() + 0.5, pos.getZ() + 0.5, 0.0D, 0.08D, 0.0D); + + + + } + + } + + + protected void createBlockStateDefinition(StateDefinition.Builder p_153746_) { + p_153746_.add(FACING, WATERLOGGED); + } + @Override + public Class getBlockEntityClass() { + return ExhaustTileEntity.class; + } + + @Override + public BlockEntityType getBlockEntityType() { + return TFMGBlockEntities.EXHAUST.get(); + } +} diff --git a/src/main/java/com/drmangotea/tfmg/blocks/machines/exhaust/ExhaustTileEntity.java b/src/main/java/com/drmangotea/tfmg/blocks/machines/exhaust/ExhaustTileEntity.java new file mode 100644 index 00000000..fb3fd03c --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/blocks/machines/exhaust/ExhaustTileEntity.java @@ -0,0 +1,273 @@ +package com.drmangotea.tfmg.blocks.machines.exhaust; + + +import com.drmangotea.tfmg.registry.TFMGFluids; +import com.simibubi.create.Create; +import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation; +import com.simibubi.create.foundation.blockEntity.SmartBlockEntity; +import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; +import com.simibubi.create.foundation.fluid.SmartFluidTank; +import com.simibubi.create.foundation.utility.Lang; +import com.simibubi.create.foundation.utility.LangBuilder; +import net.minecraft.ChatFormatting; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidTank; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.templates.FluidTank; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.List; +import java.util.Optional; + +public class ExhaustTileEntity extends SmartBlockEntity implements IHaveGoggleInformation { + + + + protected LazyOptional fluidCapability; + public FluidTank tankInventory; + + public boolean spawnsSmoke=false; + public int smokeTimer=0; + + private static final int SYNC_RATE = 8; + protected int syncCooldown; + protected boolean queuedSync; + + + + public ExhaustTileEntity(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); + tankInventory = createInventory(); + fluidCapability = LazyOptional.of(() -> tankInventory); + + refreshCapability(); + } + + + @Override + public boolean addToGoggleTooltip(List tooltip, boolean isPlayerSneaking) { + + LangBuilder mb = Lang.translate("generic.unit.millibuckets"); + + ///////// + LazyOptional handler = this.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY); + Optional resolve = handler.resolve(); + if (!resolve.isPresent()) + return false; + + IFluidHandler tank = resolve.get(); + if (tank.getTanks() == 0) + return false; + + Lang.translate("goggles.pumpjack_fluid_storage") + .style(ChatFormatting.GRAY) + .forGoggles(tooltip); + + + boolean isEmpty = true; + for (int i = 0; i < tank.getTanks(); i++) { + FluidStack fluidStack = tank.getFluidInTank(i); + if (fluidStack.isEmpty()) + continue; + + Lang.fluidName(fluidStack) + .style(ChatFormatting.GRAY) + .forGoggles(tooltip, 1); + + Lang.builder() + .add(Lang.number(fluidStack.getAmount()) + .add(mb) + .style(ChatFormatting.GOLD)) + .text(ChatFormatting.GRAY, " / ") + .add(Lang.number(tank.getTankCapacity(i)) + .add(mb) + .style(ChatFormatting.DARK_GRAY)) + .forGoggles(tooltip, 1); + + isEmpty = false; + } + + if (tank.getTanks() > 1) { + if (isEmpty) + tooltip.remove(tooltip.size() - 1); + return true; + } + + if (!isEmpty) + return true; + + Lang.translate("gui.goggles.fluid_container.capacity") + .add(Lang.number(tank.getTankCapacity(0)) + .add(mb) + .style(ChatFormatting.GOLD)) + .style(ChatFormatting.DARK_GRAY) + .forGoggles(tooltip, 1); + + + return true; + + + + } + + + + + protected SmartFluidTank createInventory() { + return new SmartFluidTank(500, this::onFluidStackChanged) { + @Override + public boolean isFluidValid(FluidStack stack) { + return stack.getFluid().isSame(TFMGFluids.CARBON_DIOXIDE.getSource()); + } + }; + } + + protected void onFluidStackChanged(FluidStack newFluidStack) { + sendData(); + } + + @Override + public void tick() { + super.tick(); + Direction direction = this.getBlockState().getValue(ExhaustBlock.FACING); + + if(smokeTimer!=0) { + spawnsSmoke = true; + smokeTimer--; + }else spawnsSmoke = false; + if (direction == Direction.UP) + if(spawnsSmoke) + ExhaustBlock.makeParticles(level, this.getBlockPos(), 0); + if (direction == Direction.DOWN) + if(spawnsSmoke) + ExhaustBlock.makeParticles(level, this.getBlockPos(), 1); + if (direction == Direction.NORTH) + if(spawnsSmoke) + ExhaustBlock.makeParticles(level, this.getBlockPos(), 2); + if (direction == Direction.SOUTH) + if(spawnsSmoke) + ExhaustBlock.makeParticles(level, this.getBlockPos(), 3); + if (direction == Direction.EAST) + if(spawnsSmoke) + ExhaustBlock.makeParticles(level, this.getBlockPos(), 4); + if (direction == Direction.WEST) + if(spawnsSmoke) + ExhaustBlock.makeParticles(level, this.getBlockPos(), 5); + if(tankInventory.getFluidAmount()>0) { + + smokeTimer = 100; + spawnsSmoke = true; + + int random = Create.RANDOM.nextInt(5); + if(random==0) + tankInventory.drain(20, IFluidHandler.FluidAction.EXECUTE); + + + + } + if (syncCooldown > 0) { + syncCooldown--; + if (syncCooldown == 0 && queuedSync) + sendData(); + } + + + } + + + + @Override + public void initialize() { + super.initialize(); + sendData(); + if (level.isClientSide) + invalidateRenderBoundingBox(); + } + + + + @Override + public void sendData() { + if (syncCooldown > 0) { + queuedSync = true; + return; + } + super.sendData(); + queuedSync = false; + syncCooldown = SYNC_RATE; + } + + + private void refreshCapability() { + LazyOptional oldCap = fluidCapability; + fluidCapability = LazyOptional.of(() -> handlerForCapability()); + oldCap.invalidate(); + } + + private IFluidHandler handlerForCapability() { + + return tankInventory; + } + + + + + @Override + protected void read(CompoundTag compound, boolean clientPacket) { + super.read(compound, clientPacket); + + tankInventory.setCapacity(500); + tankInventory.readFromNBT(compound.getCompound("TankContent")); + } + + + + + + @Override + public void write(CompoundTag compound, boolean clientPacket) { + + compound.put("TankContent", tankInventory.writeToNBT(new CompoundTag())); + super.write(compound, clientPacket); + + + } + + @Nonnull + @Override + public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction side) { + if (!fluidCapability.isPresent()) + refreshCapability(); + if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) + return fluidCapability.cast(); + return super.getCapability(cap, side); + } + + + + @Override + public void addBehaviours(List behaviours) { + + } + + public IFluidTank getTankInventory() { + return tankInventory; + } + + + + + + +} + diff --git a/src/main/java/com/drmangotea/tfmg/blocks/machines/flarestack/FlarestackBlock.java b/src/main/java/com/drmangotea/tfmg/blocks/machines/flarestack/FlarestackBlock.java new file mode 100644 index 00000000..32d93884 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/blocks/machines/flarestack/FlarestackBlock.java @@ -0,0 +1,77 @@ +package com.drmangotea.tfmg.blocks.machines.flarestack; + + +import com.drmangotea.tfmg.registry.TFMGBlockEntities; +import com.drmangotea.tfmg.registry.TFMGShapes; +import com.simibubi.create.Create; +import com.simibubi.create.content.equipment.wrench.IWrenchable; +import com.simibubi.create.foundation.block.IBE; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; +import java.util.Random; + +public class FlarestackBlock extends Block implements IBE, IWrenchable { + public static final BooleanProperty LIT = BlockStateProperties.LIT; + //Direction facing = this.defaultBlockState().getValue(FACING); + public FlarestackBlock(Properties p_55926_) { + super(p_55926_); + this.registerDefaultState(this.stateDefinition.any().setValue(LIT, Boolean.valueOf(false))); + + } + + + @Override + public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + + return TFMGShapes.FLARESTACK; + } + @Nullable + public BlockState getStateForPlacement(BlockPlaceContext p_51240_) { + + return this.defaultBlockState().setValue(LIT, Boolean.valueOf(false)); + } + + public static void makeParticles(Level level,BlockPos pos) { + Random random = Create.RANDOM; + int shouldSpawnSmoke = random.nextInt(7); + if(shouldSpawnSmoke==0) { + + + + level.addParticle(ParticleTypes.CAMPFIRE_SIGNAL_SMOKE, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 0.0D, 0.08D, 0.0D); + level.addParticle(ParticleTypes.FLAME, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, Create.RANDOM.nextDouble(0.28)-0.14D, 0.14D, Create.RANDOM.nextDouble(0.28)-0.14D); + level.addParticle(ParticleTypes.FLAME, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, Create.RANDOM.nextDouble(0.28)-0.14D, 0.14D, Create.RANDOM.nextDouble(0.28)-0.14D); + level.addParticle(ParticleTypes.FLAME, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, Create.RANDOM.nextDouble(0.28)-0.14D, 0.14D, Create.RANDOM.nextDouble(0.28)-0.14D); + + + + } + + } + protected void createBlockStateDefinition(StateDefinition.Builder p_51305_) { + p_51305_.add(LIT); + } + + @Override + public Class getBlockEntityClass() { + return FlarestackBlockEntity.class; + } + + @Override + public BlockEntityType getBlockEntityType() { + return TFMGBlockEntities.FLARESTACK.get(); + } +} diff --git a/src/main/java/com/drmangotea/tfmg/blocks/machines/flarestack/FlarestackBlockEntity.java b/src/main/java/com/drmangotea/tfmg/blocks/machines/flarestack/FlarestackBlockEntity.java new file mode 100644 index 00000000..c34b6fce --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/blocks/machines/flarestack/FlarestackBlockEntity.java @@ -0,0 +1,280 @@ +package com.drmangotea.tfmg.blocks.machines.flarestack; + + +import com.drmangotea.tfmg.registry.TFMGFluids; +import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation; +import com.simibubi.create.foundation.blockEntity.SmartBlockEntity; +import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; +import com.simibubi.create.foundation.fluid.SmartFluidTank; +import com.simibubi.create.foundation.utility.Lang; +import com.simibubi.create.foundation.utility.LangBuilder; +import net.minecraft.ChatFormatting; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidTank; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.templates.FluidTank; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.List; +import java.util.Optional; + +public class FlarestackBlockEntity extends SmartBlockEntity implements IHaveGoggleInformation { + + + + protected LazyOptional fluidCapability; + public FluidTank tankInventory; + + public boolean spawnsSmoke=false; + public int smokeTimer=0; + + private static final int SYNC_RATE = 8; + protected int syncCooldown; + protected boolean queuedSync; + + + + public FlarestackBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); + tankInventory = createInventory(); + fluidCapability = LazyOptional.of(() -> tankInventory); + + refreshCapability(); + } + + + @Override + @SuppressWarnings("removal") + public boolean addToGoggleTooltip(List tooltip, boolean isPlayerSneaking) { + + LangBuilder mb = Lang.translate("generic.unit.millibuckets"); + + ///////// + LazyOptional handler = this.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY); + Optional resolve = handler.resolve(); + if (!resolve.isPresent()) + return false; + + IFluidHandler tank = resolve.get(); + if (tank.getTanks() == 0) + return false; + + Lang.translate("goggles.pumpjack_fluid_storage") + .style(ChatFormatting.GRAY) + .forGoggles(tooltip); + + + boolean isEmpty = true; + for (int i = 0; i < tank.getTanks(); i++) { + FluidStack fluidStack = tank.getFluidInTank(i); + if (fluidStack.isEmpty()) + continue; + + Lang.fluidName(fluidStack) + .style(ChatFormatting.GRAY) + .forGoggles(tooltip, 1); + + Lang.builder() + .add(Lang.number(fluidStack.getAmount()) + .add(mb) + .style(ChatFormatting.GOLD)) + .text(ChatFormatting.GRAY, " / ") + .add(Lang.number(tank.getTankCapacity(i)) + .add(mb) + .style(ChatFormatting.DARK_GRAY)) + .forGoggles(tooltip, 1); + + isEmpty = false; + } + + if (tank.getTanks() > 1) { + if (isEmpty) + tooltip.remove(tooltip.size() - 1); + return true; + } + + if (!isEmpty) + return true; + + Lang.translate("gui.goggles.fluid_container.capacity") + .add(Lang.number(tank.getTankCapacity(0)) + .add(mb) + .style(ChatFormatting.GOLD)) + .style(ChatFormatting.DARK_GRAY) + .forGoggles(tooltip, 1); + + + return true; + + + + } + + + + + protected SmartFluidTank createInventory() { + return new SmartFluidTank(1000, this::onFluidStackChanged) { + @Override + public boolean isFluidValid(FluidStack stack) { + return + stack.getFluid().isSame(TFMGFluids.BUTANE.getSource())|| + stack.getFluid().isSame(TFMGFluids.PROPANE.getSource())|| + stack.getFluid().isSame(TFMGFluids.LPG.getSource())|| + stack.getFluid().isSame(TFMGFluids.KEROSENE.getSource())|| + stack.getFluid().isSame(TFMGFluids.NAPHTHA.getSource())|| + stack.getFluid().isSame(TFMGFluids.ETHYLENE.getSource())|| + stack.getFluid().isSame(TFMGFluids.PROPYLENE.getSource())|| + stack.getFluid().isSame(TFMGFluids.DIESEL.getSource())|| + stack.getFluid().isSame(TFMGFluids.LUBRICATION_OIL.getSource())|| + stack.getFluid().isSame(TFMGFluids.HEAVY_OIL.getSource())|| + stack.getFluid().isSame(TFMGFluids.GASOLINE.getSource()); + } + }; + } + + protected void onFluidStackChanged(FluidStack newFluidStack) { + sendData(); + } + + @Override + public void tick() { + super.tick(); + + + if(smokeTimer!=0) { + spawnsSmoke = true; + smokeTimer--; + }else { + spawnsSmoke = false; + + } + + if(spawnsSmoke) { + level.setBlock(getBlockPos(), this.getBlockState() + .setValue(FlarestackBlock.LIT, true), 2); + FlarestackBlock.makeParticles(level, this.getBlockPos()); + + } else + { + level.setBlock(getBlockPos(), this.getBlockState() + .setValue(FlarestackBlock.LIT, false), 2); + } + if(tankInventory.getFluidAmount()>0) { + + smokeTimer = 100; + spawnsSmoke = true; + + + tankInventory.drain(30, IFluidHandler.FluidAction.EXECUTE); + + + + } + if (syncCooldown > 0) { + syncCooldown--; + if (syncCooldown == 0 && queuedSync) + sendData(); + } + + + } + + + + @Override + public void initialize() { + super.initialize(); + sendData(); + if (level.isClientSide) + invalidateRenderBoundingBox(); + } + + + + @Override + public void sendData() { + if (syncCooldown > 0) { + queuedSync = true; + return; + } + super.sendData(); + queuedSync = false; + syncCooldown = SYNC_RATE; + } + + + private void refreshCapability() { + LazyOptional oldCap = fluidCapability; + fluidCapability = LazyOptional.of(() -> handlerForCapability()); + oldCap.invalidate(); + } + + private IFluidHandler handlerForCapability() { + + return tankInventory; + } + + + + + @Override + protected void read(CompoundTag compound, boolean clientPacket) { + super.read(compound, clientPacket); + + tankInventory.setCapacity(500); + tankInventory.readFromNBT(compound.getCompound("TankContent")); + } + + + + + + @Override + public void write(CompoundTag compound, boolean clientPacket) { + + compound.put("TankContent", tankInventory.writeToNBT(new CompoundTag())); + super.write(compound, clientPacket); + + + } + + @Nonnull + @Override + @SuppressWarnings("removal") + public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction side) { + if (!fluidCapability.isPresent()) + refreshCapability(); + if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) + return fluidCapability.cast(); + return super.getCapability(cap, side); + } + + + + @Override + public void addBehaviours(List behaviours) { + + } + + public IFluidTank getTankInventory() { + return tankInventory; + } + + + + + + +} + diff --git a/src/main/java/com/drmangotea/tfmg/blocks/machines/metal_processing/casting_spout/CastingSpoutBlockEntity.java b/src/main/java/com/drmangotea/tfmg/blocks/machines/metal_processing/casting_spout/CastingSpoutBlockEntity.java index ac058e4c..79bc7737 100644 --- a/src/main/java/com/drmangotea/tfmg/blocks/machines/metal_processing/casting_spout/CastingSpoutBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/blocks/machines/metal_processing/casting_spout/CastingSpoutBlockEntity.java @@ -12,6 +12,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.CapabilityFluidHandler; @@ -148,5 +149,9 @@ public class CastingSpoutBlockEntity extends TFMGMachineBlockEntity { return true; } + @Override + protected AABB createRenderBoundingBox() { + return new AABB(this.getBlockPos()).inflate(1); + } } diff --git a/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/crank/PumpjackCrankRenderer.java b/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/crank/PumpjackCrankRenderer.java index b6c0c76b..f3fcc7d5 100644 --- a/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/crank/PumpjackCrankRenderer.java +++ b/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/crank/PumpjackCrankRenderer.java @@ -18,6 +18,8 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.BlockState; +import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING; + public class PumpjackCrankRenderer extends KineticBlockEntityRenderer { public PumpjackCrankRenderer(BlockEntityRendererProvider.Context context) { @@ -33,8 +35,8 @@ public class PumpjackCrankRenderer extends KineticBlockEntityRenderer { - if (Backend.canUseInstancing(te.getLevel())) - return; + // if (Backend.canUseInstancing(te.getLevel())) + // return; BlockState blockState = te.getBlockState(); PumpjackCrankBlockEntity wte = (PumpjackCrankBlockEntity) te; @@ -59,10 +61,10 @@ public class PumpjackCrankRenderer extends KineticBlockEntityRenderer { //kineticRotationTransform(hammer, te, getRotationAxisOf(te), AngleHelper.rad(angle), light); hammer.renderInto(ms, vb); } - private void renderBlock(PumpjackCrankBlockEntity te, PoseStack ms, int light, + private void renderBlock(PumpjackCrankBlockEntity be, PoseStack ms, int light, MultiBufferSource buffer) { - BlockState blockState = te.getBlockState(); + BlockState blockState = be.getBlockState(); VertexConsumer vb = buffer.getBuffer(RenderType.solid()); ms.pushPose(); TransformStack msr = TransformStack.cast(ms); @@ -70,95 +72,111 @@ public class PumpjackCrankRenderer extends KineticBlockEntityRenderer { float dialPivot = 5.75f / 16; + SuperByteBuffer crank = CachedBufferer.partialFacing(TFMGPartialModels.PUMPJACK_CRANK, blockState,blockState.getValue(FACING)); - if (te.direction == Direction.NORTH){ + + + crank + .translate(-0.5, -0.75, -0.5) + .centre() + .rotate(be.direction.getCounterClockWise(), -AngleHelper.rad(be.angle)) + .unCentre() + + .light(light) + .translateY(0.5); + + crank.renderInto(ms,vb); + + + + if (be.direction == Direction.NORTH){ CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CRANK_BLOCK, blockState) // .rotateY(d.toYRot()) .unCentre() .light(light) .renderInto(ms, vb); - if(te.isValid()) { + if(be.isValid()) { CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState) .translate(-0.5, -0.75, -0.5) .centre() - .rotate(Direction.WEST, -AngleHelper.rad(te.angle)) + .rotate(Direction.WEST, -AngleHelper.rad(be.angle)) .unCentre() .translateY(0.4) .centre() - .rotate(Direction.WEST, AngleHelper.rad(te.angle)) + .rotate(Direction.WEST, AngleHelper.rad(be.angle)) .unCentre() .light(light) .translateY(0.4) .renderInto(ms, vb); } } - if(te.direction == Direction.EAST) { + if(be.direction == Direction.EAST) { CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CRANK_BLOCK, blockState) .rotateY(270) .unCentre() .light(light) .renderInto(ms, vb); - if(te.isValid()) { + if(be.isValid()) { CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState) .rotateY(270) .translate(-0.5, -0.75, -0.5) .centre() - .rotate(Direction.WEST, -AngleHelper.rad(te.angle)) + .rotate(Direction.WEST, -AngleHelper.rad(be.angle)) .unCentre() .translateY(0.4) .centre() - .rotate(Direction.WEST, AngleHelper.rad(te.angle)) + .rotate(Direction.WEST, AngleHelper.rad(be.angle)) .unCentre() .light(light) .translateY(0.4) .renderInto(ms, vb); } } - if(te.direction == Direction.SOUTH) { + if(be.direction == Direction.SOUTH) { CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CRANK_BLOCK, blockState) .rotateY(180) .unCentre() .light(light) .renderInto(ms, vb); - if(te.isValid()) { + if(be.isValid()) { CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState) .rotateY(180) .translate(-0.5, -0.75, -0.5) .centre() - .rotate(Direction.WEST, -AngleHelper.rad(te.angle)) + .rotate(Direction.WEST, -AngleHelper.rad(be.angle)) .unCentre() .translateY(0.4) .centre() - .rotate(Direction.WEST, AngleHelper.rad(te.angle)) + .rotate(Direction.WEST, AngleHelper.rad(be.angle)) .unCentre() .light(light) .translateY(0.4) .renderInto(ms, vb); } } - if(te.direction == Direction.WEST) { + if(be.direction == Direction.WEST) { CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CRANK_BLOCK, blockState) .rotateY(90) .unCentre() .light(light) .renderInto(ms, vb); - if(te.isValid()) { + if(be.isValid()) { CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState) .rotateY(90) .translate(-0.5, -0.75, -0.5) .centre() - .rotate(Direction.WEST, -AngleHelper.rad(te.angle)) + .rotate(Direction.WEST, -AngleHelper.rad(be.angle)) .unCentre() .translateY(0.4) .centre() - .rotate(Direction.WEST, AngleHelper.rad(te.angle)) + .rotate(Direction.WEST, AngleHelper.rad(be.angle)) .unCentre() .light(light) .translateY(0.4) diff --git a/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/hammer_holder/PumpjackHammerHolderBlockEntity.java b/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/hammer_holder/PumpjackHammerHolderBlockEntity.java index 1bdb8c34..3d54951d 100644 --- a/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/hammer_holder/PumpjackHammerHolderBlockEntity.java +++ b/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/hammer_holder/PumpjackHammerHolderBlockEntity.java @@ -13,6 +13,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.world.level.block.HorizontalDirectionalBlock; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import java.util.List; @@ -36,6 +37,11 @@ public class PumpjackHammerHolderBlockEntity extends KineticBlockEntity implemen } + @Override + protected AABB createRenderBoundingBox() { + return new AABB(this.getBlockPos()).inflate(2); + } + @Override public void addBehaviours(List behaviours) { diff --git a/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/hammer_holder/PumpjackHammerHolderRenderer.java b/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/hammer_holder/PumpjackHammerHolderRenderer.java index c52f4b20..cb603364 100644 --- a/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/hammer_holder/PumpjackHammerHolderRenderer.java +++ b/src/main/java/com/drmangotea/tfmg/blocks/machines/oil_processing/pumpjack/hammer_holder/PumpjackHammerHolderRenderer.java @@ -12,8 +12,11 @@ import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.BlockState; +import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING; + public class PumpjackHammerHolderRenderer extends KineticBlockEntityRenderer { protected float lastAngle = Float.NaN; @@ -38,8 +41,8 @@ public class PumpjackHammerHolderRenderer extends KineticBlockEntityRenderer { } + public static int getOutputCount(CastingRecipe recipe){ + return recipe.results.toArray().length; + } + + @Override public boolean matches(RecipeWrapper pContainer, Level pLevel) { return false; diff --git a/src/main/java/com/drmangotea/tfmg/recipes/jei/CastingCategory.java b/src/main/java/com/drmangotea/tfmg/recipes/jei/CastingCategory.java new file mode 100644 index 00000000..4a26c7d2 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/recipes/jei/CastingCategory.java @@ -0,0 +1,88 @@ +package com.drmangotea.tfmg.recipes.jei; + + + + +import com.drmangotea.tfmg.recipes.casting.CastingRecipe; +import com.drmangotea.tfmg.recipes.jei.machines.CastingSetup; +import com.drmangotea.tfmg.registry.TFMGItems; +import com.mojang.blaze3d.vertex.PoseStack; +import com.simibubi.create.compat.jei.category.CreateRecipeCategory; +import com.simibubi.create.foundation.gui.AllGuiTextures; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; +import mezz.jei.api.gui.ingredient.IRecipeSlotsView; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; +import net.minecraft.world.item.ItemStack; + +import javax.annotation.ParametersAreNonnullByDefault; + +@ParametersAreNonnullByDefault +public class CastingCategory extends CreateRecipeCategory { + + private final CastingSetup castingSetup = new CastingSetup(); + + public CastingCategory(Info info) { + super(info); + } + + + + + @Override + public void setRecipe(IRecipeLayoutBuilder builder, CastingRecipe recipe, IFocusGroup focuses) { + + + int y = 77; + for(int i = 0;i PUMPJACK_CRANK = REGISTRATE .blockEntity("pumpjack_crank", PumpjackCrankBlockEntity::new) - .instance(() -> PumpjackCrankInstance::new, true) + //.instance(() -> PumpjackCrankInstance::new, true) .validBlocks(TFMGBlocks.PUMPJACK_CRANK) .renderer(() -> PumpjackCrankRenderer::new) .register(); @@ -258,6 +260,16 @@ public class TFMGBlockEntities { .validBlocks(TFMGBlocks.TURBINE_ENGINE_BACK) .register(); + public static final BlockEntityEntry EXHAUST = REGISTRATE + .blockEntity("exhaust", ExhaustTileEntity::new) + .validBlocks(TFMGBlocks.EXHAUST) + .register(); + + public static final BlockEntityEntry FLARESTACK = REGISTRATE + .blockEntity("flarestack", FlarestackBlockEntity::new) + .validBlocks(TFMGBlocks.FLARESTACK) + .register(); + diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java index 5c8595d4..fb564ef5 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java @@ -17,6 +17,8 @@ import com.drmangotea.tfmg.blocks.engines.small.lpg.LPGEngineBackBlock; import com.drmangotea.tfmg.blocks.engines.small.lpg.LPGEngineBlock; import com.drmangotea.tfmg.blocks.engines.small.turbine.TurbineEngineBackBlock; import com.drmangotea.tfmg.blocks.engines.small.turbine.TurbineEngineBlock; +import com.drmangotea.tfmg.blocks.machines.exhaust.ExhaustBlock; +import com.drmangotea.tfmg.blocks.machines.flarestack.FlarestackBlock; import com.drmangotea.tfmg.items.gadgets.explosives.napalm.NapalmBombBlock; import com.drmangotea.tfmg.blocks.machines.metal_processing.casting_basin.CastingBasinBlock; import com.drmangotea.tfmg.blocks.machines.metal_processing.casting_spout.CastingSpoutBlock; @@ -47,7 +49,6 @@ import com.drmangotea.tfmg.blocks.tanks.SteelTankBlock; import com.drmangotea.tfmg.blocks.tanks.SteelTankGenerator; import com.drmangotea.tfmg.blocks.tanks.SteelTankItem; import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllItems; import com.simibubi.create.AllSpriteShifts; import com.simibubi.create.AllTags; import com.simibubi.create.content.decoration.encasing.CasingBlock; @@ -151,6 +152,28 @@ public class TFMGBlocks { .build() .register(); + + public static final BlockEntry EXHAUST = + REGISTRATE.block("exhaust", ExhaustBlock::new) + .initialProperties(SharedProperties::copperMetal) + .blockstate((c, p) -> p.horizontalFaceBlock(c.get(), AssetLookup.partialBaseModel(c, p))) + .item() + .transform(customItemModel()) + .register(); + + + public static final BlockEntry FLARESTACK = + REGISTRATE.block("flarestack", FlarestackBlock::new) + .initialProperties(SharedProperties::copperMetal) + .properties(p -> p.color(MaterialColor.TERRACOTTA_CYAN) + .lightLevel(s -> s.getValue(FlarestackBlock.LIT) ? 15 : 0) + .noOcclusion()) + .item() + .transform(customItemModel()) + .register(); + + + public static final BlockEntry SURFACE_SCANNER = REGISTRATE.block("surface_scanner", SurfaceScannerBlock::new) // .properties(p -> p.color(MaterialColor.COLOR_GRAY)) @@ -680,7 +703,7 @@ public static final BlockEntry STEEL_DISTILLATION_OUTPU // .register(); - public static final BlockEntry CONCRETE_TEST = generateConcrete(); + public static final BlockEntry CONCRETE = generateConcrete(); public static BlockEntry generateConcrete(){ @@ -750,7 +773,7 @@ public static final BlockEntry STEEL_DISTILLATION_OUTPU .lang(upperCaseColor + " Concrete Wall") .register(); - REGISTRATE.block(color + "_concrete_stairs", p -> new StairBlock(()-> TFMGBlocks.CONCRETE_TEST.get().defaultBlockState(),p)) + REGISTRATE.block(color + "_concrete_stairs", p -> new StairBlock(()-> TFMGBlocks.CONCRETE.get().defaultBlockState(),p)) .initialProperties(() -> Blocks.STONE) .properties(p -> p.color(MaterialColor.COLOR_LIGHT_GRAY)) .properties(p -> p.requiresCorrectToolForDrops()) diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGPartialModels.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGPartialModels.java index 587b9c07..2bea7993 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGPartialModels.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGPartialModels.java @@ -36,6 +36,7 @@ public class TFMGPartialModels { PUMPJACK_FRONT_ROPE = block("pumpjack/pumpjack_front_rope"), PUMPJACK_CONNECTOR = block("pumpjack/pumpjack_connector"), PUMPJACK_CRANK_BLOCK = block("pumpjack/pumpjack_crank_block"), + PUMPJACK_CRANK = block("pumpjack/pumpjack_crank"), TOWER_GAUGE = block("distillation_tower/gauge"), STEEL_FLUID_PIPE_CASING = block("steel_pipe/casing"), SURFACE_SCANNER_DIAL = block("surface_scanner/dial"), diff --git a/src/main/java/com/drmangotea/tfmg/worldgen/TFMGLayeredPatterns.java b/src/main/java/com/drmangotea/tfmg/worldgen/TFMGLayeredPatterns.java index d5c89ef3..0c3f63ec 100644 --- a/src/main/java/com/drmangotea/tfmg/worldgen/TFMGLayeredPatterns.java +++ b/src/main/java/com/drmangotea/tfmg/worldgen/TFMGLayeredPatterns.java @@ -2,7 +2,6 @@ package com.drmangotea.tfmg.worldgen; import com.drmangotea.tfmg.registry.TFMGBlocks; -import com.drmangotea.tfmg.registry.TFMGPaletteBlocks; import com.drmangotea.tfmg.registry.TFMGPaletteStoneTypes; import com.simibubi.create.content.decoration.palettes.AllPaletteStoneTypes; import com.simibubi.create.infrastructure.worldgen.LayerPattern; @@ -35,7 +34,7 @@ public class TFMGLayeredPatterns { .layer(l -> l.weight(1) .passiveBlock()) .layer(l -> l.weight(2) - .block(TFMGBlocks.CONCRETE_TEST.get()) + .block(TFMGBlocks.CONCRETE.get()) .size(1, 3)) .layer(l -> l.weight(1) .block(Blocks.SMOOTH_BASALT) @@ -53,7 +52,7 @@ public class TFMGLayeredPatterns { .layer(l -> l.weight(1) .passiveBlock()) .layer(l -> l.weight(2) - .block(TFMGBlocks.CONCRETE_TEST.get()) + .block(TFMGBlocks.CONCRETE.get()) .size(1, 3)) .layer(l -> l.weight(1) .block(Blocks.TUFF) @@ -73,7 +72,7 @@ public class TFMGLayeredPatterns { .layer(l -> l.weight(2) .passiveBlock()) .layer(l -> l.weight(2) - .block(TFMGBlocks.CONCRETE_TEST.get()) + .block(TFMGBlocks.CONCRETE.get()) .size(1, 2)) .layer(l -> l.weight(3) .block(AllPaletteStoneTypes.SCORCHIA.getBaseBlock())