distillation tower jei interface
@@ -0,0 +1,18 @@
|
||||
package com.drmangotea.tfmg.base;
|
||||
|
||||
import com.drmangotea.tfmg.CreateTFMG;
|
||||
import com.tterrag.registrate.providers.DataGenContext;
|
||||
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.WallBlock;
|
||||
|
||||
public class TFMGVanillaBlockStates {
|
||||
|
||||
public static void generateWallBlockState(DataGenContext<Block, WallBlock> ctx, RegistrateBlockstateProvider prov,
|
||||
String name) {
|
||||
prov.wallBlock(ctx.get(), name, CreateTFMG.asResource("block/"+name));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -47,7 +47,7 @@ public abstract class TFMGPaletteBlockPartial<B extends Block> {
|
||||
|
||||
private String name;
|
||||
|
||||
private TFMGPaletteBlockPartial(String name) {
|
||||
protected TFMGPaletteBlockPartial(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ public abstract class TFMGPaletteBlockPartial<B extends Block> {
|
||||
|
||||
}
|
||||
|
||||
private static class Wall extends TFMGPaletteBlockPartial<WallBlock> {
|
||||
public static class Wall extends TFMGPaletteBlockPartial<WallBlock> {
|
||||
|
||||
public Wall() {
|
||||
super("wall");
|
||||
|
||||
@@ -201,7 +201,7 @@ public class TFMGPaletteBlockPattern {
|
||||
|
||||
// Utility
|
||||
|
||||
protected String createName(String variant) {
|
||||
public String createName(String variant) {
|
||||
if (nameType == WRAP) {
|
||||
String[] split = id.split("_");
|
||||
if (split.length == 2) {
|
||||
|
||||
@@ -192,7 +192,7 @@ public class DistillationControllerBlockEntity extends DistilleryControllerBlock
|
||||
for(int i = 0; i <5;i++){
|
||||
if(
|
||||
level.getBlockState(checkedPos).is(TFMGBlocks.STEEL_DISTILLATION_OUTPUT.get())&&
|
||||
level.getBlockState(checkedPos.below()).is(TFMGBlocks.ALUMINUM_BLOCK.get())
|
||||
level.getBlockState(checkedPos.below()).is(TFMGBlocks.INDUSTRIAL_PIPE.get())
|
||||
){
|
||||
outputCount++;
|
||||
checkedPos = checkedPos.above(2);
|
||||
|
||||
@@ -380,7 +380,7 @@ if(!(((AdvancedDistillationRecipe) currentRecipe).getThirdItemResult().isEmpty()
|
||||
|
||||
for(int i = 0;i<(outputAmount-1);i++){
|
||||
checkedBlock = level.getBlockState(checkedPos).getBlock();
|
||||
if(checkedBlock == TFMGBlocks.ALUMINUM_BLOCK.get()){
|
||||
if(checkedBlock == TFMGBlocks.INDUSTRIAL_PIPE.get()){
|
||||
checkedPos=checkedPos.above(2);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.base;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.tfmg.registry.TFMGShapes;
|
||||
import com.simibubi.create.content.equipment.wrench.IWrenchable;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
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.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.Mirror;
|
||||
import net.minecraft.world.level.block.Rotation;
|
||||
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.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class PumpjackBaseBlock extends HorizontalDirectionalBlock implements IWrenchable, IBE<PumpjackBaseBlockEntity> {
|
||||
|
||||
|
||||
|
||||
|
||||
public PumpjackBaseBlock(Properties p_i48440_1_) {
|
||||
super(p_i48440_1_);
|
||||
|
||||
}
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter worldIn, BlockPos pos, CollisionContext context) {
|
||||
|
||||
return TFMGShapes.PUMPJACK_BASE;
|
||||
}
|
||||
public BlockState rotate(BlockState p_54540_, Rotation p_54541_) {
|
||||
return p_54540_.setValue(FACING, p_54541_.rotate(p_54540_.getValue(FACING)));
|
||||
}
|
||||
|
||||
public BlockState mirror(BlockState p_54537_, Mirror p_54538_) {
|
||||
return p_54537_.rotate(p_54538_.getRotation(p_54537_.getValue(FACING)));
|
||||
}
|
||||
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_54543_) {
|
||||
p_54543_.add(FACING);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
|
||||
|
||||
world.removeBlockEntity(pos);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Class<PumpjackBaseBlockEntity> getBlockEntityClass() {
|
||||
return PumpjackBaseBlockEntity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends PumpjackBaseBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.PUMPJACK_BASE.get();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,374 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.base;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.content.deposits.FluidDepositBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank.PumpjackCrankBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input.MachineInputBlockEntity;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlocks;
|
||||
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 static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
|
||||
|
||||
public class PumpjackBaseBlockEntity extends SmartBlockEntity implements IHaveGoggleInformation {
|
||||
|
||||
public BlockPos crankPos = this.getBlockPos();
|
||||
|
||||
protected LazyOptional<IFluidHandler> fluidCapability;
|
||||
public FluidTank tankInventory;
|
||||
public FluidDepositBlockEntity deposit;
|
||||
public Direction direction = this.getBlockState().getValue(FACING).getOpposite();
|
||||
int debugCounter = 0;
|
||||
public int miningRate = 0;
|
||||
int depositCheckTimer = 0;
|
||||
|
||||
private static final int SYNC_RATE = 8;
|
||||
protected int syncCooldown;
|
||||
protected boolean queuedSync;
|
||||
|
||||
|
||||
public PumpjackBaseBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
tankInventory = createInventory();
|
||||
fluidCapability = LazyOptional.of(() -> tankInventory);
|
||||
|
||||
refreshCapability();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
Lang.translate("goggles.pumpjack_info")
|
||||
.forGoggles(tooltip);
|
||||
if (!isComplete()) {
|
||||
Lang.translate("goggles.pumpjack.part_missing")
|
||||
.style(ChatFormatting.DARK_RED)
|
||||
.forGoggles(tooltip);
|
||||
if(isWronglyRotated()){
|
||||
Lang.translate("goggles.pumpjack.wrong_rotation1")
|
||||
.style(ChatFormatting.GOLD)
|
||||
.forGoggles(tooltip);
|
||||
Lang.translate("goggles.pumpjack.wrong_rotation2")
|
||||
.style(ChatFormatting.GOLD)
|
||||
.forGoggles(tooltip);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
LangBuilder mb = Lang.translate("generic.unit.millibuckets");
|
||||
|
||||
|
||||
Lang.translate("goggles.pumpjack.deposit_info")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip);
|
||||
|
||||
|
||||
if (!(deposit == null || deposit.fluidAmount == 0)) {
|
||||
Lang.translate("goggles.pumpjack.fluid_amount")
|
||||
.style(ChatFormatting.DARK_GRAY)
|
||||
.add(
|
||||
Lang.translate("pumpjack_deposit_amount", this.deposit.baseFluidAmount)
|
||||
.style(ChatFormatting.BLUE)
|
||||
// .add(mb))
|
||||
).forGoggles(tooltip, 1);
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
Lang.translate("goggles.zero")
|
||||
.style(ChatFormatting.DARK_RED)
|
||||
.forGoggles(tooltip, 1);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void process() {
|
||||
if (deposit == null || deposit.fluidAmount == 0)
|
||||
return;
|
||||
|
||||
if (tankInventory.getFluidAmount() + miningRate > 1000)
|
||||
return;
|
||||
|
||||
deposit.fluidAmount -= miningRate;
|
||||
tankInventory.setFluid(new FluidStack(deposit.getDepositFluid(), tankInventory.getFluidAmount() + miningRate));
|
||||
}
|
||||
|
||||
public boolean hasPipe() {
|
||||
|
||||
for (int i = -62; i != getBlockPos().getY(); i++) {
|
||||
BlockPos pos = new BlockPos(getBlockPos().getX(), i, getBlockPos().getZ());
|
||||
if (!(level.getBlockState(pos).is(TFMGBlocks.INDUSTRIAL_PIPE.get())))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public void findDeposit() {
|
||||
for (int i = 0; i < this.getBlockPos().getY() + 64; i++) {
|
||||
debugCounter = this.getBlockPos().getY() - i;
|
||||
BlockPos checkedPos = new BlockPos(this.getBlockPos().getX(), (this.getBlockPos().getY() - 1) - i, this.getBlockPos().getZ());
|
||||
|
||||
if (level.getBlockState(new BlockPos(checkedPos)).is(TFMGBlocks.OIL_DEPOSIT.get())) {
|
||||
deposit = (FluidDepositBlockEntity) level.getBlockEntity(checkedPos);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(level.getBlockState(new BlockPos(checkedPos)).is(TFMGBlocks.INDUSTRIAL_PIPE.get()))) {
|
||||
deposit = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
debugCounter = 0;
|
||||
deposit = null;
|
||||
return;
|
||||
|
||||
/*
|
||||
if(!hasPipe()) {
|
||||
deposit = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if(level.getBlockEntity(new BlockPos(getBlockPos().getX(),-63,getBlockPos().getZ())) instanceof FluidDepositTileEntity) {
|
||||
deposit = (FluidDepositTileEntity) (level.getBlockEntity(new BlockPos(getBlockPos().getX(),-64,getBlockPos().getZ())));
|
||||
}else {
|
||||
deposit=null;
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
protected SmartFluidTank createInventory() {
|
||||
return new SmartFluidTank(1000, this::onFluidStackChanged) {
|
||||
@Override
|
||||
public boolean isFluidValid(FluidStack stack) {
|
||||
return stack.getFluid().isSame(TFMGFluids.CRUDE_OIL.getSource());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
protected void onFluidStackChanged(FluidStack newFluidStack) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (!isComplete())
|
||||
return;
|
||||
|
||||
|
||||
MachineInputBlockEntity input = null;
|
||||
if (level.getBlockEntity(crankPos.below()) instanceof MachineInputBlockEntity)
|
||||
input = (MachineInputBlockEntity) level.getBlockEntity(crankPos.below());
|
||||
if (input == null)
|
||||
return;
|
||||
miningRate = input.powerLevel * 12;
|
||||
|
||||
|
||||
depositCheckTimer++;
|
||||
if (depositCheckTimer > 50) {
|
||||
depositCheckTimer = 0;
|
||||
findDeposit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
direction = this.getBlockState().getValue(FACING).getOpposite();
|
||||
|
||||
process();
|
||||
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<IFluidHandler> 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(1000);
|
||||
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 <T> LazyOptional<T> getCapability(@Nonnull Capability<T> 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<BlockEntityBehaviour> behaviours) {
|
||||
|
||||
}
|
||||
|
||||
public IFluidTank getTankInventory() {
|
||||
return tankInventory;
|
||||
}
|
||||
|
||||
public boolean isComplete() {
|
||||
BlockPos hammerPos = this.getBlockPos();
|
||||
crankPos = this.getBlockPos();
|
||||
if (direction == Direction.WEST) {
|
||||
hammerPos = new BlockPos(this.getBlockPos().west(2).above(2));
|
||||
crankPos = new BlockPos(this.getBlockPos().west(4).above(1));
|
||||
}
|
||||
if (direction == Direction.EAST) {
|
||||
hammerPos = new BlockPos(this.getBlockPos().east(2).above(2));
|
||||
crankPos = new BlockPos(this.getBlockPos().east(4).above(1));
|
||||
}
|
||||
if (direction == Direction.NORTH) {
|
||||
hammerPos = new BlockPos(this.getBlockPos().north(2).above(2));
|
||||
crankPos = new BlockPos(this.getBlockPos().north(4).above(1));
|
||||
}
|
||||
if (direction == Direction.SOUTH) {
|
||||
hammerPos = new BlockPos(this.getBlockPos().south(2).above(2));
|
||||
crankPos = new BlockPos(this.getBlockPos().south(4).above(1));
|
||||
}
|
||||
|
||||
|
||||
if (!(level.getBlockEntity(hammerPos) instanceof PumpjackHammerHolderBlockEntity &&
|
||||
level.getBlockEntity(crankPos) instanceof PumpjackCrankBlockEntity)) {
|
||||
return false;
|
||||
}
|
||||
//MachineInputTileEntity input = (MachineInputTileEntity) level.getBlockEntity(crankPos.below());
|
||||
// if(input.powerLevel==0)
|
||||
// return false;
|
||||
|
||||
|
||||
if (level.getBlockEntity(hammerPos).getBlockState().getValue(FACING).getOpposite() == direction
|
||||
&& level.getBlockEntity(crankPos).getBlockState().getValue(FACING).getOpposite() == direction
|
||||
)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public boolean isWronglyRotated() {
|
||||
if (isComplete())
|
||||
return false;
|
||||
|
||||
|
||||
BlockPos hammerPos1 = this.getBlockPos();
|
||||
BlockPos hammerPos2 = this.getBlockPos();
|
||||
BlockPos hammerPos3 = this.getBlockPos();
|
||||
crankPos = this.getBlockPos();
|
||||
if (direction == Direction.WEST) {
|
||||
hammerPos1 = new BlockPos(this.getBlockPos().east(2).above(2));
|
||||
hammerPos2 = new BlockPos(this.getBlockPos().north(2).above(2));
|
||||
hammerPos3 = new BlockPos(this.getBlockPos().south(2).above(2));
|
||||
}
|
||||
if (direction == Direction.EAST) {
|
||||
hammerPos1 = new BlockPos(this.getBlockPos().west(2).above(2));
|
||||
hammerPos2 = new BlockPos(this.getBlockPos().north(2).above(2));
|
||||
hammerPos3 = new BlockPos(this.getBlockPos().south(2).above(2));
|
||||
}
|
||||
if (direction == Direction.NORTH) {
|
||||
hammerPos1 = new BlockPos(this.getBlockPos().south(2).above(2));
|
||||
hammerPos2 = new BlockPos(this.getBlockPos().west(2).above(2));
|
||||
hammerPos3 = new BlockPos(this.getBlockPos().east(2).above(2));
|
||||
}
|
||||
if (direction == Direction.SOUTH) {
|
||||
hammerPos1 = new BlockPos(this.getBlockPos().north(2).above(2));
|
||||
hammerPos2 = new BlockPos(this.getBlockPos().east(2).above(2));
|
||||
hammerPos3 = new BlockPos(this.getBlockPos().west(2).above(2));
|
||||
}
|
||||
|
||||
|
||||
BlockState hammer1 = level.getBlockState(hammerPos1);
|
||||
BlockState hammer2 = level.getBlockState(hammerPos2);
|
||||
BlockState hammer3 = level.getBlockState(hammerPos3);
|
||||
|
||||
|
||||
return hammer1.is(TFMGBlocks.PUMPJACK_HAMMER_HOLDER.get())||
|
||||
hammer2.is(TFMGBlocks.PUMPJACK_HAMMER_HOLDER.get())||
|
||||
hammer3.is(TFMGBlocks.PUMPJACK_HAMMER_HOLDER.get());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.base;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGPartialModels;
|
||||
import com.jozufozu.flywheel.util.transform.TransformStack;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class PumpjackBaseRenderer extends SafeBlockEntityRenderer<PumpjackBaseBlockEntity> {
|
||||
|
||||
public PumpjackBaseRenderer(BlockEntityRendererProvider.Context context) {}
|
||||
|
||||
@Override
|
||||
protected void renderSafe(PumpjackBaseBlockEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer,
|
||||
int light, int overlay) {
|
||||
BlockState blockState = te.getBlockState();
|
||||
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
|
||||
ms.pushPose();
|
||||
TransformStack msr = TransformStack.cast(ms);
|
||||
msr.translate(1 / 2f, 0.5, 1 / 2f);
|
||||
float dialPivot = 5.75f / 16;
|
||||
if(te.isComplete()) {
|
||||
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_FRONT_ROPE, blockState)
|
||||
// .rotateY(d.toYRot())
|
||||
.unCentre()
|
||||
.translateY(1)
|
||||
.light(light)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
|
||||
|
||||
|
||||
ms.popPose();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldRenderOffScreen(PumpjackBaseBlockEntity te) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
|
||||
import com.drmangotea.tfmg.registry.TFMGShapes;
|
||||
import com.simibubi.create.content.equipment.wrench.IWrenchable;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.RenderShape;
|
||||
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.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
||||
public class PumpjackCrankBlock extends HorizontalDirectionalBlock implements IBE<PumpjackCrankBlockEntity>, IWrenchable {
|
||||
public PumpjackCrankBlock(Properties p_54120_) {
|
||||
super(p_54120_);
|
||||
}
|
||||
|
||||
public BlockState getStateForPlacement(BlockPlaceContext p_54779_) {
|
||||
return this.defaultBlockState().setValue(FACING, p_54779_.getHorizontalDirection());
|
||||
}
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter p_220053_2_, BlockPos p_220053_3_,
|
||||
CollisionContext p_220053_4_) {
|
||||
return TFMGShapes.PUMPJACK_CRANK;
|
||||
}
|
||||
@Override
|
||||
public Class<PumpjackCrankBlockEntity> getBlockEntityClass() {
|
||||
return PumpjackCrankBlockEntity.class;
|
||||
}
|
||||
@Override
|
||||
public RenderShape getRenderShape(BlockState pState) {
|
||||
return RenderShape.ENTITYBLOCK_ANIMATED;
|
||||
}
|
||||
@Override
|
||||
public BlockEntityType<? extends PumpjackCrankBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.PUMPJACK_CRANK.get();
|
||||
}
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_54794_) {
|
||||
p_54794_.add(FACING);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input.MachineInputBlockEntity;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
|
||||
|
||||
public class PumpjackCrankBlockEntity extends KineticBlockEntity {
|
||||
float targetSpeed;
|
||||
|
||||
|
||||
public float angle=0;
|
||||
public Direction direction;
|
||||
public BlockPos hammerPos;
|
||||
|
||||
|
||||
public PumpjackCrankBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
angle=177;
|
||||
if(direction==Direction.NORTH)
|
||||
hammerPos =this.getBlockPos().north(2).above();
|
||||
if(direction==Direction.SOUTH)
|
||||
hammerPos =this.getBlockPos().south(2).above();
|
||||
if(direction==Direction.WEST)
|
||||
hammerPos =this.getBlockPos().west(2).above();
|
||||
if(direction==Direction.EAST)
|
||||
hammerPos =this.getBlockPos().east(2).above();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void write(CompoundTag compound, boolean clientPacket) {
|
||||
super.write(compound, clientPacket);
|
||||
if (clientPacket) {
|
||||
compound.putFloat("Angle", angle);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
super.read(compound, clientPacket);
|
||||
if (clientPacket) {
|
||||
|
||||
angle = compound.getFloat("Angle");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
|
||||
|
||||
direction = this.getBlockState().getValue(FACING);
|
||||
|
||||
if (!level.isClientSide)
|
||||
return;
|
||||
|
||||
|
||||
if(direction==Direction.NORTH)
|
||||
hammerPos =this.getBlockPos().north(2).above();
|
||||
if(direction==Direction.SOUTH)
|
||||
hammerPos =this.getBlockPos().south(2).above();
|
||||
if(direction==Direction.WEST)
|
||||
hammerPos =this.getBlockPos().west(2).above();
|
||||
if(direction==Direction.EAST)
|
||||
hammerPos =this.getBlockPos().east(2).above();
|
||||
|
||||
|
||||
if(!isValid()) {
|
||||
angle = 177;
|
||||
return;
|
||||
}
|
||||
|
||||
if(level.getBlockEntity(this.getBlockPos().below())instanceof MachineInputBlockEntity) {
|
||||
if(((MachineInputBlockEntity)level.getBlockEntity(this.getBlockPos().below())).powerLevel!=0) {
|
||||
angle += 3;
|
||||
}else angle=177;
|
||||
}else
|
||||
angle=177;
|
||||
|
||||
|
||||
|
||||
targetSpeed= 10;
|
||||
|
||||
|
||||
|
||||
angle%=360;
|
||||
|
||||
}
|
||||
|
||||
public boolean isValid(){
|
||||
if(hammerPos==null)
|
||||
return false;
|
||||
|
||||
if(!(level.getBlockEntity(hammerPos) instanceof PumpjackHammerHolderBlockEntity))
|
||||
return false;
|
||||
if(!(direction==level.getBlockEntity(hammerPos).getBlockState().getValue(FACING)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
private void moveConnectionPos() {
|
||||
connectionPos = new BlockPos(this.getBlockPos().getX()+0.5f,this.getBlockPos().getY()+0.25f,this.getBlockPos().getZ()+0.5f);
|
||||
|
||||
float y=0.8f;
|
||||
float x=0.8f;
|
||||
// connectionPos.
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank;
|
||||
|
||||
|
||||
import com.jozufozu.flywheel.api.MaterialManager;
|
||||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
||||
import com.jozufozu.flywheel.util.transform.TransformStack;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntityInstance;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import net.minecraft.core.Direction;
|
||||
|
||||
|
||||
public class PumpjackCrankInstance extends KineticBlockEntityInstance<PumpjackCrankBlockEntity> implements DynamicInstance {
|
||||
|
||||
|
||||
protected final ModelData hammer;
|
||||
protected float lastAngle = Float.NaN;
|
||||
static float originOffset = 1 / 16f;
|
||||
|
||||
public PumpjackCrankInstance(MaterialManager modelManager, PumpjackCrankBlockEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
|
||||
hammer = getTransformMaterial().getModel(blockState)
|
||||
.createInstance();
|
||||
|
||||
animate(tile.angle);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beginFrame() {
|
||||
|
||||
|
||||
|
||||
float angle = blockEntity.angle;
|
||||
|
||||
|
||||
animate(angle);
|
||||
|
||||
lastAngle = angle;
|
||||
}
|
||||
|
||||
private void animate(float angle) {
|
||||
PoseStack ms = new PoseStack();
|
||||
TransformStack msr = TransformStack.cast(ms);
|
||||
|
||||
msr.translate(getInstancePosition());
|
||||
|
||||
|
||||
|
||||
// msr.centre()
|
||||
// .rotateCentered(Direction.EAST, AngleHelper.rad(angle))
|
||||
// .unCentre();
|
||||
if(blockEntity.direction==Direction.EAST) {
|
||||
msr.translateY(-0.5);
|
||||
msr
|
||||
.centre()
|
||||
.translate(0, .25, 0)
|
||||
.rotate(Direction.SOUTH, AngleHelper.rad(angle))
|
||||
.translateBack(0, -.25, 0)
|
||||
.unCentre();
|
||||
}
|
||||
if(blockEntity.direction==Direction.WEST) {
|
||||
msr.translateY(-0.5);
|
||||
msr
|
||||
.centre()
|
||||
.translate(0, .25, 0)
|
||||
.rotate(Direction.NORTH, AngleHelper.rad(angle))
|
||||
.translateBack(0, -.25, 0)
|
||||
.unCentre();
|
||||
}
|
||||
if(blockEntity.direction==Direction.NORTH) {
|
||||
msr.translateY(-0.5);
|
||||
msr
|
||||
.centre()
|
||||
.translate(0, .25, 0)
|
||||
.rotate(Direction.EAST, AngleHelper.rad(angle))
|
||||
.translateBack(0, -.25, 0)
|
||||
.unCentre();
|
||||
}
|
||||
if(blockEntity.direction==Direction.SOUTH) {
|
||||
msr.translateY(-0.5);
|
||||
msr
|
||||
.centre()
|
||||
.translate(0, .25, 0)
|
||||
.rotate(Direction.WEST, AngleHelper.rad(angle))
|
||||
.translateBack(0, -.25, 0)
|
||||
.unCentre();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
hammer.setTransform(ms);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void updateLight() {
|
||||
relight(pos, hammer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
hammer.delete();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank;
|
||||
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGPartialModels;
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.util.transform.TransformStack;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
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;
|
||||
|
||||
public class PumpjackCrankRenderer extends KineticBlockEntityRenderer {
|
||||
|
||||
public PumpjackCrankRenderer(BlockEntityRendererProvider.Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderSafe(KineticBlockEntity te, float partialTicks, PoseStack ms, MultiBufferSource buffer,
|
||||
int light, int overlay) {
|
||||
renderBlock((PumpjackCrankBlockEntity) te, ms, light,buffer);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (Backend.canUseInstancing(te.getLevel()))
|
||||
return;
|
||||
|
||||
BlockState blockState = te.getBlockState();
|
||||
PumpjackCrankBlockEntity wte = (PumpjackCrankBlockEntity) te;
|
||||
|
||||
|
||||
|
||||
float angle = wte.angle * partialTicks;
|
||||
|
||||
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
|
||||
|
||||
renderCrank(te, ms, light, blockState, angle, vb);
|
||||
}
|
||||
|
||||
private void renderCrank(KineticBlockEntity te, PoseStack ms, int light, BlockState blockState, float angle,
|
||||
VertexConsumer vb) {
|
||||
|
||||
/**
|
||||
* check
|
||||
*/
|
||||
|
||||
SuperByteBuffer hammer = CachedBufferer.block(blockState);
|
||||
//kineticRotationTransform(hammer, te, getRotationAxisOf(te), AngleHelper.rad(angle), light);
|
||||
hammer.renderInto(ms, vb);
|
||||
}
|
||||
private void renderBlock(PumpjackCrankBlockEntity te, PoseStack ms, int light,
|
||||
MultiBufferSource buffer) {
|
||||
|
||||
BlockState blockState = te.getBlockState();
|
||||
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
|
||||
ms.pushPose();
|
||||
TransformStack msr = TransformStack.cast(ms);
|
||||
msr.translate(1 / 2f, 0.5, 1 / 2f);
|
||||
|
||||
float dialPivot = 5.75f / 16;
|
||||
|
||||
|
||||
if (te.direction == Direction.NORTH){
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CRANK_BLOCK, blockState)
|
||||
// .rotateY(d.toYRot())
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.renderInto(ms, vb);
|
||||
|
||||
if(te.isValid()) {
|
||||
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState)
|
||||
|
||||
.translate(-0.5, -0.75, -0.5)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, -AngleHelper.rad(te.angle))
|
||||
.unCentre()
|
||||
.translateY(0.4)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, AngleHelper.rad(te.angle))
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.translateY(0.4)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
}
|
||||
if(te.direction == Direction.EAST) {
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CRANK_BLOCK, blockState)
|
||||
.rotateY(270)
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.renderInto(ms, vb);
|
||||
if(te.isValid()) {
|
||||
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState)
|
||||
.rotateY(270)
|
||||
.translate(-0.5, -0.75, -0.5)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, -AngleHelper.rad(te.angle))
|
||||
.unCentre()
|
||||
.translateY(0.4)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, AngleHelper.rad(te.angle))
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.translateY(0.4)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
}
|
||||
if(te.direction == Direction.SOUTH) {
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CRANK_BLOCK, blockState)
|
||||
.rotateY(180)
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.renderInto(ms, vb);
|
||||
|
||||
if(te.isValid()) {
|
||||
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState)
|
||||
.rotateY(180)
|
||||
.translate(-0.5, -0.75, -0.5)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, -AngleHelper.rad(te.angle))
|
||||
.unCentre()
|
||||
.translateY(0.4)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, AngleHelper.rad(te.angle))
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.translateY(0.4)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
}
|
||||
if(te.direction == Direction.WEST) {
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CRANK_BLOCK, blockState)
|
||||
.rotateY(90)
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.renderInto(ms, vb);
|
||||
if(te.isValid()) {
|
||||
|
||||
CachedBufferer.partial(TFMGPartialModels.PUMPJACK_CONNECTOR, blockState)
|
||||
.rotateY(90)
|
||||
.translate(-0.5, -0.75, -0.5)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, -AngleHelper.rad(te.angle))
|
||||
.unCentre()
|
||||
.translateY(0.4)
|
||||
.centre()
|
||||
.rotate(Direction.WEST, AngleHelper.rad(te.angle))
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.translateY(0.4)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ms.popPose();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState getRenderedBlockState(KineticBlockEntity te) {
|
||||
return shaft(getRotationAxisOf(te));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.RenderShape;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
|
||||
public class PumpjackHammerHolderBlock extends HorizontalDirectionalBlock implements IBE<PumpjackHammerHolderBlockEntity> {
|
||||
|
||||
public PumpjackHammerHolderBlock(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_54794_) {
|
||||
p_54794_.add(FACING);
|
||||
}
|
||||
public BlockState getStateForPlacement(BlockPlaceContext p_54779_) {
|
||||
return this.defaultBlockState().setValue(FACING, p_54779_.getHorizontalDirection());
|
||||
}
|
||||
@Override
|
||||
public RenderShape getRenderShape(BlockState pState) {
|
||||
return RenderShape.ENTITYBLOCK_ANIMATED;
|
||||
}
|
||||
@Override
|
||||
public Class<PumpjackHammerHolderBlockEntity> getBlockEntityClass() {
|
||||
return PumpjackHammerHolderBlockEntity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends PumpjackHammerHolderBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.PUMPJACK_HAMMER_HOLDER.get();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder;
|
||||
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank.PumpjackCrankBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input.MachineInputBlockEntity;
|
||||
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat.Chaser;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
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 java.util.List;
|
||||
|
||||
|
||||
public class PumpjackHammerHolderBlockEntity extends KineticBlockEntity implements IHaveGoggleInformation {
|
||||
float targetSpeed;
|
||||
LerpedFloat visualSpeed = LerpedFloat.linear();
|
||||
LerpedFloat angle = LerpedFloat.angular();
|
||||
float debugMogus = 0.4f;
|
||||
float speedModifier=0;
|
||||
public BlockPos crankPos;
|
||||
public PumpjackCrankBlockEntity crank;
|
||||
|
||||
|
||||
public float crankAngle;
|
||||
public Direction direction = this.getBlockState().getValue(HorizontalDirectionalBlock.FACING);;
|
||||
public Direction direction2 = this.getBlockState().getValue(HorizontalDirectionalBlock.FACING).getCounterClockWise();;
|
||||
public PumpjackHammerHolderBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
angle.setValue(14);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
|
||||
}
|
||||
public boolean hasCrank(){
|
||||
BlockPos theoreticalPos;
|
||||
if(direction == Direction.NORTH){
|
||||
theoreticalPos = this.getBlockPos().south(2).below();
|
||||
if(level.getBlockEntity(theoreticalPos) instanceof PumpjackCrankBlockEntity){
|
||||
crankPos = theoreticalPos;
|
||||
crank = (PumpjackCrankBlockEntity) level.getBlockEntity(crankPos);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(direction == Direction.SOUTH){
|
||||
theoreticalPos = this.getBlockPos().north(2).below();
|
||||
if(level.getBlockEntity(theoreticalPos) instanceof PumpjackCrankBlockEntity){
|
||||
crankPos = theoreticalPos;
|
||||
crank = (PumpjackCrankBlockEntity) level.getBlockEntity(crankPos);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(direction == Direction.WEST){
|
||||
theoreticalPos = this.getBlockPos().east(2).below();
|
||||
if(level.getBlockEntity(theoreticalPos) instanceof PumpjackCrankBlockEntity){
|
||||
crankPos = theoreticalPos;
|
||||
crank = (PumpjackCrankBlockEntity) level.getBlockEntity(crankPos);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(direction == Direction.EAST){
|
||||
theoreticalPos = this.getBlockPos().west(2).below();
|
||||
if(level.getBlockEntity(theoreticalPos) instanceof PumpjackCrankBlockEntity) {
|
||||
crankPos = theoreticalPos;
|
||||
crank = (PumpjackCrankBlockEntity) level.getBlockEntity(crankPos);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
direction = this.getBlockState().getValue(HorizontalDirectionalBlock.FACING);
|
||||
if (!level.isClientSide)
|
||||
return;
|
||||
if(!hasCrank()) {
|
||||
angle.setValue(14);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(level.getBlockEntity(crankPos.below()) instanceof MachineInputBlockEntity)){
|
||||
angle.setValue(14);
|
||||
return;
|
||||
}
|
||||
if(((MachineInputBlockEntity) level.getBlockEntity(crankPos.below())).powerLevel==0) {
|
||||
angle.setValue(14);
|
||||
return;
|
||||
}
|
||||
if(!(crank.isValid())){
|
||||
angle.setValue(14);
|
||||
return;
|
||||
}
|
||||
angle.tickChaser();
|
||||
|
||||
if(angle.getValue()>0){
|
||||
speedModifier=(angle.getValue()/25)*-1;
|
||||
}else
|
||||
speedModifier=angle.getValue()/25;
|
||||
|
||||
crankAngle=crank.angle;
|
||||
|
||||
//if(crankAngle==90||crankAngle==270) {
|
||||
// angle.chase(13, 0.125f, Chaser.EXP);
|
||||
//}
|
||||
|
||||
angle.updateChaseSpeed(.8f+speedModifier);
|
||||
if(crankAngle==180){
|
||||
angle.chase(-14, .8f+speedModifier, Chaser.LINEAR);
|
||||
|
||||
}
|
||||
|
||||
if(crankAngle==0) {
|
||||
angle.chase(14, .8f+speedModifier, Chaser.LINEAR);
|
||||
//angle.updateChaseSpeed(angle.getValue());
|
||||
}
|
||||
}
|
||||
/*
|
||||
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
if(hasCrank()){
|
||||
Lang.translate("goggles.surface_scanner.no_rotation")
|
||||
.style(ChatFormatting.GREEN)
|
||||
.forGoggles(tooltip);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
*/
|
||||
@Override
|
||||
public void write(CompoundTag compound, boolean clientPacket) {
|
||||
super.write(compound, clientPacket);
|
||||
if (clientPacket) {
|
||||
compound.putFloat("Angle", angle.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
super.read(compound, clientPacket);
|
||||
if (clientPacket) {
|
||||
|
||||
angle.setValue(compound.getFloat("Angle"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGPartialModels;
|
||||
import com.jozufozu.flywheel.api.MaterialManager;
|
||||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
||||
import com.jozufozu.flywheel.util.transform.TransformStack;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntityInstance;
|
||||
import com.simibubi.create.foundation.utility.AngleHelper;
|
||||
import com.simibubi.create.foundation.utility.AnimationTickHolder;
|
||||
|
||||
public class PumpjackHammerHolderInstance extends KineticBlockEntityInstance<PumpjackHammerHolderBlockEntity> implements DynamicInstance {
|
||||
|
||||
|
||||
protected final ModelData hammer;
|
||||
protected final ModelData holder;
|
||||
protected float lastAngle = Float.NaN;
|
||||
|
||||
public PumpjackHammerHolderInstance(MaterialManager modelManager, PumpjackHammerHolderBlockEntity tile) {
|
||||
super(modelManager, tile);
|
||||
|
||||
|
||||
hammer = getTransformMaterial()
|
||||
.getModel(TFMGPartialModels.PUMPJACK_HAMMER,blockState,tile.direction)
|
||||
.createInstance();
|
||||
|
||||
holder = getTransformMaterial()
|
||||
.getModel(blockState)
|
||||
.createInstance();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beginFrame() {
|
||||
|
||||
float partialTicks = AnimationTickHolder.getPartialTicks();
|
||||
|
||||
float speed = blockEntity.visualSpeed.getValue(partialTicks) * 3 / 10f;
|
||||
float angle = blockEntity.angle.getValue() + speed * partialTicks;
|
||||
|
||||
if (Math.abs(angle - lastAngle) < 0.001)
|
||||
return;
|
||||
|
||||
animate(angle);
|
||||
|
||||
lastAngle = angle;
|
||||
}
|
||||
|
||||
private void animate(float angle) {
|
||||
PoseStack ms = new PoseStack();
|
||||
TransformStack msr = TransformStack.cast(ms);
|
||||
|
||||
msr.translate(getInstancePosition());
|
||||
msr.centre()
|
||||
.rotate(blockEntity.direction.getClockWise(), AngleHelper.rad(angle))
|
||||
.unCentre();
|
||||
PoseStack ms2 = new PoseStack();
|
||||
TransformStack msr2 = TransformStack.cast(ms2);
|
||||
|
||||
msr2.translate(getInstancePosition());
|
||||
//msr.centre()
|
||||
// .rotate(blockEntity.direction.getClockWise(), AngleHelper.rad(angle))
|
||||
// .unCentre();
|
||||
|
||||
|
||||
hammer.setTransform(ms);
|
||||
holder.setTransform(ms2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void updateLight() {
|
||||
relight(pos, hammer,holder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
hammer.delete();
|
||||
holder.delete();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGPartialModels;
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
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.world.level.block.state.BlockState;
|
||||
|
||||
public class PumpjackHammerHolderRenderer extends KineticBlockEntityRenderer<PumpjackHammerHolderBlockEntity> {
|
||||
|
||||
protected float lastAngle = Float.NaN;
|
||||
public PumpjackHammerHolderRenderer(BlockEntityRendererProvider.Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderSafe(PumpjackHammerHolderBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
|
||||
int light, int overlay) {
|
||||
|
||||
// super.renderSafe(te, partialTicks, ms, buffer, light, overlay);
|
||||
|
||||
|
||||
if (Backend.canUseInstancing(be.getLevel()))
|
||||
return;
|
||||
|
||||
BlockState blockState = be.getBlockState();
|
||||
PumpjackHammerHolderBlockEntity wte = (PumpjackHammerHolderBlockEntity) be;
|
||||
|
||||
|
||||
float speed = be.visualSpeed.getValue(partialTicks) * 3 / 10f;
|
||||
float angle = be.angle.getValue() + speed * partialTicks;
|
||||
|
||||
if (Math.abs(angle - lastAngle) < 0.001)
|
||||
return;
|
||||
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
|
||||
renderHammer(be, ms, light, blockState, angle, vb);
|
||||
|
||||
lastAngle = angle;
|
||||
}
|
||||
|
||||
private void renderHammer(PumpjackHammerHolderBlockEntity be, PoseStack ms, int light, BlockState blockState, float angle,
|
||||
VertexConsumer vb) {
|
||||
|
||||
|
||||
SuperByteBuffer hammer =
|
||||
CachedBufferer.partialFacing(TFMGPartialModels.PUMPJACK_HAMMER, be.getBlockState(), be.direction);
|
||||
int lightInFront = LevelRenderer.getLightColor(be.getLevel(), be.getBlockPos().relative(be.direction));
|
||||
kineticRotationTransform(hammer, be, be.direction2.getAxis(), angle, lightInFront).renderInto(ms, vb);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input;
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
|
||||
import com.simibubi.create.content.kinetics.base.DirectionalKineticBlock;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.pathfinder.PathComputationType;
|
||||
|
||||
public class MachineInputBlock extends DirectionalKineticBlock implements IBE<MachineInputBlockEntity> {
|
||||
|
||||
|
||||
|
||||
public MachineInputBlock(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) {
|
||||
return face == state.getValue(FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Direction.Axis getRotationAxis(BlockState state) {
|
||||
return state.getValue(FACING).getAxis();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isPathfindable(BlockState state, BlockGetter reader, BlockPos pos, PathComputationType type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<MachineInputBlockEntity> getBlockEntityClass() {
|
||||
return MachineInputBlockEntity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends MachineInputBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.MACHINE_INPUT.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input;
|
||||
|
||||
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
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 java.util.List;
|
||||
|
||||
public class MachineInputBlockEntity extends KineticBlockEntity {
|
||||
public int powerLevel=0;
|
||||
public MachineInputBlockEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) {
|
||||
super(typeIn, pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick(){
|
||||
super.tick();
|
||||
if(stress<80)
|
||||
powerLevel=0;
|
||||
if(stress>=80)
|
||||
powerLevel=1;
|
||||
if(stress>=160)
|
||||
powerLevel=2;
|
||||
if(stress>=320)
|
||||
powerLevel=3;
|
||||
if(stress>=512)
|
||||
powerLevel=4;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int getPowerLevel(){
|
||||
return powerLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void write(CompoundTag compound, boolean clientPacket) {
|
||||
|
||||
compound.putInt("PowerLevel", powerLevel);
|
||||
super.write(compound, clientPacket);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
super.read(compound, clientPacket);
|
||||
powerLevel = compound.getInt("PowerLevel");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
Lang.translate("goggles.machine_input.info")
|
||||
.forGoggles(tooltip);
|
||||
/*
|
||||
if(powerLevel==0){
|
||||
Lang.translate("goggles.machine_input.no_rot")
|
||||
.style(ChatFormatting.DARK_RED)
|
||||
.forGoggles(tooltip);
|
||||
return true;
|
||||
}
|
||||
|
||||
*/
|
||||
Lang.translate("goggles.machine_input.power_level")
|
||||
.style(ChatFormatting.AQUA)
|
||||
.add(Lang.translate("goggles.number", this.getPowerLevel()))
|
||||
.forGoggles(tooltip,1);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input;
|
||||
|
||||
import com.simibubi.create.AllPartialModels;
|
||||
import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
import com.simibubi.create.foundation.render.SuperByteBuffer;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
|
||||
public class MachineInputRenderer extends KineticBlockEntityRenderer<MachineInputBlockEntity> {
|
||||
|
||||
public MachineInputRenderer(BlockEntityRendererProvider.Context context) {
|
||||
super(context);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected SuperByteBuffer getRotatedModel(MachineInputBlockEntity be, BlockState state) {
|
||||
return CachedBufferer.partialFacing(AllPartialModels.SHAFT_HALF, state, state
|
||||
.getValue(MachineInputBlock.FACING)
|
||||
.getOpposite());
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,8 @@ package com.drmangotea.tfmg.recipes.jei;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.recipes.distillation.AdvancedDistillationRecipe;
|
||||
import com.drmangotea.tfmg.recipes.jei.machines.Distillery;
|
||||
import com.drmangotea.tfmg.registry.TFMGGuiTextures;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.simibubi.create.compat.jei.category.CreateRecipeCategory;
|
||||
import com.simibubi.create.foundation.fluid.FluidIngredient;
|
||||
@@ -13,14 +15,13 @@ 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 AdvancedDistillationCategory extends CreateRecipeCategory<AdvancedDistillationRecipe> {
|
||||
|
||||
private final AnimatedDistiller distiller = new AnimatedDistiller();
|
||||
|
||||
|
||||
public AdvancedDistillationCategory(Info<AdvancedDistillationRecipe> info) {
|
||||
super(info);
|
||||
@@ -33,46 +34,54 @@ public class AdvancedDistillationCategory extends CreateRecipeCategory<AdvancedD
|
||||
public void setRecipe(IRecipeLayoutBuilder builder, AdvancedDistillationRecipe recipe, IFocusGroup focuses) {
|
||||
FluidIngredient fluidIngredient=recipe.getInputFluid();
|
||||
|
||||
int outputCount = recipe.getOutputCount(recipe);
|
||||
int yModifier = 60 -(outputCount*10);
|
||||
int y = 147-yModifier;
|
||||
|
||||
|
||||
builder
|
||||
.addSlot(RecipeIngredientRole.INPUT, 2, 75)
|
||||
.addSlot(RecipeIngredientRole.INPUT, 18, 130-yModifier)
|
||||
.setBackground(getRenderedSlot(), -1, -1)
|
||||
.addIngredients(ForgeTypes.FLUID_STACK, withImprovedVisibility(recipe.getInputFluid().getMatchingFluidStacks()))
|
||||
.addTooltipCallback(addFluidTooltip(recipe.getInputFluid().getRequiredAmount()));
|
||||
|
||||
|
||||
|
||||
builder
|
||||
.addSlot(RecipeIngredientRole.OUTPUT,150, 55)
|
||||
.setBackground(getRenderedSlot(), -1, -1)
|
||||
.addIngredient(ForgeTypes.FLUID_STACK, withImprovedVisibility(recipe.getFirstFluidResult()))
|
||||
.addTooltipCallback(addFluidTooltip(recipe.getFirstFluidResult().getAmount()));
|
||||
builder
|
||||
.addSlot(RecipeIngredientRole.OUTPUT,150, 33)
|
||||
.setBackground(getRenderedSlot(), -1, -1)
|
||||
.addIngredient(ForgeTypes.FLUID_STACK, withImprovedVisibility(recipe.getSecondFluidResult()))
|
||||
.addTooltipCallback(addFluidTooltip(recipe.getSecondFluidResult().getAmount()));
|
||||
|
||||
builder
|
||||
.addSlot(RecipeIngredientRole.OUTPUT,150, 12)
|
||||
.setBackground(getRenderedSlot(), -1, -1)
|
||||
.addIngredient(ForgeTypes.FLUID_STACK, withImprovedVisibility(recipe.getThirdFluidResult()))
|
||||
.addTooltipCallback(addFluidTooltip(recipe.getThirdFluidResult().getAmount()));
|
||||
|
||||
|
||||
|
||||
for(int i = 0; i<outputCount;i++) {
|
||||
y -= 24;
|
||||
builder
|
||||
.addSlot(RecipeIngredientRole.OUTPUT, 105, y)
|
||||
.setBackground(getRenderedSlot(), -1, -1)
|
||||
.addIngredient(ForgeTypes.FLUID_STACK, withImprovedVisibility(recipe.getFluidResults().get(i)))
|
||||
.addTooltipCallback(addFluidTooltip(recipe.getFirstFluidResult().getAmount()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(AdvancedDistillationRecipe recipe, IRecipeSlotsView iRecipeSlotsView, PoseStack matrixStack, double mouseX, double mouseY) {
|
||||
distiller
|
||||
.draw(matrixStack, 65, 27);
|
||||
AllGuiTextures.JEI_ARROW.render(matrixStack, 20, 80);
|
||||
AllGuiTextures.JEI_ARROW.render(matrixStack, 100, 14);
|
||||
AllGuiTextures.JEI_ARROW.render(matrixStack, 100, 35);
|
||||
AllGuiTextures.JEI_ARROW.render(matrixStack, 100, 57);
|
||||
AllGuiTextures.JEI_DOWN_ARROW.render(matrixStack, 100, 79);
|
||||
int outputCount = recipe.getOutputCount(recipe);
|
||||
int yModifier = 60 -(outputCount*10);
|
||||
int y = 126-yModifier;
|
||||
|
||||
|
||||
TFMGGuiTextures.DISTILLATION_TOWER_BOTTOM.render(matrixStack,10,y);
|
||||
// TFMGGuiTextures.DISTILLATION_TOWER_FIRE.render(matrixStack,10,y+24);
|
||||
AllGuiTextures.JEI_ARROW.render(matrixStack, 56, y);
|
||||
|
||||
for(int i = 0; i<(outputCount-1);i++){
|
||||
y -= 24;
|
||||
TFMGGuiTextures.DISTILLATION_TOWER_MIDDLE.render(matrixStack,10,y);
|
||||
AllGuiTextures.JEI_ARROW.render(matrixStack, 56, y);
|
||||
}
|
||||
y -= 12;
|
||||
TFMGGuiTextures.DISTILLATION_TOWER_TOP.render(matrixStack,10,y);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.drmangotea.tfmg.recipes.jei;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.recipes.distillation.DistillationRecipe;
|
||||
import com.drmangotea.tfmg.recipes.jei.machines.Distillery;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.simibubi.create.compat.jei.category.CreateRecipeCategory;
|
||||
import com.simibubi.create.foundation.fluid.FluidIngredient;
|
||||
@@ -19,7 +20,7 @@ import javax.annotation.ParametersAreNonnullByDefault;
|
||||
@ParametersAreNonnullByDefault
|
||||
public class DistillationCategory extends CreateRecipeCategory<DistillationRecipe> {
|
||||
|
||||
private final AnimatedDistiller distiller = new AnimatedDistiller();
|
||||
private final Distillery distiller = new Distillery();
|
||||
|
||||
public DistillationCategory(Info<DistillationRecipe> info) {
|
||||
super(info);
|
||||
|
||||
@@ -66,9 +66,10 @@ public class TFMGJei implements IModPlugin {
|
||||
|
||||
advancedDistillation = builder(AdvancedDistillationRecipe.class)
|
||||
.addTypedRecipes(TFMGRecipeTypes.ADVANCED_DISTILLATION)
|
||||
.catalyst(TFMGBlocks.CAST_IRON_DISTILLATION_CONTROLLER::get)
|
||||
.itemIcon(TFMGFluids.KEROSENE.getBucket().get())
|
||||
.emptyBackground(177, 123)
|
||||
.catalyst(TFMGBlocks.STEEL_DISTILLATION_CONTROLLER::get)
|
||||
.catalyst(TFMGBlocks.STEEL_DISTILLATION_OUTPUT::get)
|
||||
.itemIcon(TFMGBlocks.STEEL_DISTILLATION_CONTROLLER.get())
|
||||
.emptyBackground(177, 150)
|
||||
.build("advanced_distillation", AdvancedDistillationCategory::new)
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.drmangotea.tfmg.recipes.jei;
|
||||
package com.drmangotea.tfmg.recipes.jei.machines;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGBlocks;
|
||||
@@ -21,11 +21,11 @@ import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
public class AnimatedDistiller extends AnimatedKinetics {
|
||||
public class Distillery extends AnimatedKinetics {
|
||||
|
||||
|
||||
|
||||
public AnimatedDistiller() {
|
||||
public Distillery() {
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,16 @@ import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distilla
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower.DistillationOutputBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery.DistilleryControllerBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery.DistilleryOutputBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.base.PumpjackBaseRenderer;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.base.PumpjackBaseBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank.PumpjackCrankInstance;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank.PumpjackCrankRenderer;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank.PumpjackCrankBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderInstance;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderRenderer;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input.MachineInputRenderer;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input.MachineInputBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.pipes.normal.LockablePipeBlockEntity;
|
||||
import com.drmangotea.tfmg.content.machines.tanks.SteelFluidTankRenderer;
|
||||
import com.drmangotea.tfmg.content.machines.tanks.SteelTankBlockEntity;
|
||||
@@ -23,6 +33,7 @@ import com.simibubi.create.content.fluids.pipes.valve.FluidValveRenderer;
|
||||
import com.simibubi.create.content.fluids.pump.PumpBlockEntity;
|
||||
import com.simibubi.create.content.fluids.pump.PumpCogInstance;
|
||||
import com.simibubi.create.content.fluids.pump.PumpRenderer;
|
||||
import com.simibubi.create.content.kinetics.base.HalfShaftInstance;
|
||||
import com.simibubi.create.content.kinetics.base.HorizontalHalfShaftInstance;
|
||||
import com.simibubi.create.foundation.blockEntity.renderer.SmartBlockEntityRenderer;
|
||||
import com.tterrag.registrate.util.entry.BlockEntityEntry;
|
||||
@@ -124,6 +135,33 @@ public class TFMGBlockEntities {
|
||||
.validBlocks(TFMGBlocks.STEEL_DISTILLATION_CONTROLLER)
|
||||
.register();
|
||||
|
||||
public static final BlockEntityEntry<PumpjackHammerHolderBlockEntity> PUMPJACK_HAMMER_HOLDER = REGISTRATE
|
||||
.blockEntity("pumpjack_hammer_holder", PumpjackHammerHolderBlockEntity::new)
|
||||
.instance(() -> PumpjackHammerHolderInstance::new, false)
|
||||
.validBlocks(TFMGBlocks.PUMPJACK_HAMMER_HOLDER)
|
||||
.renderer(() -> PumpjackHammerHolderRenderer::new)
|
||||
.register();
|
||||
|
||||
public static final BlockEntityEntry<PumpjackCrankBlockEntity> PUMPJACK_CRANK = REGISTRATE
|
||||
.blockEntity("pumpjack_crank", PumpjackCrankBlockEntity::new)
|
||||
.instance(() -> PumpjackCrankInstance::new, true)
|
||||
.validBlocks(TFMGBlocks.PUMPJACK_CRANK)
|
||||
.renderer(() -> PumpjackCrankRenderer::new)
|
||||
.register();
|
||||
|
||||
public static final BlockEntityEntry<MachineInputBlockEntity> MACHINE_INPUT = REGISTRATE
|
||||
.blockEntity("machine_input", MachineInputBlockEntity::new)
|
||||
.instance(() -> HalfShaftInstance::new,true)
|
||||
.validBlocks(TFMGBlocks.MACHINE_INPUT)
|
||||
.renderer(() -> MachineInputRenderer::new)
|
||||
.register();
|
||||
|
||||
public static final BlockEntityEntry<PumpjackBaseBlockEntity> PUMPJACK_BASE = REGISTRATE
|
||||
.blockEntity("pumpjack_base", PumpjackBaseBlockEntity::new)
|
||||
.validBlocks(TFMGBlocks.PUMPJACK_BASE)
|
||||
.renderer(() -> PumpjackBaseRenderer::new)
|
||||
.register();
|
||||
|
||||
|
||||
public static void register() {}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.drmangotea.tfmg.registry;
|
||||
|
||||
import com.drmangotea.tfmg.base.TFMGBuilderTransformers;
|
||||
import com.drmangotea.tfmg.base.TFMGSpriteShifts;
|
||||
import com.drmangotea.tfmg.base.TFMGVanillaBlockStates;
|
||||
import com.drmangotea.tfmg.content.concrete.formwork.FormWorkBlock;
|
||||
import com.drmangotea.tfmg.content.concrete.formwork.FormWorkGenerator;
|
||||
import com.drmangotea.tfmg.content.decoration.doors.TFMGSlidingDoorBlock;
|
||||
@@ -14,6 +15,10 @@ import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distilla
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower.DistillationOutputBlock;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery.DistilleryControllerBlock;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery.DistilleryOutputBlock;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.base.PumpjackBaseBlock;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank.PumpjackCrankBlock;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderBlock;
|
||||
import com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input.MachineInputBlock;
|
||||
import com.drmangotea.tfmg.content.machines.pipes.normal.steel.EncasedSteelPipeBlock;
|
||||
import com.drmangotea.tfmg.content.machines.pipes.normal.steel.GlassSteelPipeBlock;
|
||||
import com.drmangotea.tfmg.content.machines.pipes.normal.steel.SteelPipeAttachmentModel;
|
||||
@@ -43,6 +48,7 @@ import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.WallBlock;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
@@ -272,10 +278,92 @@ public static final BlockEntry<DistillationOutputBlock> STEEL_DISTILLATION_OUTPU
|
||||
.item()
|
||||
.build()
|
||||
.register();
|
||||
public static final BlockEntry<Block> INDUSTRIAL_PIPE = REGISTRATE.block("industrial_pipe", Block::new)
|
||||
.initialProperties(() -> Blocks.IRON_BLOCK)
|
||||
.properties(p -> p.color(MaterialColor.COLOR_LIGHT_GRAY))
|
||||
.properties(p -> p.requiresCorrectToolForDrops())
|
||||
.transform(pickaxeOnly())
|
||||
.item()
|
||||
.build()
|
||||
.lang("Industrial Pipe")
|
||||
.register();
|
||||
////////////////
|
||||
|
||||
|
||||
//Pumpjack
|
||||
public static final BlockEntry<MachineInputBlock> MACHINE_INPUT =
|
||||
REGISTRATE.block("machine_input", MachineInputBlock::new)
|
||||
.properties(p -> p.color(MaterialColor.COLOR_GRAY))
|
||||
.properties(BlockBehaviour.Properties::noOcclusion)
|
||||
.properties(p -> p
|
||||
.strength(4.5F))
|
||||
.transform(axeOrPickaxe())
|
||||
.transform(BlockStressDefaults.setImpact(4.0))
|
||||
.item()
|
||||
.build()
|
||||
.register();
|
||||
|
||||
public static final BlockEntry<PumpjackCrankBlock> PUMPJACK_CRANK =
|
||||
REGISTRATE.block("pumpjack_crank", PumpjackCrankBlock::new)
|
||||
.properties(p -> p.color(MaterialColor.COLOR_GRAY))
|
||||
.properties(p -> p
|
||||
.strength(4.5F))
|
||||
.properties(BlockBehaviour.Properties::noOcclusion)
|
||||
.transform(axeOrPickaxe())
|
||||
.item()
|
||||
.build()
|
||||
.register();
|
||||
public static final BlockEntry<PumpjackBaseBlock> PUMPJACK_BASE =
|
||||
REGISTRATE.block("pumpjack_base", PumpjackBaseBlock::new)
|
||||
.initialProperties(SharedProperties::copperMetal)
|
||||
.properties(BlockBehaviour.Properties::noOcclusion)
|
||||
.item()
|
||||
.build()
|
||||
.register();
|
||||
|
||||
public static final BlockEntry<PumpjackHammerHolderBlock> PUMPJACK_HAMMER_HOLDER =
|
||||
REGISTRATE.block("pumpjack_hammer_holder", PumpjackHammerHolderBlock::new)
|
||||
.initialProperties(SharedProperties::copperMetal)
|
||||
.properties(BlockBehaviour.Properties::noOcclusion)
|
||||
.item()
|
||||
.build()
|
||||
.register();
|
||||
//////
|
||||
|
||||
//Blast Furnace
|
||||
|
||||
public static final BlockEntry<Block> FIREPROOF_BRICKS = REGISTRATE.block("fireproof_bricks", Block::new)
|
||||
.initialProperties(() -> Blocks.BRICKS)
|
||||
.properties(p -> p.color(MaterialColor.COLOR_RED))
|
||||
.properties(p -> p.requiresCorrectToolForDrops())
|
||||
.transform(pickaxeOnly())
|
||||
.item()
|
||||
.build()
|
||||
.lang("Fireproof Bricks")
|
||||
.register();
|
||||
public static final BlockEntry<WallBlock> FIREPROOF_BRICK_REINFORCEMENT = REGISTRATE.block("fireproof_brick_reinforcement", WallBlock::new)
|
||||
.initialProperties(() -> Blocks.BRICKS)
|
||||
.properties(p -> p.color(MaterialColor.COLOR_RED))
|
||||
.properties(p -> p.requiresCorrectToolForDrops())
|
||||
.transform(pickaxeOnly())
|
||||
.tag(BlockTags.WALLS)
|
||||
.blockstate((c, p) -> TFMGVanillaBlockStates.generateWallBlockState(c, p, "fireproof_brick_reinforcement"))
|
||||
.item()
|
||||
.build()
|
||||
.lang("Fireproof Brick Reinforcement")
|
||||
.register();
|
||||
public static final BlockEntry<Block> BLAST_FURNACE_OUTPUT = REGISTRATE.block("blast_furnace_output", Block::new)
|
||||
.initialProperties(() -> Blocks.BRICKS)
|
||||
.properties(p -> p.color(MaterialColor.COLOR_RED))
|
||||
.properties(p -> p.requiresCorrectToolForDrops())
|
||||
.transform(pickaxeOnly())
|
||||
.item()
|
||||
.build()
|
||||
.lang("Blast Furnace Output")
|
||||
.register();
|
||||
|
||||
//////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.drmangotea.tfmg.registry;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.CreateTFMG;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.simibubi.create.foundation.gui.UIRenderHelper;
|
||||
import com.simibubi.create.foundation.gui.element.ScreenElement;
|
||||
import com.simibubi.create.foundation.utility.Color;
|
||||
|
||||
import net.minecraft.client.gui.GuiComponent;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public enum TFMGGuiTextures implements ScreenElement {
|
||||
|
||||
|
||||
// JEI
|
||||
DISTILLATION_TOWER_TOP("distillation_tower", 0, 0, 44, 12),
|
||||
DISTILLATION_TOWER_MIDDLE("distillation_tower", 0, 12, 44, 24),
|
||||
DISTILLATION_TOWER_BOTTOM("distillation_tower", 0, 36, 44, 24),
|
||||
DISTILLATION_TOWER_FIRE("distillation_tower", 0, 60, 44, 12),
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
public final ResourceLocation location;
|
||||
public int width, height;
|
||||
public int startX, startY;
|
||||
|
||||
|
||||
|
||||
private TFMGGuiTextures(String location, int startX, int startY, int width, int height) {
|
||||
this(CreateTFMG.MOD_ID, location, startX, startY, width, height);
|
||||
}
|
||||
|
||||
private TFMGGuiTextures(String namespace, String location, int startX, int startY, int width, int height) {
|
||||
this.location = new ResourceLocation(namespace, "textures/gui/" + location + ".png");
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.startX = startX;
|
||||
this.startY = startY;
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void bind() {
|
||||
RenderSystem.setShaderTexture(0, location);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@Override
|
||||
public void render(PoseStack ms, int x, int y) {
|
||||
bind();
|
||||
GuiComponent.blit(ms, x, y, 0, startX, startY, width, height, 256, 256);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void render(PoseStack ms, int x, int y, GuiComponent component) {
|
||||
bind();
|
||||
component.blit(ms, x, y, startX, startY, width, height);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void render(PoseStack ms, int x, int y, Color c) {
|
||||
bind();
|
||||
UIRenderHelper.drawColoredTexture(ms, c, x, y, startX, startY, width, height);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,6 +18,10 @@ import java.util.Map;
|
||||
public class TFMGPartialModels {
|
||||
|
||||
public static final PartialModel
|
||||
PUMPJACK_HAMMER = block("pumpjack/hammer_holder"),
|
||||
PUMPJACK_FRONT_ROPE = block("pumpjack/pumpjack_front_rope"),
|
||||
PUMPJACK_CONNECTOR = block("pumpjack/pumpjack_connector"),
|
||||
PUMPJACK_CRANK_BLOCK = block("pumpjack/pumpjack_crank_block"),
|
||||
TOWER_GAUGE = block("distillation_tower/gauge"),
|
||||
STEEL_FLUID_PIPE_CASING = block("steel_pipe/casing"),
|
||||
SURFACE_SCANNER_DIAL = block("surface_scanner/dial"),
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"parent": "block/block",
|
||||
"textures": {
|
||||
"2": "create:block/smart_pipe_1",
|
||||
"3": "create:block/smart_pipe_2",
|
||||
"particle": "create:block/smart_pipe_2"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [4.05, 4.05, 12],
|
||||
"to": [11.95, 11.95, 16],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 14]},
|
||||
"faces": {
|
||||
"east": {"uv": [6, 3, 10, 11], "texture": "#2"},
|
||||
"west": {"uv": [6, 3, 10, 11], "texture": "#2"},
|
||||
"up": {"uv": [6, 11, 10, 3], "rotation": 90, "texture": "#2"},
|
||||
"down": {"uv": [10, 11, 6, 3], "rotation": 90, "texture": "#2"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 3, 3],
|
||||
"to": [13, 13, 13],
|
||||
"faces": {
|
||||
"north": {"uv": [3, 3, 4, 4], "tex ture": "#2"},
|
||||
"east": {"uv": [3, 3, 13, 13], "texture": "#2"},
|
||||
"south": {"uv": [3, 3, 4, 4], "texture": "#2"},
|
||||
"west": {"uv": [3, 3, 13, 13], "texture": "#2"},
|
||||
"up": {"uv": [3, 3, 13, 13], "rotation": 270, "texture": "#2"},
|
||||
"down": {"uv": [3, 3, 13, 13], "rotation": 270, "texture": "#2"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4.05, 4.05, 0],
|
||||
"to": [11.95, 11.95, 4],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 0]},
|
||||
"faces": {
|
||||
"east": {"uv": [6, 3, 10, 11], "texture": "#2"},
|
||||
"west": {"uv": [6, 3, 10, 11], "texture": "#2"},
|
||||
"up": {"uv": [6, 11, 10, 3], "rotation": 90, "texture": "#2"},
|
||||
"down": {"uv": [10, 11, 6, 3], "rotation": 90, "texture": "#2"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4.5, 5, 7.15],
|
||||
"to": [11.5, 12, 13.15],
|
||||
"rotation": {"angle": 45, "axis": "x", "origin": [8, 12, 13]},
|
||||
"faces": {
|
||||
"north": {"uv": [1, 9, 7, 15], "texture": "#3"},
|
||||
"east": {"uv": [0, 0, 6, 7], "texture": "#3"},
|
||||
"west": {"uv": [0, 0, 6, 7], "rotation": 180, "texture": "#3"},
|
||||
"up": {"uv": [0, 0, 6, 7], "rotation": 270, "texture": "#3"},
|
||||
"down": {"uv": [0, 0, 6, 7], "rotation": 90, "texture": "#3"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3.9, 4.4, 4.15],
|
||||
"to": [12.1, 12.6, 7.15],
|
||||
"rotation": {"angle": 45, "axis": "x", "origin": [8, 12, 13]},
|
||||
"faces": {
|
||||
"north": {"uv": [8, 8, 16, 16], "texture": "#3"},
|
||||
"east": {"uv": [13, 0, 16, 8], "texture": "#3"},
|
||||
"south": {"uv": [0, 8, 8, 16], "texture": "#3"},
|
||||
"west": {"uv": [13, 8, 16, 0], "rotation": 180, "texture": "#3"},
|
||||
"up": {"uv": [13, 8, 16, 0], "rotation": 270, "texture": "#3"},
|
||||
"down": {"uv": [13, 0, 16, 8], "rotation": 90, "texture": "#3"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"parent": "block/block",
|
||||
"ambientocclusion": false,
|
||||
"textures": {
|
||||
"0": "tfmg:block/pumpjack_hammer",
|
||||
"particle": "tfmg:block/steel_block"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "tfmg:block/pumpjack/hammer",
|
||||
"loader": "forge:obj",
|
||||
"flip-v": true,
|
||||
"model": "tfmg:models/block/pumpjack/pumpjack_hammer.obj"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"0": "tfmg:block/pumpjack_base",
|
||||
"particle": "tfmg:block/pumpjack_base"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [3, 0, 3],
|
||||
"to": [13, 14, 13],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 2, 5, 9], "texture": "#0"},
|
||||
"east": {"uv": [0, 2, 5, 9], "texture": "#0"},
|
||||
"south": {"uv": [0, 2, 5, 9], "texture": "#0"},
|
||||
"west": {"uv": [0, 2, 5, 9], "texture": "#0"},
|
||||
"up": {"uv": [10.5, 0, 14, 4], "texture": "#0"},
|
||||
"down": {"uv": [0, 11, 5, 16], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [2, 14, 2],
|
||||
"to": [14, 16, 14],
|
||||
"faces": {
|
||||
"north": {"uv": [10, 0, 16, 1], "texture": "#0"},
|
||||
"east": {"uv": [10, 0, 16, 1], "texture": "#0"},
|
||||
"south": {"uv": [10, 0, 16, 1], "texture": "#0"},
|
||||
"west": {"uv": [10, 0, 16, 1], "texture": "#0"},
|
||||
"up": {"uv": [10, 0, 16, 6], "texture": "#0"},
|
||||
"down": {"uv": [10, 0, 16, 6], "texture": "#0"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"0": "tfmg:block/fossilstone",
|
||||
"1": "tfmg:block/steel_fluid_tank_connected",
|
||||
"particle": "tfmg:block/fossilstone"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [-3.01, 0, 7],
|
||||
"to": [-3.01, 14, 9],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0, 16], "texture": "#0"},
|
||||
"east": {"uv": [4, 0, 5, 16], "texture": "#0"},
|
||||
"south": {"uv": [11, 0, 11, 16], "texture": "#0"},
|
||||
"west": {"uv": [6, 0, 7, 16], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0, 1], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0, 1], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [19.01, 0, 7],
|
||||
"to": [19.01, 14, 9],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0, 16], "texture": "#0"},
|
||||
"east": {"uv": [4, 0, 5, 16], "texture": "#0"},
|
||||
"south": {"uv": [11, 0, 11, 16], "texture": "#0"},
|
||||
"west": {"uv": [6, 0, 7, 16], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0, 1], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0, 1], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [-3, 14, 7],
|
||||
"to": [19, 15, 9],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 7, 4, 7.25], "texture": "#1"},
|
||||
"east": {"uv": [0, 0, 0.5, 0.25], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 4, 0.25], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 0.5, 0.25], "texture": "#1"},
|
||||
"up": {"uv": [0, 11.75, 4, 12.25], "texture": "#1"},
|
||||
"down": {"uv": [0, 7.5, 4, 8], "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7, 15, 7],
|
||||
"to": [9, 17, 9],
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 4.25, 3, 4.75], "texture": "#1"},
|
||||
"east": {"uv": [0, 0, 0.5, 0.5], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 0.5, 0.5], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 0.5, 0.5], "texture": "#1"},
|
||||
"up": {"uv": [0, 11.75, 0.5, 12.25], "texture": "#1"},
|
||||
"down": {"uv": [0, 7.5, 0.5, 8], "texture": "#1"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"0": "tfmg:block/pumpjack_crank",
|
||||
"particle": "tfmg:block/pumpjack_crank"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [-2, 2, 6],
|
||||
"to": [18, 6, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [8.5, 0, 10.5, 9], "rotation": 90, "texture": "#0"},
|
||||
"east": {"uv": [2.5, 12.5, 4.5, 14.5], "texture": "#0"},
|
||||
"south": {"uv": [8.5, 0, 10.5, 9], "rotation": 90, "texture": "#0"},
|
||||
"west": {"uv": [2.5, 12.5, 4.5, 14.5], "texture": "#0"},
|
||||
"up": {"uv": [8.5, 0, 10.5, 9], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [8.5, 0, 10.5, 9], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [-3, 13, 2],
|
||||
"to": [0, 14, 14],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11.5, 4, 12], "texture": "#0"},
|
||||
"east": {"uv": [0.5, 8.5, 6.5, 9], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11.5, 4, 12], "texture": "#0"},
|
||||
"west": {"uv": [0.5, 8.5, 6.5, 9], "texture": "#0"},
|
||||
"up": {"uv": [0.5, 9, 6.5, 10.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 3, 12], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [-2, 6, 6],
|
||||
"to": [0, 9, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11, 3.5, 12.5], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 11, 4.5, 12.5], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11, 3.5, 12.5], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 11, 4.5, 12.5], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 2, 4], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 2, 4], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [-2, 0, 6],
|
||||
"to": [0, 2, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11.5, 3.5, 12.5], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 14.5, 4.5, 15.5], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11.5, 3.5, 12.5], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 14.5, 4.5, 15.5], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 2, 4], "texture": "#0"},
|
||||
"down": {"uv": [2.5, 11.5, 4.5, 12.5], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [16, 14, 6],
|
||||
"to": [18, 16, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11, 3.5, 12], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 14.5, 4.5, 15.5], "rotation": 180, "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11, 3.5, 12], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 14.5, 4.5, 15.5], "rotation": 180, "texture": "#0"},
|
||||
"up": {"uv": [2.5, 11, 4.5, 12.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [16, 13, 2],
|
||||
"to": [19, 14, 14],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [3, 11.5, 4.5, 12], "texture": "#0"},
|
||||
"east": {"uv": [0.5, 8.5, 6.5, 9], "texture": "#0"},
|
||||
"south": {"uv": [3, 11.5, 4.5, 12], "texture": "#0"},
|
||||
"west": {"uv": [0.5, 8.5, 6.5, 9], "texture": "#0"},
|
||||
"up": {"uv": [0.5, 9, 6.5, 10.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 3, 12], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [16, 9, 1],
|
||||
"to": [19, 13, 15],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 9.5, 4, 11.5], "texture": "#0"},
|
||||
"east": {"uv": [0, 9, 7, 11], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 9.5, 4, 11.5], "texture": "#0"},
|
||||
"west": {"uv": [0, 9, 7, 11], "texture": "#0"},
|
||||
"up": {"uv": [0, 9, 7, 10.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 9, 7, 10.5], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [16, 6, 6],
|
||||
"to": [18, 9, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11, 3.5, 12.5], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 11, 4.5, 12.5], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11, 3.5, 12.5], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 11, 4.5, 12.5], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [16, 0, 6],
|
||||
"to": [18, 2, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11.5, 3.5, 12.5], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 14.5, 4.5, 15.5], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11.5, 3.5, 12.5], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 14.5, 4.5, 15.5], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"},
|
||||
"down": {"uv": [2.5, 11.5, 4.5, 12.5], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [-2, 14, 6],
|
||||
"to": [0, 16, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11, 3.5, 12], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 14.5, 4.5, 15.5], "rotation": 180, "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11, 3.5, 12], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 14.5, 4.5, 15.5], "rotation": 180, "texture": "#0"},
|
||||
"up": {"uv": [2.5, 11, 4.5, 12.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 2, 4], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [-3, 9, 1],
|
||||
"to": [0, 13, 15],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 9.5, 4, 11.5], "texture": "#0"},
|
||||
"east": {"uv": [0, 9, 7, 11], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 9.5, 4, 11.5], "texture": "#0"},
|
||||
"west": {"uv": [0, 9, 7, 11], "texture": "#0"},
|
||||
"up": {"uv": [0, 9, 7, 10.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 9, 7, 10.5], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"0": "tfmg:block/pumpjack_crank",
|
||||
"1": "tfmg:block/heavy_machinery_casing",
|
||||
"particle": "tfmg:block/pumpjack_crank"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 8, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 4, 8, 8], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 8, 4], "texture": "#0"},
|
||||
"south": {"uv": [0, 4, 8, 8], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 8, 4], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7, 8.01, 1],
|
||||
"to": [9, 8.01, 2],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 4, 0], "texture": "#missing"},
|
||||
"east": {"uv": [0, 0, 2, 0], "texture": "#missing"},
|
||||
"south": {"uv": [0, 0, 4, 0], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 2, 0], "texture": "#missing"},
|
||||
"up": {"uv": [9.5, 3, 10.5, 3.5], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 4, 2], "texture": "#missing"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"0": "tfmg:block/pumpjack_crank",
|
||||
"1": "tfmg:block/heavy_machinery_casing",
|
||||
"particle": "tfmg:block/pumpjack_crank"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [-2, 2, 6],
|
||||
"to": [18, 6, 10],
|
||||
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [8.5, 0, 10.5, 9], "rotation": 90, "texture": "#0"},
|
||||
"east": {"uv": [2.5, 12.5, 4.5, 14.5], "texture": "#0"},
|
||||
"south": {"uv": [8.5, 0, 10.5, 9], "rotation": 90, "texture": "#0"},
|
||||
"west": {"uv": [2.5, 12.5, 4.5, 14.5], "texture": "#0"},
|
||||
"up": {"uv": [8.5, 0, 10.5, 9], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [8.5, 0, 10.5, 9], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [-3, 13, 2],
|
||||
"to": [0, 14, 14],
|
||||
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11.5, 4, 12], "texture": "#0"},
|
||||
"east": {"uv": [0.5, 8.5, 6.5, 9], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11.5, 4, 12], "texture": "#0"},
|
||||
"west": {"uv": [0.5, 8.5, 6.5, 9], "texture": "#0"},
|
||||
"up": {"uv": [0.5, 9, 6.5, 10.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 3, 12], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [-2, 6, 6],
|
||||
"to": [0, 9, 10],
|
||||
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11, 3.5, 12.5], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 11, 4.5, 12.5], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11, 3.5, 12.5], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 11, 4.5, 12.5], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 2, 4], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 2, 4], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [-2, 0, 6],
|
||||
"to": [0, 2, 10],
|
||||
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11.5, 3.5, 12.5], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 14.5, 4.5, 15.5], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11.5, 3.5, 12.5], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 14.5, 4.5, 15.5], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 2, 4], "texture": "#0"},
|
||||
"down": {"uv": [2.5, 11.5, 4.5, 12.5], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [16, 14, 6],
|
||||
"to": [18, 16, 10],
|
||||
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11, 3.5, 12], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 14.5, 4.5, 15.5], "rotation": 180, "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11, 3.5, 12], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 14.5, 4.5, 15.5], "rotation": 180, "texture": "#0"},
|
||||
"up": {"uv": [2.5, 11, 4.5, 12.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [16, 13, 2],
|
||||
"to": [19, 14, 14],
|
||||
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [3, 11.5, 4.5, 12], "texture": "#0"},
|
||||
"east": {"uv": [0.5, 8.5, 6.5, 9], "texture": "#0"},
|
||||
"south": {"uv": [3, 11.5, 4.5, 12], "texture": "#0"},
|
||||
"west": {"uv": [0.5, 8.5, 6.5, 9], "texture": "#0"},
|
||||
"up": {"uv": [0.5, 9, 6.5, 10.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 3, 12], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [16, 9, 1],
|
||||
"to": [19, 13, 15],
|
||||
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 9.5, 4, 11.5], "texture": "#0"},
|
||||
"east": {"uv": [0, 9, 7, 11], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 9.5, 4, 11.5], "texture": "#0"},
|
||||
"west": {"uv": [0, 9, 7, 11], "texture": "#0"},
|
||||
"up": {"uv": [0, 9, 7, 10.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 9, 7, 10.5], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [16, 6, 6],
|
||||
"to": [18, 9, 10],
|
||||
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11, 3.5, 12.5], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 11, 4.5, 12.5], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11, 3.5, 12.5], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 11, 4.5, 12.5], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [16, 0, 6],
|
||||
"to": [18, 2, 10],
|
||||
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11.5, 3.5, 12.5], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 14.5, 4.5, 15.5], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11.5, 3.5, 12.5], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 14.5, 4.5, 15.5], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 2, 4], "rotation": 180, "texture": "#0"},
|
||||
"down": {"uv": [2.5, 11.5, 4.5, 12.5], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [-2, 14, 6],
|
||||
"to": [0, 16, 10],
|
||||
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 11, 3.5, 12], "texture": "#0"},
|
||||
"east": {"uv": [2.5, 14.5, 4.5, 15.5], "rotation": 180, "texture": "#0"},
|
||||
"south": {"uv": [2.5, 11, 3.5, 12], "texture": "#0"},
|
||||
"west": {"uv": [2.5, 14.5, 4.5, 15.5], "rotation": 180, "texture": "#0"},
|
||||
"up": {"uv": [2.5, 11, 4.5, 12.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 2, 4], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [-3, 9, 1],
|
||||
"to": [0, 13, 15],
|
||||
"rotation": {"angle": 0, "axis": "x", "origin": [8, 4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [2.5, 9.5, 4, 11.5], "texture": "#0"},
|
||||
"east": {"uv": [0, 9, 7, 11], "texture": "#0"},
|
||||
"south": {"uv": [2.5, 9.5, 4, 11.5], "texture": "#0"},
|
||||
"west": {"uv": [0, 9, 7, 11], "texture": "#0"},
|
||||
"up": {"uv": [0, 9, 7, 10.5], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 9, 7, 10.5], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 8, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 4, 8, 8], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 8, 4], "texture": "#0"},
|
||||
"south": {"uv": [0, 4, 8, 8], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 8, 4], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#1"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"0": "tfmg:block/fossilstone",
|
||||
"particle": "tfmg:block/fossilstone"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [8, 0, 7.5],
|
||||
"to": [8, 20, 8.5],
|
||||
"faces": {
|
||||
"north": {"uv": [6, 0, 6, 16], "texture": "#0"},
|
||||
"east": {"uv": [4, 0, 5, 16], "texture": "#0"},
|
||||
"south": {"uv": [2, 0, 2, 16], "texture": "#0"},
|
||||
"west": {"uv": [12, 0, 13, 16], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0, 1], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0, 1], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.5, 0, 8],
|
||||
"to": [8.5, 20, 8],
|
||||
"faces": {
|
||||
"north": {"uv": [6, 0, 7, 16], "texture": "#0"},
|
||||
"east": {"uv": [4, 0, 4, 16], "texture": "#0"},
|
||||
"south": {"uv": [2, 0, 3, 16], "texture": "#0"},
|
||||
"west": {"uv": [12, 0, 12, 16], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 0, 1], "rotation": 270, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 0, 1], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# Made in Blockbench 4.6.5
|
||||
newmtl m_fe4f30a7-7eab-73c8-02da-55eaec181ae2
|
||||
map_Kd #0
|
||||
@@ -0,0 +1,95 @@
|
||||
# Made in Blockbench 4.7.4
|
||||
mtllib pumpjack_hammer.mtl
|
||||
|
||||
o cube
|
||||
v 0.8124999999999925 -0.25000000000000255 2.2500000000000018
|
||||
v 0.18749999999999256 -0.25000000000000366 2.2499999999999982
|
||||
v 0.8124999999999893 -0.25000000000000366 2.8125000000000018
|
||||
v 0.18749999999998956 -0.2500000000000048 2.8124999999999982
|
||||
v 0.18749999999999023 1.062499999999996 2.250000000000001
|
||||
v 0.8124999999999902 1.0624999999999973 2.2500000000000044
|
||||
v 0.18749999999998712 1.0624999999999951 2.8125000000000004
|
||||
v 0.8124999999999871 1.062499999999996 2.812500000000004
|
||||
vt 0.0859375 1
|
||||
vt 0.25 1
|
||||
vt 0.25 0.921875
|
||||
vt 0.0859375 0.921875
|
||||
vt 0 0.921875
|
||||
vt 0 1
|
||||
vt 0.0703125 1
|
||||
vt 0.0703125 0.921875
|
||||
vt 0.0859375 1
|
||||
vt 0.25 1
|
||||
vt 0.25 0.921875
|
||||
vt 0.0859375 0.921875
|
||||
vt 0 0.921875
|
||||
vt 0 1
|
||||
vt 0.0703125 1
|
||||
vt 0.0703125 0.921875
|
||||
vt 0 0.9140625
|
||||
vt 0.1640625 0.9140625
|
||||
vt 0.1640625 0.84375
|
||||
vt 0 0.84375
|
||||
vt 0 0.9140625
|
||||
vt 0.1640625 0.9140625
|
||||
vt 0.1640625 0.84375
|
||||
vt 0 0.84375
|
||||
vn -1 -1.7763568394002404e-15 -5.440092820663271e-15
|
||||
vn 1.665334536937746e-15 -1 -1.9984014443252727e-15
|
||||
vn 1 1.7763568394002404e-15 5.440092820663271e-15
|
||||
vn -1.665334536937746e-15 1 1.9984014443252727e-15
|
||||
vn 5.5511151231257795e-15 1.887379141862776e-15 -1
|
||||
vn -5.5511151231257795e-15 -1.887379141862776e-15 1
|
||||
usemtl m_fe4f30a7-7eab-73c8-02da-55eaec181ae2
|
||||
f 4/4/1 7/3/1 5/2/1 2/1/1
|
||||
f 3/8/2 4/7/2 2/6/2 1/5/2
|
||||
f 8/12/3 3/11/3 1/10/3 6/9/3
|
||||
f 7/16/4 8/15/4 6/14/4 5/13/4
|
||||
f 6/20/5 1/19/5 2/18/5 5/17/5
|
||||
f 7/24/6 4/23/6 3/22/6 8/21/6
|
||||
o octagon
|
||||
v 0.25444173824157956 0.1250000000000231 -2.0625
|
||||
v 0.25444173824158034 0.8750000000000231 -2.062499999999994
|
||||
v 0.25444173824160066 0.12499999999998579 2.2499999999999982
|
||||
v 0.25444173824160143 0.8749999999999858 2.250000000000005
|
||||
v 0.7544417382415802 0.8750000000000226 -2.0624999999999964
|
||||
v 0.7544417382415796 0.12500000000002265 -2.0625000000000027
|
||||
v 0.7544417382416015 0.8749999999999853 2.2500000000000027
|
||||
v 0.7544417382416007 0.12499999999998523 2.2499999999999956
|
||||
vt 0 0.7734375
|
||||
vt 0 0.8359375
|
||||
vt 0.5390625 0.8359375
|
||||
vt 0.5390625 0.7734375
|
||||
vt 0 0.671875
|
||||
vt 0 0.765625
|
||||
vt 0.5390625 0.765625
|
||||
vt 0.5390625 0.671875
|
||||
vt 0 0.7734375
|
||||
vt 0 0.8359375
|
||||
vt 0.5390625 0.8359375
|
||||
vt 0.5390625 0.7734375
|
||||
vt 0 0.671875
|
||||
vt 0 0.765625
|
||||
vt 0.5390625 0.765625
|
||||
vt 0.5390625 0.671875
|
||||
vt 0.171875 0.8515625
|
||||
vt 0.171875 0.9140625
|
||||
vt 0.265625 0.9140625
|
||||
vt 0.265625 0.8515625
|
||||
vt 0 1
|
||||
vt 0.0625 1
|
||||
vt 0.0625 0.9375
|
||||
vt 0 0.9375
|
||||
vn 1.0106430996149036e-15 1 8.659739592076216e-15
|
||||
vn -1 1.010643099614861e-15 4.887165570769081e-15
|
||||
vn -1.0106430996149036e-15 -1 -8.659739592076216e-15
|
||||
vn 1 -1.010643099614861e-15 -4.887165570769081e-15
|
||||
vn -4.887165570769073e-15 8.659739592076226e-15 -1
|
||||
vn 4.887165570769073e-15 -8.659739592076226e-15 1
|
||||
usemtl m_fe4f30a7-7eab-73c8-02da-55eaec181ae2
|
||||
f 12/28/7 15/27/7 13/26/7 10/25/7
|
||||
f 11/32/8 12/31/8 10/30/8 9/29/8
|
||||
f 16/36/9 11/35/9 9/34/9 14/33/9
|
||||
f 15/40/10 16/39/10 14/38/10 13/37/10
|
||||
f 14/44/11 9/43/11 10/42/11 13/41/11
|
||||
f 15/48/12 12/47/12 11/46/12 16/45/12
|
||||
|
After Width: | Height: | Size: 331 B |
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"parent": "minecraft:block/block",
|
||||
"texture_size": [32, 32],
|
||||
"textures": {
|
||||
"0": "tfmg:block/aluminum_post",
|
||||
"1": "tfmg:block/steel_truss",
|
||||
"particle": "tfmg:block/aluminum_post"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 6, 6],
|
||||
"to": [16, 10, 10],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 2, 8], "rotation": 90, "texture": "#0"},
|
||||
"east": {"uv": [8, 0, 10, 2], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 2, 8], "rotation": 90, "texture": "#0"},
|
||||
"west": {"uv": [8, 0, 10, 2], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 2, 8], "rotation": 90, "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 2, 8], "rotation": 90, "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [1, 0, 2],
|
||||
"to": [1, 16, 14],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0, 8], "texture": "#1"},
|
||||
"east": {"uv": [2, 0, 14, 16], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 0, 8], "texture": "#1"},
|
||||
"west": {"uv": [2, 0, 14, 16], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 6, 0], "rotation": 90, "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 6, 0], "rotation": 270, "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [2, 16, 2],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"east": {"uv": [0, 0, 3, 16], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 2, 2], "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 2, 2], "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [14, 0, 0],
|
||||
"to": [16, 16, 2],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"east": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 2, 2], "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 2, 2], "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 14],
|
||||
"to": [2, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"east": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 2, 2], "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 2, 2], "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [14, 0, 14],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1, 8], "texture": "#1"},
|
||||
"east": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 2, 2], "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 2, 2], "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 0, 2],
|
||||
"to": [15, 16, 14],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 0, 8], "texture": "#1"},
|
||||
"east": {"uv": [2, 0, 14, 16], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 0, 8], "texture": "#1"},
|
||||
"west": {"uv": [2, 0, 14, 16], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 6, 0], "rotation": 90, "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 6, 0], "rotation": 270, "texture": "#1"}
|
||||
}
|
||||
}
|
||||
],
|
||||
"groups": [
|
||||
{
|
||||
"name": "bone",
|
||||
"origin": [0, 0, 0],
|
||||
"color": 0,
|
||||
"nbt": "{}",
|
||||
"children": []
|
||||
},
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 273 B |
|
After Width: | Height: | Size: 243 B |
|
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 243 B |
BIN
src/main/resources/assets/tfmg/textures/block/machine_input.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 332 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1.1 KiB |