blast furnace stuff

This commit is contained in:
DrMangoTea
2023-10-06 17:23:56 +02:00
parent 2a21a5f629
commit 549b09f635
109 changed files with 1456 additions and 914 deletions

View File

@@ -1,2 +1,2 @@
// 1.19.2 2023-09-28T15:00:28.8590663 Create: The Factory Must Grow's lang merger
f07ccd29029a20ee86d4dcf16df9f5711b1728a9 assets/tfmg/lang/en_us.json
// 1.19.2 2023-09-30T14:59:41.5616989 Create: The Factory Must Grow's lang merger
edc972fa77e26fb6efb1cae553a9252d3b84e6d7 assets/tfmg/lang/en_us.json

View File

@@ -161,6 +161,7 @@
"create.goggles.coke_oven.progress": "Progress: %1$s",
"create.goggles.misc.percent_symboll": "%",
"create.goggles.misc.percent_symbol": "%",
"create.goggles.blast_furnace.invalid": "Blast Furnace is Not Built Correctly",
"_": "->------------------------] UI & Messages [------------------------<-",
@@ -191,12 +192,11 @@
"create.goggles.blast_furnace.fuel_amount": "Fuel Amount: %1$s",
"create.goggles.blast_furnace.item_count": "Item Count: %1$s",
"create.goggles.blast_furnace.height": "Height: %1$s",
"create.goggles.blast_furnace.reinforcement_height": "Reinforcement Height: %1$s",
"create.goggles.blast_furnace.status.off": "Status: Off",
"create.goggles.blast_furnace.status.off": "Status: Idle",
"create.goggles.blast_furnace.status.running": "Status: Running",
"create.goggles.blast_furnace.status.finished": "Status: Process Finished",
"create.goggles.blast_furnace.diameter.one": "Diameter: 1",
"create.goggles.blast_furnace.diameter.two": "Diameter: 2",
"create.goggles.blast_furnace.invalid": "Blast Furnace is Not Built Correctly",
"create.goggles.coke_oven.status": "Coke Oven:",
"create.goggles.coke_oven.fluid_amount_output": "Fluid Amount In Internal Tank: %1$s mb",
"create.goggles.coke_oven.fluid_amount_exhaust": "Carbon Dioxide: %1$s mb",

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg;
import com.drmangotea.tfmg.base.TFMGLangPartials;
import com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades.fire.TFMGColoredFires;
import com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades.fire.TFMGColoredFires;
import com.drmangotea.tfmg.registry.*;
import com.drmangotea.tfmg.worldgen.TFMGConfiguredFeatures;
import com.drmangotea.tfmg.worldgen.TFMGFeatures;

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg;
import com.drmangotea.tfmg.content.gadgets.quad_potato_cannon.QuadPotatoCannonRenderHandler;
import com.drmangotea.tfmg.blocks.gadgets.quad_potato_cannon.QuadPotatoCannonRenderHandler;
import com.drmangotea.tfmg.registry.TFMGPartialModels;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;

View File

@@ -1,10 +1,9 @@
package com.drmangotea.tfmg.base;
import com.drmangotea.tfmg.content.decoration.doors.TFMGSlidingDoorBlock;
import com.drmangotea.tfmg.blocks.decoration.doors.TFMGSlidingDoorBlock;
import com.simibubi.create.AllTags;
import com.simibubi.create.content.contraptions.behaviour.DoorMovingInteraction;
import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorMovementBehaviour;
import com.simibubi.create.content.kinetics.BlockStressDefaults;
import com.simibubi.create.foundation.data.AssetLookup;
import com.simibubi.create.foundation.data.ModelGen;
import com.simibubi.create.foundation.data.SharedProperties;

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg.base.spark;
import com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades.fire.BlueFireBlock;
import com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades.fire.BlueFireBlock;
import com.drmangotea.tfmg.registry.TFMGEntityTypes;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.simibubi.create.content.trains.CubeParticleData;

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg.base.spark;
import com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades.fire.GreenFireBlock;
import com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades.fire.GreenFireBlock;
import com.drmangotea.tfmg.registry.TFMGEntityTypes;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.simibubi.create.content.trains.CubeParticleData;

View File

@@ -1,22 +1,12 @@
package com.drmangotea.tfmg.content.concrete;
package com.drmangotea.tfmg.blocks.concrete;
import com.drmangotea.tfmg.CreateTFMG;
import com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades.ThermiteGrenade;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.animal.Sheep;
import net.minecraft.world.entity.projectile.Arrow;
import net.minecraft.world.level.GameRules;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.LavaFluid;
import net.minecraftforge.fluids.ForgeFlowingFluid;
public class ConcreteFluid extends ForgeFlowingFluid {

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.concrete;
package com.drmangotea.tfmg.blocks.concrete;
@@ -8,11 +8,8 @@ import com.simibubi.create.foundation.utility.Color;
import com.tterrag.registrate.builders.FluidBuilder;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.MoverType;
import net.minecraft.world.level.BlockAndTintGetter;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.phys.Vec3;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.concrete.formwork;
package com.drmangotea.tfmg.blocks.concrete.formwork;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.simibubi.create.content.equipment.wrench.IWrenchable;

View File

@@ -1,10 +1,7 @@
package com.drmangotea.tfmg.content.concrete.formwork;
package com.drmangotea.tfmg.blocks.concrete.formwork;
import com.drmangotea.tfmg.CreateTFMG;
import com.drmangotea.tfmg.content.machines.TFMGMachineBlockEntity;
import com.drmangotea.tfmg.blocks.machines.TFMGMachineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGFluids;
import com.simibubi.create.api.connectivity.ConnectivityHandler;
import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity;
import com.simibubi.create.foundation.fluid.SmartFluidTank;
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
import net.minecraft.core.BlockPos;
@@ -14,7 +11,6 @@ import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidType;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.templates.FluidTank;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.concrete.formwork;
package com.drmangotea.tfmg.blocks.concrete.formwork;
import com.simibubi.create.Create;
import com.simibubi.create.content.logistics.chute.ChuteBlock;

View File

@@ -1,27 +1,21 @@
package com.drmangotea.tfmg.content.concrete.formwork;
package com.drmangotea.tfmg.blocks.concrete.formwork;
import com.drmangotea.tfmg.CreateTFMG;
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.AllPartialModels;
import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity;
import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer;
import com.simibubi.create.foundation.fluid.FluidRenderer;
import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
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.util.Mth;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.templates.FluidTank;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.decoration.doors;
package com.drmangotea.tfmg.blocks.decoration.doors;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.decoration.doors;
package com.drmangotea.tfmg.blocks.decoration.doors;
import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlockEntity;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.decoration.doors;
package com.drmangotea.tfmg.blocks.decoration.doors;
import com.drmangotea.tfmg.registry.TFMGPartialModels;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.deposits;
package com.drmangotea.tfmg.blocks.deposits;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.deposits;
package com.drmangotea.tfmg.blocks.deposits;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.deposits.surface_scanner;
package com.drmangotea.tfmg.blocks.deposits.surface_scanner;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
@@ -16,7 +16,7 @@ import net.minecraft.world.level.pathfinder.PathComputationType;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
public class SurfaceScannerBlock extends HorizontalKineticBlock implements IBE<SurfaceScannerTileEntity> {
public class SurfaceScannerBlock extends HorizontalKineticBlock implements IBE<SurfaceScannerBlockEntity> {
@@ -58,12 +58,12 @@ public class SurfaceScannerBlock extends HorizontalKineticBlock implements IBE<S
}
@Override
public Class<SurfaceScannerTileEntity> getBlockEntityClass() {
return SurfaceScannerTileEntity.class;
public Class<SurfaceScannerBlockEntity> getBlockEntityClass() {
return SurfaceScannerBlockEntity.class;
}
@Override
public BlockEntityType<? extends SurfaceScannerTileEntity> getBlockEntityType() {
public BlockEntityType<? extends SurfaceScannerBlockEntity> getBlockEntityType() {
return TFMGBlockEntities.SURFACE_SCANNER.get();
}

View File

@@ -1,8 +1,7 @@
package com.drmangotea.tfmg.content.deposits.surface_scanner;
package com.drmangotea.tfmg.blocks.deposits.surface_scanner;
import com.drmangotea.tfmg.content.deposits.FluidDepositBlockEntity;
import com.simibubi.create.AllSoundEvents;
import com.drmangotea.tfmg.blocks.deposits.FluidDepositBlockEntity;
import com.simibubi.create.Create;
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
import com.simibubi.create.content.equipment.wrench.IWrenchable;
@@ -23,7 +22,7 @@ import net.minecraft.world.level.block.state.BlockState;
import java.util.List;
public class SurfaceScannerTileEntity extends KineticBlockEntity implements IHaveGoggleInformation, IWrenchable {
public class SurfaceScannerBlockEntity extends KineticBlockEntity implements IHaveGoggleInformation, IWrenchable {
public FluidDepositBlockEntity deposit;
public BlockPos checkedPosition;
public boolean foundDeposit=false;
@@ -44,7 +43,7 @@ public class SurfaceScannerTileEntity extends KineticBlockEntity implements IHav
public LerpedFloat visualFlagAngle = LerpedFloat.angular();
public float flagAngle = 0;
public SurfaceScannerTileEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) {
public SurfaceScannerBlockEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) {
super(typeIn, pos, state);
}

View File

@@ -1,23 +1,20 @@
package com.drmangotea.tfmg.content.deposits.surface_scanner;
package com.drmangotea.tfmg.blocks.deposits.surface_scanner;
import com.drmangotea.tfmg.registry.TFMGPartialModels;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.kinetics.base.HorizontalKineticBlock;
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;
import com.simibubi.create.content.kinetics.clock.CuckooClockBlock;
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 SurfaceScannerRenderer extends KineticBlockEntityRenderer<SurfaceScannerTileEntity> {
public class SurfaceScannerRenderer extends KineticBlockEntityRenderer<SurfaceScannerBlockEntity> {
public SurfaceScannerRenderer(BlockEntityRendererProvider.Context context) {
super(context);
@@ -26,14 +23,14 @@ public class SurfaceScannerRenderer extends KineticBlockEntityRenderer<SurfaceSc
@Override
protected SuperByteBuffer getRotatedModel(SurfaceScannerTileEntity be, BlockState state) {
protected SuperByteBuffer getRotatedModel(SurfaceScannerBlockEntity be, BlockState state) {
return CachedBufferer.partialFacing(AllPartialModels.SHAFT_HALF, state, state
.getValue(HorizontalKineticBlock.HORIZONTAL_FACING)
.getOpposite());
}
@Override
protected void renderSafe(SurfaceScannerTileEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
protected void renderSafe(SurfaceScannerBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) {
super.renderSafe(be, partialTicks, ms, buffer, light, overlay);

View File

@@ -1,9 +1,8 @@
package com.drmangotea.tfmg.content.fluids;
package com.drmangotea.tfmg.blocks.fluids;
import net.minecraft.core.BlockPos;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.material.Fluid;
import net.minecraft.world.level.material.FluidState;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.gadgets.explosives.napalm;
package com.drmangotea.tfmg.blocks.gadgets.explosives.napalm;
import net.minecraft.core.BlockPos;
import net.minecraft.sounds.SoundEvents;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.gadgets.explosives.napalm;
package com.drmangotea.tfmg.blocks.gadgets.explosives.napalm;
import com.drmangotea.tfmg.base.spark.Spark;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.gadgets.explosives.napalm;
package com.drmangotea.tfmg.blocks.gadgets.explosives.napalm;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.mojang.blaze3d.vertex.PoseStack;

View File

@@ -0,0 +1,7 @@
package com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades;
public enum ChemicalColor {
BASE,
GREEN,
BLUE
}

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades;
package com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades;
import com.drmangotea.tfmg.base.spark.BlueSpark;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades;
package com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades;
import com.drmangotea.tfmg.registry.TFMGEntityTypes;
import net.minecraft.sounds.SoundEvents;

View File

@@ -1,10 +1,9 @@
package com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades;
package com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Vector3f;
import com.simibubi.create.content.fluids.tank.FluidTankBlock;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.block.model.ItemTransforms;
import net.minecraft.client.renderer.entity.EntityRenderer;
@@ -13,8 +12,6 @@ import net.minecraft.client.renderer.entity.ItemRenderer;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.client.renderer.texture.TextureAtlas;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

View File

@@ -1,6 +1,5 @@
package com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades.fire;
package com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades.fire;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.google.common.collect.ImmutableMap;
import it.unimi.dsi.fastutil.objects.Object2IntMap;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;

View File

@@ -1,6 +1,5 @@
package com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades.fire;
package com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades.fire;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.google.common.collect.ImmutableMap;
import it.unimi.dsi.fastutil.objects.Object2IntMap;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades.fire;
package com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades.fire;
import com.drmangotea.tfmg.CreateTFMG;
import net.minecraft.world.level.block.Block;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.gadgets.quad_potato_cannon;
package com.drmangotea.tfmg.blocks.gadgets.quad_potato_cannon;
import com.drmangotea.tfmg.CreateTFMGClient;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.gadgets.quad_potato_cannon;
package com.drmangotea.tfmg.blocks.gadgets.quad_potato_cannon;
import com.drmangotea.tfmg.CreateTFMGClient;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.gadgets.quad_potato_cannon;
package com.drmangotea.tfmg.blocks.gadgets.quad_potato_cannon;
import com.drmangotea.tfmg.registry.TFMGItems;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines;
package com.drmangotea.tfmg.blocks.machines;
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;

View File

@@ -1,7 +1,6 @@
package com.drmangotea.tfmg.content.machines.metal_processing.blast_furnace.blast_furnace_output;
package com.drmangotea.tfmg.blocks.machines.metal_processing.blast_furnace;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.block.Block;

View File

@@ -0,0 +1,855 @@
package com.drmangotea.tfmg.blocks.machines.metal_processing.blast_furnace;
import com.drmangotea.tfmg.CreateTFMG;
import com.drmangotea.tfmg.blocks.machines.TFMGMachineBlockEntity;
import com.drmangotea.tfmg.recipes.industrial_blasting.IndustrialBlastingRecipe;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.drmangotea.tfmg.registry.TFMGRecipeTypes;
import com.simibubi.create.Create;
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
import com.simibubi.create.foundation.item.SmartInventory;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.LangBuilder;
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
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.entity.item.ItemEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
import net.minecraftforge.items.wrapper.RecipeWrapper;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
public class BlastFurnaceOutputBlockEntity extends TFMGMachineBlockEntity implements IHaveGoggleInformation {
public BlastFurnaceType type;
public Direction outputFacing = getBlockState().getValue(FACING);
public BlockPos mainFloor;
public int height=2;
public int reinforcementHeight = 0;
public int validHeight =0;
public float blastFurnaceLevel =0;
public float fuelEfficiency =1000;
public float speedModifier = 1;
public int timer = -1;
public IndustrialBlastingRecipe recipe;
public LerpedFloat coalCokeHeight = LerpedFloat.linear();
//item storage
public LazyOptional<IItemHandlerModifiable> itemCapability;
public SmartInventory inputInventory;
public SmartInventory fuelInventory;
int debug = 0;
public BlastFurnaceOutputBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
inputInventory = new SmartInventory(1, this).forbidInsertion()
.withMaxStackSize(64);
fuelInventory = new SmartInventory(1, this).forbidInsertion()
.withMaxStackSize(64);
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(inputInventory,fuelInventory));
}
@Override
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
super.addBehaviours(behaviours);
}
public void tick(){
super.tick();
manageMoltenMetal();
if(type== BlastFurnaceType.SMALL) {
blastFurnaceLevel = ((float) validHeight / 2) - 1;
blastFurnaceLevel = (float) Math.min(blastFurnaceLevel,2.5);
}
if(type== BlastFurnaceType.BIG_LEFT||type== BlastFurnaceType.BIG_RIGHT){
blastFurnaceLevel = validHeight;
blastFurnaceLevel = Math.min(blastFurnaceLevel,15);
}
if(speedModifier!=0) {
fuelEfficiency = 1000 * speedModifier;
speedModifier = (blastFurnaceLevel/2);
}else {
fuelEfficiency = 1000;
speedModifier = 1;
}
outputFacing = getBlockState().getValue(FACING);
coalCokeHeight.chase(fuelInventory.getStackInSlot(0).getCount()+inputInventory.getStackInSlot(0).getCount(), 0.1f, LerpedFloat.Chaser.EXP);
coalCokeHeight.tickChaser();
checkType();
if(reinforcementHeight<2) {
type = BlastFurnaceType.INVALID;
return;
}
if(type == BlastFurnaceType.INVALID)
return;
int maxLevelByReinforcements = reinforcementHeight*2;
validHeight = Math.min(maxLevelByReinforcements,height);
if(height<4) {
type = BlastFurnaceType.INVALID;
return;
}
if(recipe !=null)
if(timer == -1&&
(tank1.getPrimaryHandler().getFluidAmount()+recipe.getFluidResults().get(0).getAmount())<=tank1.getPrimaryHandler().getCapacity()&&
(tank2.getPrimaryHandler().getFluidAmount()+recipe.getFluidResults().get(1).getAmount())<=tank2.getPrimaryHandler().getCapacity()&&
type != BlastFurnaceType.INVALID
) {
timer= (int) (recipe.getProcessingDuration()/speedModifier);
inputInventory.getStackInSlot(0).setCount(inputInventory.getStackInSlot(0).getCount()-1);
}
RecipeWrapper inventoryIn = new RecipeWrapper(inputInventory);
if (recipe == null || !recipe.matches(inventoryIn, level)) {
Optional<IndustrialBlastingRecipe> recipe = TFMGRecipeTypes.INDUSTRIAL_BLASTING.find(inventoryIn, level);
if (!recipe.isPresent()) {
timer = -1;
sendData();
} else {
this.recipe = recipe.get();
sendData();
}
}
acceptInsertedItems();
if(recipe!=null)
if(fuelInventory.isEmpty()){
timer= (int) (recipe.getProcessingDuration()/speedModifier);
}
if(type != BlastFurnaceType.INVALID&&timer>0&&
(tank1.getPrimaryHandler().getFluidAmount()+recipe.getFluidResults().get(0).getAmount())<=tank1.getPrimaryHandler().getCapacity()&&
(tank2.getPrimaryHandler().getFluidAmount()+recipe.getFluidResults().get(1).getAmount())<=tank2.getPrimaryHandler().getCapacity()) {
timer--;
int random = Create.RANDOM.nextInt((int) fuelEfficiency);
if(random == 69)
fuelInventory.getStackInSlot(0).shrink(1);
}
if(timer == 0){
process();
timer = -1;
}
}
public void manageMoltenMetal(){
BlockPos posToSpawn;
BlockPos posToSpawn1;
BlockPos posToSpawn2;
BlockPos posToSpawn3;
BlockPos posToSpawn4;
BlockPos posToSpawn5;
if (timer>0&&type == BlastFurnaceType.SMALL) {
posToSpawn = this.getBlockPos().relative(outputFacing.getOpposite()).above();
level.setBlock(posToSpawn, TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn.above(), TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
}
//////
if (timer>0&&type == BlastFurnaceType.BIG_LEFT) {
posToSpawn = this.getBlockPos().relative(outputFacing.getOpposite()).above();
posToSpawn1 = this.getBlockPos().relative(outputFacing.getOpposite(),2).above();
posToSpawn2 = this.getBlockPos().relative(outputFacing.getOpposite()).above().relative(outputFacing.getCounterClockWise());
posToSpawn3 = this.getBlockPos().relative(outputFacing.getOpposite(),2).above().relative(outputFacing.getCounterClockWise());
level.setBlock(posToSpawn, TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn1, TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn2, TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn3, TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn.above(), TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn1.above(), TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn2.above(), TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn3.above(), TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
}
////////
if (timer>0&&type == BlastFurnaceType.BIG_RIGHT) {
posToSpawn = this.getBlockPos().relative(outputFacing.getOpposite()).above();
posToSpawn1 = this.getBlockPos().relative(outputFacing.getOpposite(),2).above();
posToSpawn2 = this.getBlockPos().relative(outputFacing.getOpposite()).above().relative(outputFacing.getClockWise());
posToSpawn3 = this.getBlockPos().relative(outputFacing.getOpposite(),2).above().relative(outputFacing.getClockWise());
level.setBlock(posToSpawn, TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn1, TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn2, TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn3, TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn.above(), TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn1.above(), TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn2.above(), TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
level.setBlock(posToSpawn3.above(), TFMGBlocks.MOLTEN_METAL.getDefaultState(),3);
}
// if (timer<=0) {
// posToSpawn = this.getBlockPos().relative(outputFacing.getOpposite()).above();
// posToSpawn1 = this.getBlockPos().relative(outputFacing.getOpposite(),2).above();
// posToSpawn2 = this.getBlockPos().relative(outputFacing.getOpposite()).above().relative(outputFacing.getClockWise());
// posToSpawn3 = this.getBlockPos().relative(outputFacing.getOpposite(),2).above().relative(outputFacing.getClockWise());
// posToSpawn4 = this.getBlockPos().relative(outputFacing.getOpposite()).above().relative(outputFacing.getCounterClockWise());
// posToSpawn5 = this.getBlockPos().relative(outputFacing.getOpposite(),2).above().relative(outputFacing.getCounterClockWise());
// if(level.getBlockState(posToSpawn).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn, Blocks.AIR.defaultBlockState(),3);
// if(level.getBlockState(posToSpawn1).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn1, Blocks.AIR.defaultBlockState(),3);
// if(level.getBlockState(posToSpawn2).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn2, Blocks.AIR.defaultBlockState(),3);
// if(level.getBlockState(posToSpawn3).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn3, Blocks.AIR.defaultBlockState(),3);
// if(level.getBlockState(posToSpawn4).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn4, Blocks.AIR.defaultBlockState(),3);
// if(level.getBlockState(posToSpawn5).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn5, Blocks.AIR.defaultBlockState(),3);
//
// if(level.getBlockState(posToSpawn.above()).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn.above(), Blocks.AIR.defaultBlockState(),3);
// if(level.getBlockState(posToSpawn1.above()).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn1.above(), Blocks.AIR.defaultBlockState(),3);
// if(level.getBlockState(posToSpawn2.above()).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn2.above(), Blocks.AIR.defaultBlockState(),3);
// if(level.getBlockState(posToSpawn3.above()).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn3.above(), Blocks.AIR.defaultBlockState(),3);
// if(level.getBlockState(posToSpawn4.above()).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn4.above(), Blocks.AIR.defaultBlockState(),3);
// if(level.getBlockState(posToSpawn5.above()).is(TFMGBlocks.MOLTEN_METAL.get()))
// level.setBlock(posToSpawn5.above(), Blocks.AIR.defaultBlockState(),3);
// }
}
@Override
protected AABB createRenderBoundingBox() {
int x = getBlockPos().getX();
int y = getBlockPos().getY();
int z = getBlockPos().getZ();
return new AABB(x-10,y-10,z-10,x+10,y+10,z+10);
}
public void process() {
if (level.isClientSide)
return;
// RecipeWrapper inventoryIn = new RecipeWrapper(inputInventory);
// if (recipe == null || !recipe.matches(inventoryIn, level)) {
// Optional<IndustrialBlastingRecipe> recipe = TFMGRecipeTypes.INDUSTRIAL_BLASTING.find(inventoryIn, level);
// if (!recipe.isPresent())
// return;
// this.recipe = recipe.get();
// }
tank1.getPrimaryHandler().setFluid(new FluidStack(recipe.getFluidResults().get(0).getFluid(), tank1.getPrimaryHandler().getFluidAmount()+recipe.getFluidResults().get(0).getAmount()));
tank2.getPrimaryHandler().setFluid(new FluidStack(recipe.getFluidResults().get(1).getFluid(), tank2.getPrimaryHandler().getFluidAmount()+recipe.getFluidResults().get(1).getAmount()));
}
public void acceptInsertedItems(){
List<ItemEntity> itemsToPick = getItemsToPick(type);
for(ItemEntity itemEntity : itemsToPick){
ItemStack itemStack = itemEntity.getItem();
if(itemStack.is(TFMGItems.COAL_COKE_DUST.get())){
int freeSpace = fuelInventory.getStackInSlot(0).getMaxStackSize()-fuelInventory.getStackInSlot(0).getCount();
int coalCokeCount = itemStack.getCount();
//if(itemStack == ItemStack.EMPTY)
// continue;
if(coalCokeCount>freeSpace){
itemStack.setCount(itemStack.getCount()-freeSpace);
fuelInventory.setItem(0 ,new ItemStack (TFMGItems.COAL_COKE_DUST.get(),fuelInventory.getStackInSlot(0).getCount()+freeSpace));
}else {
fuelInventory.setItem(0 ,new ItemStack (TFMGItems.COAL_COKE_DUST.get(),fuelInventory.getStackInSlot(0).getCount()+itemStack.getCount()));
itemEntity.discard();
}
} else {
int freeSpace = inputInventory.getStackInSlot(0).getMaxStackSize()-inputInventory.getStackInSlot(0).getCount();
int count = itemStack.getCount();
if(!inputInventory.isEmpty())
if(!inputInventory.getItem(0).is(itemStack.getItem()))
continue;
if(count>freeSpace){
itemStack.setCount(itemStack.getCount()-freeSpace);
inputInventory.setItem(0 ,new ItemStack (itemStack.getItem(),inputInventory.getStackInSlot(0).getCount()+freeSpace));
}else {
inputInventory.setItem(0 ,new ItemStack (itemStack.getItem(),inputInventory.getStackInSlot(0).getCount()+itemStack.getCount()));
itemEntity.discard();
}
}
}
}
@Override
@SuppressWarnings("removal")
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
if(type == BlastFurnaceType.INVALID){
Lang.translate("goggles.blast_furnace.invalid")
.style(ChatFormatting.RED)
.forGoggles(tooltip,1);
} else {
Lang.translate("goggles.blast_furnace.stats")
.style(ChatFormatting.GRAY)
.forGoggles(tooltip,1);
if(timer > 0) {
Lang.translate("goggles.blast_furnace.status.running")
.style(ChatFormatting.YELLOW)
.forGoggles(tooltip, 1);
}else
Lang.translate("goggles.blast_furnace.status.off")
.style(ChatFormatting.YELLOW)
.forGoggles(tooltip, 1);
Lang.translate("goggles.blast_furnace.size_stats")
.style(ChatFormatting.DARK_GRAY)
.forGoggles(tooltip, 1);
Lang.translate("goggles.blast_furnace.height", validHeight)
.style(ChatFormatting.GOLD)
.forGoggles(tooltip, 1);
if(type == BlastFurnaceType.SMALL) {
Lang.translate("goggles.blast_furnace.diameter.one")
.style(ChatFormatting.GOLD)
.forGoggles(tooltip, 1);
} else
Lang.translate("goggles.blast_furnace.diameter.two")
.style(ChatFormatting.GOLD)
.forGoggles(tooltip, 1);
Lang.translate("goggles.misc.storage_info")
.style(ChatFormatting.DARK_GRAY)
.forGoggles(tooltip, 1);
Lang.translate("goggles.blast_furnace.item_count", inputInventory.getStackInSlot(0).getCount())
.style(ChatFormatting.AQUA)
.forGoggles(tooltip, 1);
Lang.translate("goggles.blast_furnace.fuel_amount", fuelInventory.getStackInSlot(0).getCount())
.style(ChatFormatting.AQUA)
.forGoggles(tooltip, 1);
Lang.translate("goggles.blast_furnace.height", timer)
.style(ChatFormatting.LIGHT_PURPLE)
.forGoggles(tooltip, 1);
}
//--Fluid Info--//
LazyOptional<IFluidHandler> handler = this.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY);
Optional<IFluidHandler> resolve = handler.resolve();
if (!resolve.isPresent())
return false;
IFluidHandler tank = resolve.get();
if (tank.getTanks() == 0)
return false;
LangBuilder mb = Lang.translate("generic.unit.millibuckets");
boolean isEmpty = true;
for (int i = 0; i < tank.getTanks(); i++) {
FluidStack fluidStack = tank.getFluidInTank(i);
if (fluidStack.isEmpty())
continue;
Lang.fluidName(fluidStack)
.style(ChatFormatting.GRAY)
.forGoggles(tooltip, 1);
Lang.builder()
.add(Lang.number(fluidStack.getAmount())
.add(mb)
.style(ChatFormatting.DARK_GREEN))
.text(ChatFormatting.GRAY, " / ")
.add(Lang.number(tank.getTankCapacity(i))
.add(mb)
.style(ChatFormatting.DARK_GRAY))
.forGoggles(tooltip, 1);
isEmpty = false;
}
if (tank.getTanks() > 1) {
if (isEmpty)
tooltip.remove(tooltip.size() - 1);
return true;
}
if (!isEmpty)
return true;
Lang.translate("gui.goggles.fluid_container.capacity")
.add(Lang.number(tank.getTankCapacity(0))
.add(mb)
.style(ChatFormatting.DARK_GREEN))
.style(ChatFormatting.DARK_GRAY)
.forGoggles(tooltip, 1);
return true;
}
@Override
protected void read(CompoundTag compound, boolean clientPacket) {
super.read(compound, clientPacket);
inputInventory.deserializeNBT(compound.getCompound("InputItems"));
fuelInventory.deserializeNBT(compound.getCompound("Fuel"));
}
@Override
public void write(CompoundTag compound, boolean clientPacket) {
super.write(compound, clientPacket);
compound.put("InputItems", inputInventory.serializeNBT());
compound.put("Fuel", fuelInventory.serializeNBT());
}
@Override
public void invalidate() {
super.invalidate();
itemCapability.invalidate();
}
@Nonnull
@Override
@SuppressWarnings("'net.minecraftforge.items.CapabilityItemHandler' is deprecated and marked for removal ")
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, Direction side) {
if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
return itemCapability.cast();
if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
return fluidCapability.cast();
return super.getCapability(cap, side);
}
public void checkType(){
mainFloor = this.getBlockPos().relative(outputFacing.getOpposite());
if(!isValidBlock(mainFloor)) {
type = BlastFurnaceType.INVALID;
return;
}
if(reinforcementHeight<2)
type = BlastFurnaceType.INVALID;
if(!isAboveClear(mainFloor)){
type = BlastFurnaceType.INVALID;
return;
}
if(canBeSmall())
type = BlastFurnaceType.SMALL;
if(canBeBigLeft())
type = BlastFurnaceType.BIG_LEFT;
if(canBeBigRight())
type = BlastFurnaceType.BIG_RIGHT;
if(
!canBeBigLeft()&&
!canBeBigRight()&&
!canBeSmall()
)type = BlastFurnaceType.INVALID;
}
public boolean isAboveClear(BlockPos pos){
pos = pos.above();
return level.getBlockState(pos).is(Blocks.AIR)||level.getBlockState(pos).is(TFMGBlocks.MOLTEN_METAL.get());
}
public boolean isAboveValid(BlockPos pos){
return isAboveValid(pos,false);
}
public boolean isAboveValid(BlockPos pos,boolean firstCheck){
pos = pos.above();
boolean isValid = level.getBlockState(pos).is(TFMGBlocks.FIREPROOF_BRICKS.get());
BlockPos pos1 = pos.above();
int height=2;
for(int i=0; i <8; i++){
if(level.getBlockState(pos1).is(TFMGBlocks.FIREPROOF_BRICKS.get())){
height++;
} else {
break;
}
pos1 = pos1.above();
}
if(height<=this.height||firstCheck)
this.height=height;
return isValid;
}
//
public void isReinforcement(BlockPos pos){
this.isReinforcement(pos,false);
}
public void isReinforcement(BlockPos pos,boolean firstCheck){
BlockPos pos1 = pos;
int height=0;
for(int i=0; i <8; i++){
if(level.getBlockState(pos1).is(TFMGBlocks.FIREPROOF_BRICK_REINFORCEMENT.get())){
height++;
} else {
break;
}
pos1 = pos1.above();
}
if(height<=this.reinforcementHeight||firstCheck)
this.reinforcementHeight=height;
}
public boolean isValidBlock(BlockPos pos){
return level.getBlockState(pos).is(TFMGBlocks.FIREPROOF_BRICKS.get());
}
//its average :/
public boolean canBeSmall(){
BlockPos checkedPos=this.getBlockPos().relative(outputFacing.getOpposite());
BlockPos mainPos = checkedPos;
if(!isValidBlock(mainPos))
return false;
if(!isAboveClear(mainPos))
return false;
checkedPos = mainPos.relative(outputFacing.getClockWise());
if(!isValidBlock(checkedPos))
return false;
if(!isAboveValid(checkedPos,true))
return false;
checkedPos = mainPos.relative(outputFacing.getCounterClockWise());
if(!isValidBlock(checkedPos))
return false;
if(!isAboveValid(checkedPos))
return false;
checkedPos = mainPos.relative(outputFacing.getOpposite());
if(!isValidBlock(checkedPos))
return false;
if(!isAboveValid(checkedPos))
return false;
checkedPos = mainPos.relative(outputFacing);
if(!isAboveValid(checkedPos))
return false;
isReinforcement(checkedPos.relative(outputFacing.getCounterClockWise()),true);
isReinforcement(checkedPos.relative(outputFacing.getClockWise()));
isReinforcement(mainPos.relative(outputFacing.getOpposite()).relative(outputFacing.getCounterClockWise()));
isReinforcement(mainPos.relative(outputFacing.getOpposite()).relative(outputFacing.getClockWise()));
// level.setBlock(checkedPos.above(5), Blocks.GOLD_BLOCK.defaultBlockState(), 3);
return true;
}
public boolean canBeBigRight(){
mainFloor = this.getBlockPos().relative(outputFacing.getOpposite());
BlockPos checkedPos = this.getBlockPos().relative(outputFacing.getCounterClockWise());
for(int i = 0; i<4; i++){
for(int y = 0; y<4; y++){
if(
!(i ==0 && y ==0)&&
!(i ==3 && y ==3)&&
!(i ==0 && y ==3)&&
!(i ==3 && y ==0)
) {
if( i ==1 && y ==0){
if(isAboveValid(checkedPos)) {
checkedPos = checkedPos.relative(outputFacing.getOpposite());
continue;
} else return false;
}
if(!isValidBlock(checkedPos)) {
return false;
}
if(i==0&&y==1){
if(!isAboveValid(checkedPos,true)) {
return false;
}
}
if(
i ==0 || i ==3 ||
y == 0 || y == 3
){
if(!isAboveValid(checkedPos)) {
return false;
}
}
else
if(!isAboveClear(checkedPos)) {
return false;
}
} else{
//reinforcements
if(i ==0 && y ==0)
isReinforcement(checkedPos,true);
isReinforcement(checkedPos);
}
checkedPos = checkedPos.relative(outputFacing.getOpposite());
}
checkedPos= checkedPos.relative(outputFacing,4);
checkedPos= checkedPos.relative(outputFacing.getClockWise());
}
// level.setBlock(checkedPos.above(5), Blocks.DIAMOND_BLOCK.defaultBlockState(), 3);
return true;
}
public boolean canBeBigLeft(){
mainFloor = this.getBlockPos().relative(outputFacing.getOpposite());
BlockPos checkedPos = this.getBlockPos().relative(outputFacing.getClockWise());
for(int i = 0; i<4; i++){
for(int y = 0; y<4; y++){
if(
!(i ==0 && y ==0)&&
!(i ==3 && y ==3)&&
!(i ==0 && y ==3)&&
!(i ==3 && y ==0)
) {
if( i ==1 && y ==0){
if(isAboveValid(checkedPos)) {
checkedPos = checkedPos.relative(outputFacing.getOpposite());
continue;
} else return false;
}
if(!isValidBlock(checkedPos)) {
return false;
}
if(i==0&&y==1){
if(!isAboveValid(checkedPos,true)) {
return false;
}
}
if(
i ==0 || i ==3 ||
y == 0 || y == 3
){
if(!isAboveValid(checkedPos)) {
return false;
}
}
else
if(!isAboveClear(checkedPos)) {
return false;
}
}else{
//reinforcements
if(i ==0 && y ==0)
isReinforcement(checkedPos,true);
isReinforcement(checkedPos);
}
checkedPos = checkedPos.relative(outputFacing.getOpposite());
}
checkedPos= checkedPos.relative(outputFacing,4);
checkedPos= checkedPos.relative(outputFacing.getCounterClockWise());
}
// level.setBlock(checkedPos.above(5), Blocks.EMERALD_BLOCK.defaultBlockState(), 3);
return true;
}
public List<ItemEntity> getItemsToPick(BlastFurnaceType type) {
AABB searchArea=null;
AABB searchArea1=null;
AABB searchArea2=null;
AABB searchArea3=null;
if(type == BlastFurnaceType.SMALL)
searchArea = new AABB(this.getBlockPos().relative(outputFacing.getOpposite()).above());
if(type == BlastFurnaceType.BIG_RIGHT) {
searchArea = new AABB(this.getBlockPos().relative(outputFacing.getOpposite()).above());
searchArea1 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite(), 2).above());
searchArea2 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite(), 2).above().relative(outputFacing.getClockWise()));
searchArea3 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite()).above().relative(outputFacing.getClockWise()));
}
if(type == BlastFurnaceType.BIG_LEFT) {
searchArea = new AABB(this.getBlockPos().relative(outputFacing.getOpposite()).above());
searchArea1 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite(), 2).above());
searchArea2 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite(), 2).above().relative(outputFacing.getCounterClockWise()));
searchArea3 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite()).above().relative(outputFacing.getCounterClockWise()));
}
if(searchArea1!=null){
List<ItemEntity> itemList= new ArrayList<>();
itemList.addAll(level.getEntitiesOfClass(ItemEntity.class, searchArea));
itemList.addAll(level.getEntitiesOfClass(ItemEntity.class, searchArea1));
itemList.addAll(level.getEntitiesOfClass(ItemEntity.class, searchArea2));
itemList.addAll(level.getEntitiesOfClass(ItemEntity.class, searchArea3));
return itemList;
}
return level.getEntitiesOfClass(ItemEntity.class, searchArea);
}
public enum BlastFurnaceType{
SMALL,
BIG_LEFT,
BIG_RIGHT,
INVALID
}
}

View File

@@ -0,0 +1,128 @@
package com.drmangotea.tfmg.blocks.machines.metal_processing.blast_furnace;
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.LevelRenderer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.BlockState;
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
public class BlastFurnaceRenderer extends SafeBlockEntityRenderer<BlastFurnaceOutputBlockEntity> {
public BlastFurnaceRenderer(BlockEntityRendererProvider.Context context) {}
@Override
protected void renderSafe(BlastFurnaceOutputBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) {
ms.pushPose();
TransformStack msr = TransformStack.cast(ms);
msr.translate(1 / 2f, 0.5, 1 / 2f);
float coalCokeLevel = be.coalCokeHeight.getValue()/64;
int lightInside = LevelRenderer.getLightColor(be.getLevel(), be.getBlockPos().above().relative(be.getBlockState().getValue(FACING).getOpposite()));
if(be.timer<=0)
if(be.validHeight >=4) {
if(be.getBlockState().getValue(FACING)== Direction.NORTH)
this.renderPile(be, partialTicks, ms, buffer, lightInside, overlay, coalCokeLevel,Direction.NORTH);
if(be.getBlockState().getValue(FACING)== Direction.SOUTH)
this.renderPile(be, partialTicks, ms, buffer, lightInside, overlay, coalCokeLevel,Direction.SOUTH);
if(be.getBlockState().getValue(FACING)== Direction.WEST)
this.renderPile(be, partialTicks, ms, buffer, lightInside, overlay, coalCokeLevel,Direction.WEST);
if(be.getBlockState().getValue(FACING)== Direction.EAST)
this.renderPile(be, partialTicks, ms, buffer, lightInside, overlay, coalCokeLevel,Direction.EAST);
}
ms.popPose();
}
protected void renderPile(BlastFurnaceOutputBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay, float height,Direction direction) {
BlockState blockState = be.getBlockState();
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
//small
if(height!=0) {
int angle = 0;
if(direction == Direction.SOUTH)
angle = 180;
if(direction == Direction.WEST)
angle = 90;
if(direction == Direction.EAST)
angle = 270;
if (be.type == BlastFurnaceOutputBlockEntity.BlastFurnaceType.SMALL) {
CachedBufferer.partial(TFMGPartialModels.COAL_COKE_DUST_LAYER, blockState)
.rotateY(angle)
.centre()
.translateX(-1)
.translateY(height)
.light(light)
.renderInto(ms, vb);
}
int y = -1;
if (be.type == BlastFurnaceOutputBlockEntity.BlastFurnaceType.BIG_RIGHT||be.type == BlastFurnaceOutputBlockEntity.BlastFurnaceType.BIG_LEFT) {
if(be.type == BlastFurnaceOutputBlockEntity.BlastFurnaceType.BIG_LEFT)
y = -2;
for(int i = 0; i < 2;i++) {
for(int x = 0; x < 2;x++) {
CachedBufferer.partial(TFMGPartialModels.COAL_COKE_DUST_LAYER, blockState)
.rotateY(angle)
.centre()
.translateX(x+y)
.translateZ(i)
.translateY(height)
.light(light)
.renderInto(ms, vb);
}
}
}
}
}
@Override
public boolean shouldRenderOffScreen(BlastFurnaceOutputBlockEntity te) {
return true;
}
}

View File

@@ -0,0 +1,99 @@
package com.drmangotea.tfmg.blocks.machines.metal_processing.blast_furnace;
import com.drmangotea.tfmg.CreateTFMG;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.drmangotea.tfmg.registry.TFMGShapes;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.BufferBuilder;
import com.mojang.blaze3d.vertex.DefaultVertexFormat;
import com.mojang.blaze3d.vertex.Tesselator;
import com.mojang.blaze3d.vertex.VertexFormat;
import com.simibubi.create.Create;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.player.Player;
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.Blocks;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.pathfinder.PathComputationType;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
public class MoltenMetalBlock extends Block implements IBE<MoltenMetalBlockEntity> {
public MoltenMetalBlock(Properties p_49795_) {
super(p_49795_);
}
public void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) {
entity.setSecondsOnFire(10);
if(!(entity instanceof LivingEntity)){
// if(entity instanceof ItemEntity)
// if(!entity.fireImmune()){
// entity.discard();
// if(level.isClientSide)
// level.playSound(null, pos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, .2f,
// 1f + Create.RANDOM.nextFloat());
// }
return;
}
entity.makeStuckInBlock(state, new Vec3((double)0.9F, 1.5D, (double)0.9F));
int random = Create.RANDOM.nextInt(24);
if(random==7)
entity.hurt(DamageSource.IN_FIRE,4);
}
@Override
public VoxelShape getShape(BlockState state, BlockGetter p_220053_2_, BlockPos p_220053_3_,
CollisionContext p_220053_4_) {
return TFMGShapes.EMPTY;
}
@Override
public boolean canBeReplaced(BlockState state, BlockPlaceContext useContext) {
return false;
}
@Override
public boolean isPathfindable(BlockState state, BlockGetter reader, BlockPos pos, PathComputationType type) {
return false;
}
@Override
public Class<MoltenMetalBlockEntity> getBlockEntityClass() {
return MoltenMetalBlockEntity.class;
}
@Override
public BlockEntityType<? extends MoltenMetalBlockEntity> getBlockEntityType() {
return TFMGBlockEntities.MOLTEN_METAL.get();
}
}

View File

@@ -0,0 +1,40 @@
package com.drmangotea.tfmg.blocks.machines.metal_processing.blast_furnace;
import com.drmangotea.tfmg.CreateTFMG;
import com.simibubi.create.Create;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import java.util.List;
public class MoltenMetalBlockEntity extends SmartBlockEntity {
public int discardTimer =0;
public MoltenMetalBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
discardTimer=20;
}
public void tick(){
super.tick();
discardTimer-- ;
if(discardTimer == 0)
if(Create.RANDOM.nextInt(25)==5)
level.setBlock(getBlockPos(), Blocks.AIR.defaultBlockState(),3);
}
@Override
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
}
}

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.metal_processing.coke_oven;
package com.drmangotea.tfmg.blocks.machines.metal_processing.coke_oven;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.simibubi.create.content.equipment.wrench.IWrenchable;

View File

@@ -1,6 +1,6 @@
package com.drmangotea.tfmg.content.machines.metal_processing.coke_oven;
package com.drmangotea.tfmg.blocks.machines.metal_processing.coke_oven;
import com.drmangotea.tfmg.content.machines.TFMGMachineBlockEntity;
import com.drmangotea.tfmg.blocks.machines.TFMGMachineBlockEntity;
import com.drmangotea.tfmg.recipes.coking.CokingRecipe;
import com.drmangotea.tfmg.registry.*;
import com.simibubi.create.content.equipment.wrench.IWrenchable;
@@ -24,7 +24,6 @@ import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.fluids.capability.templates.FluidTank;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
@@ -35,7 +34,7 @@ import java.util.List;
import java.util.Optional;
import static com.drmangotea.tfmg.content.machines.metal_processing.coke_oven.CokeOvenBlock.CONTROLLER_TYPE;
import static com.drmangotea.tfmg.blocks.machines.metal_processing.coke_oven.CokeOvenBlock.CONTROLLER_TYPE;
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWrenchable {
@@ -184,13 +183,16 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
private void setTimer() {
if(lastRecipe!=null
&&isController
&&timer==-1
&&inputInventory.getItem(0).getCount()>=20&&
(tank2.getPrimaryHandler().getFluidAmount()+CARBON_DIOXIDE_PRODUCTION)<=tank2.getPrimaryHandler().getCapacity()&&
(tank1.getPrimaryHandler().getFluidAmount()+lastRecipe.getFluidResults().get(0).getAmount())<=tank1.getPrimaryHandler().getCapacity()
){
(tank1.getPrimaryHandler().getFluidAmount()+lastRecipe.getFluidResults().get(0).getAmount())<=tank1.getPrimaryHandler().getCapacity(
)){
timer = lastRecipe.getProcessingDuration();
inputInventory.setItem(0,new ItemStack(inputInventory.getItem(0).getItem(),inputInventory.getItem(0).getCount()-20));
@@ -246,7 +248,7 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
private void refreshCapability() {
if(this.controller ==null) {
if (this.controller == null) {
return;
@@ -257,15 +259,16 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
LazyOptional<IItemHandlerModifiable> oldItemCapability = itemCapability;
if (controller.tank1 != null){
if(controller.tank1==null)
return;
if(controller.tank2==null)
return;
if(controller.inputInventory==null)
return;
fluidCapability = LazyOptional.of(() -> new CombinedTankWrapper(controller.tank1.getPrimaryHandler(), controller.tank2.getPrimaryHandler()));
if (controller.tank2 != null){
if (controller.inputInventory != null){
fluidCapability = LazyOptional.of(() -> new CombinedTankWrapper(controller.tank1.getPrimaryHandler(), controller.tank2.getPrimaryHandler()));
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(controller.inputInventory));
}}}
oldFluidCapability.invalidate();
oldItemCapability.invalidate();
}

View File

@@ -1,22 +1,14 @@
package com.drmangotea.tfmg.content.machines.metal_processing.coke_oven;
package com.drmangotea.tfmg.blocks.machines.metal_processing.coke_oven;
import com.drmangotea.tfmg.CreateTFMG;
import com.simibubi.create.content.processing.basin.BasinBlock;
import com.simibubi.create.content.redstone.thresholdSwitch.ThresholdSwitchBlock;
import com.simibubi.create.foundation.data.AssetLookup;
import com.simibubi.create.foundation.data.SpecialBlockStateGen;
import com.simibubi.create.foundation.utility.Lang;
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.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraftforge.client.model.generators.ModelFile;
import java.util.function.Function;
import static com.drmangotea.tfmg.content.machines.metal_processing.coke_oven.CokeOvenBlock.CONTROLLER_TYPE;
import static com.simibubi.create.foundation.data.AssetLookup.partialBaseModel;
import static com.drmangotea.tfmg.blocks.machines.metal_processing.coke_oven.CokeOvenBlock.CONTROLLER_TYPE;
public class CokeOvenGenerator extends SpecialBlockStateGen {
@Override

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.metal_processing.coke_oven;
package com.drmangotea.tfmg.blocks.machines.metal_processing.coke_oven;
@@ -6,17 +6,14 @@ 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.content.contraptions.elevator.ElevatorPulleyBlockEntity;
import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer;
import com.simibubi.create.foundation.render.CachedBufferer;
import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3;
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg.content.machines.oil_processing.distillation;
package com.drmangotea.tfmg.blocks.machines.oil_processing.distillation;
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery.DistilleryControllerBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery.DistilleryControllerBlockEntity;
import com.drmangotea.tfmg.recipes.distillation.ItemlessRecipe;
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
import com.simibubi.create.foundation.advancement.CreateAdvancement;

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower;
package com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower;
import com.drmangotea.tfmg.content.tanks.SteelTankBlock;
import com.drmangotea.tfmg.blocks.tanks.SteelTankBlock;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.simibubi.create.content.equipment.wrench.IWrenchable;
import com.simibubi.create.foundation.block.IBE;

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower;
package com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower;
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery.DistilleryControllerBlockEntity;
import com.drmangotea.tfmg.content.tanks.SteelTankBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery.DistilleryControllerBlockEntity;
import com.drmangotea.tfmg.blocks.tanks.SteelTankBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
import com.simibubi.create.foundation.utility.Lang;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower;
package com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,8 +1,8 @@
package com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower;
package com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower;
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery.DistilleryOutputBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery.DistilleryOutputBlockEntity;
import com.drmangotea.tfmg.recipes.distillation.ItemlessRecipe;
import com.drmangotea.tfmg.recipes.distillation.AdvancedDistillationRecipe;
import com.drmangotea.tfmg.registry.TFMGBlocks;
@@ -22,7 +22,6 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.common.crafting.IShapedRecipe;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;
import org.checkerframework.checker.units.qual.C;
import java.util.List;
import java.util.Optional;

View File

@@ -1,8 +1,8 @@
package com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower;
package com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower;
import com.drmangotea.tfmg.content.tanks.SteelTankBlock;
import com.drmangotea.tfmg.content.tanks.SteelTankBlockEntity;
import com.drmangotea.tfmg.blocks.tanks.SteelTankBlock;
import com.drmangotea.tfmg.blocks.tanks.SteelTankBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.drmangotea.tfmg.registry.TFMGFluids;
import com.simibubi.create.Create;

View File

@@ -0,0 +1,45 @@
package com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.simibubi.create.content.equipment.wrench.IWrenchable;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.pathfinder.PathComputationType;
public class DistilleryControllerBlock extends Block implements IBE<DistilleryControllerBlockEntity>, IWrenchable {
public DistilleryControllerBlock(Properties p_i48440_1_) {
super(p_i48440_1_);
}
@Override
public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
IBE.onRemove(state, worldIn, pos, newState);
}
@Override
public Class<DistilleryControllerBlockEntity> getBlockEntityClass() {
return DistilleryControllerBlockEntity.class;
}
@Override
public BlockEntityType<? extends DistilleryControllerBlockEntity> getBlockEntityType() {
return TFMGBlockEntities.CAST_IRON_DISTILLATION_CONTROLLER.get();
}
@Override
public boolean isPathfindable(BlockState state, BlockGetter reader, BlockPos pos, PathComputationType type) {
return false;
}
}

View File

@@ -1,6 +1,6 @@
package com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery;
package com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery;
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.FluidProcessingBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.FluidProcessingBlockEntity;
import com.simibubi.create.AllTags;
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
import com.simibubi.create.content.kinetics.belt.behaviour.DirectBeltInputBehaviour;
@@ -8,30 +8,22 @@ import com.simibubi.create.content.processing.burner.BlazeBurnerBlock;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
import com.simibubi.create.foundation.blockEntity.behaviour.fluid.SmartFluidTankBehaviour;
import com.simibubi.create.foundation.blockEntity.behaviour.inventory.InvManipulationBehaviour;
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
import com.simibubi.create.foundation.item.SmartInventory;
import com.simibubi.create.foundation.utility.*;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.StringTag;
import net.minecraft.nbt.Tag;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.entity.BlockEntity;
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.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper;
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
import javax.annotation.Nonnull;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery;
package com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,9 +1,8 @@
package com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery;
package com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery;
import com.drmangotea.tfmg.CreateTFMG;
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.FluidProcessingBlockEntity;
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower.DistillationOutputBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.FluidProcessingBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower.DistillationOutputBlockEntity;
import com.drmangotea.tfmg.recipes.distillation.DistillationRecipe;
import com.drmangotea.tfmg.registry.TFMGRecipeTypes;
import com.simibubi.create.AllRecipeTypes;
@@ -26,8 +25,6 @@ import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.crafting.IShapedRecipe;
import net.minecraftforge.common.util.LazyOptional;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.base;
package com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.base;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,10 +1,10 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.base;
package com.drmangotea.tfmg.blocks.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.blocks.deposits.FluidDepositBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.crank.PumpjackCrankBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderBlockEntity;
import com.drmangotea.tfmg.blocks.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;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.base;
package com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.base;
import com.drmangotea.tfmg.registry.TFMGPartialModels;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank;
package com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.crank;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,8 +1,8 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank;
package com.drmangotea.tfmg.blocks.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.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderBlockEntity;
import com.drmangotea.tfmg.blocks.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;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank;
package com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.crank;
import com.jozufozu.flywheel.api.MaterialManager;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.crank;
package com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.crank;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder;
package com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.hammer_holder;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder;
package com.drmangotea.tfmg.blocks.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.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.crank.PumpjackCrankBlockEntity;
import com.drmangotea.tfmg.blocks.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;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder;
package com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.hammer_holder;
import com.drmangotea.tfmg.registry.TFMGPartialModels;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.hammer_holder;
package com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.hammer_holder;
import com.drmangotea.tfmg.registry.TFMGPartialModels;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input;
package com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.machine_input;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.simibubi.create.content.kinetics.base.DirectionalKineticBlock;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input;
package com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.machine_input;
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.machines.oil_processing.pumpjack.machine_input;
package com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.machine_input;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.pipes.normal;
package com.drmangotea.tfmg.blocks.pipes.normal;
import com.simibubi.create.content.fluids.pipes.FluidPipeBlockEntity;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.pipes.normal;
package com.drmangotea.tfmg.blocks.pipes.normal;
import com.simibubi.create.content.fluids.pipes.FluidPipeBlockEntity;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.pipes.normal.steel;
package com.drmangotea.tfmg.blocks.pipes.normal.steel;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.pipes.normal.steel;
package com.drmangotea.tfmg.blocks.pipes.normal.steel;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.pipes.normal.steel;
package com.drmangotea.tfmg.blocks.pipes.normal.steel;
import com.drmangotea.tfmg.registry.TFMGPartialModels;
import com.simibubi.create.content.decoration.bracket.BracketedBlockEntityBehaviour;

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg.content.pipes.normal.steel;
package com.drmangotea.tfmg.blocks.pipes.normal.steel;
import com.drmangotea.tfmg.content.pipes.normal.LockablePipeBlockEntity;
import com.drmangotea.tfmg.blocks.pipes.normal.LockablePipeBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.simibubi.create.AllBlocks;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.pipes.pumps;
package com.drmangotea.tfmg.blocks.pipes.pumps;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.pipes.smart_pipes;
package com.drmangotea.tfmg.blocks.pipes.smart_pipes;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.pipes.valves;
package com.drmangotea.tfmg.blocks.pipes.valves;
import javax.annotation.Nonnull;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.tanks;
package com.drmangotea.tfmg.blocks.tanks;
import com.drmangotea.tfmg.base.TFMGSpriteShifts;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.tanks;
package com.drmangotea.tfmg.blocks.tanks;
import com.drmangotea.tfmg.registry.TFMGPartialModels;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.tanks;
package com.drmangotea.tfmg.blocks.tanks;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg.content.tanks;
package com.drmangotea.tfmg.blocks.tanks;
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower.DistillationTowerData;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower.DistillationTowerData;
import com.simibubi.create.api.connectivity.ConnectivityHandler;
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.tanks;
package com.drmangotea.tfmg.blocks.tanks;
import com.simibubi.create.foundation.data.AssetLookup;
import com.simibubi.create.foundation.data.SpecialBlockStateGen;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.tanks;
package com.drmangotea.tfmg.blocks.tanks;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;

View File

@@ -1,7 +0,0 @@
package com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades;
public enum ChemicalColor {
BASE,
GREEN,
BLUE
}

View File

@@ -1,481 +0,0 @@
package com.drmangotea.tfmg.content.machines.metal_processing.blast_furnace.blast_furnace_output;
import com.drmangotea.tfmg.content.machines.TFMGMachineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
import com.simibubi.create.foundation.item.SmartInventory;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
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.entity.item.ItemEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.wrapper.CombinedInvWrapper;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
public class BlastFurnaceOutputBlockEntity extends TFMGMachineBlockEntity implements IHaveGoggleInformation {
public BlastFurnaceType type;
public Direction outputFacing = getBlockState().getValue(FACING);
public BlockPos mainFloor;
public int height=2;
public int reinforcementHeight = 0;
public LerpedFloat coalCokeHeight = LerpedFloat.linear();
//item storage
public LazyOptional<IItemHandlerModifiable> itemCapability;
public SmartInventory inputInventory;
public SmartInventory fuelInventory;
public BlastFurnaceOutputBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
inputInventory = new SmartInventory(1, this).forbidInsertion()
.withMaxStackSize(64);
fuelInventory = new SmartInventory(1, this).forbidInsertion()
.withMaxStackSize(64);
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(inputInventory,fuelInventory));
}
@Override
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
super.addBehaviours(behaviours);
}
public void tick(){
super.tick();
outputFacing = getBlockState().getValue(FACING);
coalCokeHeight.chase(fuelInventory.getStackInSlot(0).getCount(), 0.1f, LerpedFloat.Chaser.EXP);
coalCokeHeight.tickChaser();
checkType();
if(type == BlastFurnaceType.INVALID)
return;
List<ItemEntity> itemsToPick = getItemsToPick(type);
for(ItemEntity itemEntity : itemsToPick){
ItemStack itemStack = itemEntity.getItem();
if(itemStack.is(TFMGItems.COAL_COKE_DUST.get())){
int freeSpace = fuelInventory.getStackInSlot(0).getMaxStackSize()-fuelInventory.getStackInSlot(0).getCount();
int coalCokeCount = itemStack.getCount();
//if(itemStack == ItemStack.EMPTY)
// continue;
if(coalCokeCount>freeSpace){
itemStack.setCount(itemStack.getCount()-freeSpace);
fuelInventory.setItem(0 ,new ItemStack (TFMGItems.COAL_COKE_DUST.get(),fuelInventory.getStackInSlot(0).getCount()+freeSpace));
}else {
fuelInventory.setItem(0 ,new ItemStack (TFMGItems.COAL_COKE_DUST.get(),fuelInventory.getStackInSlot(0).getCount()+itemStack.getCount()));
itemEntity.discard();
}
continue;
}
itemEntity.discard();
}
}
@Override
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
// Lang.translate("goggles.surface_scanner.distance", fuelInventory.getItem(0).getCount())
// .style(ChatFormatting.GREEN)
// .forGoggles(tooltip,1);
Lang.translate("goggles.surface_scanner.distance", reinforcementHeight)
.style(ChatFormatting.GREEN)
.forGoggles(tooltip,1);
return true;
}
@Override
protected void read(CompoundTag compound, boolean clientPacket) {
super.read(compound, clientPacket);
inputInventory.deserializeNBT(compound.getCompound("InputItems"));
fuelInventory.deserializeNBT(compound.getCompound("Fuel"));
}
@Override
public void write(CompoundTag compound, boolean clientPacket) {
super.write(compound, clientPacket);
compound.put("InputItems", inputInventory.serializeNBT());
compound.put("Fuel", fuelInventory.serializeNBT());
}
@Override
public void invalidate() {
super.invalidate();
itemCapability.invalidate();
}
@Nonnull
@Override
@SuppressWarnings("'net.minecraftforge.items.CapabilityItemHandler' is deprecated and marked for removal ")
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, Direction side) {
if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
return itemCapability.cast();
if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
return fluidCapability.cast();
return super.getCapability(cap, side);
}
public void checkType(){
mainFloor = this.getBlockPos().relative(outputFacing.getOpposite());
if(!isValidBlock(mainFloor)) {
type = BlastFurnaceType.INVALID;
return;
}
if(!isAboveClear(mainFloor)){
type = BlastFurnaceType.INVALID;
return;
}
if(canBeSmall())
type = BlastFurnaceType.SMALL;
if(canBeBigLeft())
type = BlastFurnaceType.BIG_LEFT;
if(canBeBigRight())
type = BlastFurnaceType.BIG_RIGHT;
if(
!canBeBigLeft()&&
!canBeBigRight()&&
!canBeSmall()
)type = BlastFurnaceType.INVALID;
}
public boolean isAboveClear(BlockPos pos){
pos = pos.above();
return level.getBlockState(pos).is(Blocks.AIR);
}
public boolean isAboveValid(BlockPos pos){
return isAboveValid(pos,false);
}
public boolean isAboveValid(BlockPos pos,boolean firstCheck){
pos = pos.above();
boolean isValid = level.getBlockState(pos).is(TFMGBlocks.FIREPROOF_BRICKS.get());
BlockPos pos1 = pos.above();
int height=2;
for(int i=0; i <8; i++){
if(level.getBlockState(pos1).is(TFMGBlocks.FIREPROOF_BRICKS.get())){
height++;
} else {
break;
}
pos1 = pos1.above();
}
if(height<=this.height||firstCheck)
this.height=height;
return isValid;
}
//
public void isReinforcement(BlockPos pos){
this.isReinforcement(pos,false);
}
public void isReinforcement(BlockPos pos,boolean firstCheck){
BlockPos pos1 = pos;
int height=0;
for(int i=0; i <8; i++){
if(level.getBlockState(pos1).is(TFMGBlocks.FIREPROOF_BRICK_REINFORCEMENT.get())){
height++;
} else {
break;
}
pos1 = pos1.above();
}
if(height<=this.reinforcementHeight||firstCheck)
this.reinforcementHeight=height;
}
public boolean isValidBlock(BlockPos pos){
return level.getBlockState(pos).is(TFMGBlocks.FIREPROOF_BRICKS.get());
}
//its average :/
public boolean canBeSmall(){
BlockPos checkedPos=this.getBlockPos().relative(outputFacing.getOpposite());
BlockPos mainPos = checkedPos;
if(!isValidBlock(mainPos))
return false;
if(!isAboveClear(mainPos))
return false;
checkedPos = mainPos.relative(outputFacing.getClockWise());
if(!isValidBlock(checkedPos))
return false;
if(!isAboveValid(checkedPos,true))
return false;
checkedPos = mainPos.relative(outputFacing.getCounterClockWise());
if(!isValidBlock(checkedPos))
return false;
if(!isAboveValid(checkedPos))
return false;
checkedPos = mainPos.relative(outputFacing);
if(!isAboveValid(checkedPos))
return false;
isReinforcement(checkedPos.relative(outputFacing.getCounterClockWise()),true);
isReinforcement(checkedPos.relative(outputFacing.getClockWise()));
isReinforcement(mainPos.relative(outputFacing.getOpposite()).relative(outputFacing.getCounterClockWise()));
isReinforcement(mainPos.relative(outputFacing.getOpposite()).relative(outputFacing.getClockWise()));
// level.setBlock(checkedPos.above(5), Blocks.GOLD_BLOCK.defaultBlockState(), 3);
return true;
}
public boolean canBeBigRight(){
mainFloor = this.getBlockPos().relative(outputFacing.getOpposite());
BlockPos checkedPos = this.getBlockPos().relative(outputFacing.getCounterClockWise());
for(int i = 0; i<4; i++){
for(int y = 0; y<4; y++){
if(
!(i ==0 && y ==0)&&
!(i ==3 && y ==3)&&
!(i ==0 && y ==3)&&
!(i ==3 && y ==0)
) {
if( i ==1 && y ==0){
if(isAboveValid(checkedPos)) {
checkedPos = checkedPos.relative(outputFacing.getOpposite());
continue;
} else return false;
}
if(!isValidBlock(checkedPos)) {
return false;
}
if(i==0&&y==1){
if(!isAboveValid(checkedPos,true)) {
return false;
}
}
if(
i ==0 || i ==3 ||
y == 0 || y == 3
){
if(!isAboveValid(checkedPos)) {
return false;
}
}
else
if(!isAboveClear(checkedPos)) {
return false;
}
} else{
//reinforcements
if(i ==0 && y ==0)
isReinforcement(checkedPos,true);
isReinforcement(checkedPos);
}
checkedPos = checkedPos.relative(outputFacing.getOpposite());
}
checkedPos= checkedPos.relative(outputFacing,4);
checkedPos= checkedPos.relative(outputFacing.getClockWise());
}
// level.setBlock(checkedPos.above(5), Blocks.DIAMOND_BLOCK.defaultBlockState(), 3);
return true;
}
public boolean canBeBigLeft(){
mainFloor = this.getBlockPos().relative(outputFacing.getOpposite());
BlockPos checkedPos = this.getBlockPos().relative(outputFacing.getClockWise());
for(int i = 0; i<4; i++){
for(int y = 0; y<4; y++){
if(
!(i ==0 && y ==0)&&
!(i ==3 && y ==3)&&
!(i ==0 && y ==3)&&
!(i ==3 && y ==0)
) {
if( i ==1 && y ==0){
if(isAboveValid(checkedPos)) {
checkedPos = checkedPos.relative(outputFacing.getOpposite());
continue;
} else return false;
}
if(!isValidBlock(checkedPos)) {
return false;
}
if(i==0&&y==1){
if(!isAboveValid(checkedPos,true)) {
return false;
}
}
if(
i ==0 || i ==3 ||
y == 0 || y == 3
){
if(!isAboveValid(checkedPos)) {
return false;
}
}
else
if(!isAboveClear(checkedPos)) {
return false;
}
}else{
//reinforcements
if(i ==0 && y ==0)
isReinforcement(checkedPos,true);
isReinforcement(checkedPos);
}
checkedPos = checkedPos.relative(outputFacing.getOpposite());
}
checkedPos= checkedPos.relative(outputFacing,4);
checkedPos= checkedPos.relative(outputFacing.getCounterClockWise());
}
// level.setBlock(checkedPos.above(5), Blocks.EMERALD_BLOCK.defaultBlockState(), 3);
return true;
}
public List<ItemEntity> getItemsToPick(BlastFurnaceType type) {
AABB searchArea=null;
AABB searchArea1=null;
AABB searchArea2=null;
AABB searchArea3=null;
if(type == BlastFurnaceType.SMALL)
searchArea = new AABB(this.getBlockPos().relative(outputFacing.getOpposite()).above());
if(type == BlastFurnaceType.BIG_RIGHT) {
searchArea = new AABB(this.getBlockPos().relative(outputFacing.getOpposite()).above());
searchArea1 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite(), 2).above());
searchArea2 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite(), 2).above().relative(outputFacing.getClockWise()));
searchArea3 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite()).above().relative(outputFacing.getClockWise()));
}
if(type == BlastFurnaceType.BIG_LEFT) {
searchArea = new AABB(this.getBlockPos().relative(outputFacing.getOpposite()).above());
searchArea1 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite(), 2).above());
searchArea2 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite(), 2).above().relative(outputFacing.getCounterClockWise()));
searchArea3 = new AABB(this.getBlockPos().relative(outputFacing.getOpposite()).above().relative(outputFacing.getCounterClockWise()));
}
if(searchArea1!=null){
List<ItemEntity> itemList= new ArrayList<>();
itemList.addAll(level.getEntitiesOfClass(ItemEntity.class, searchArea));
itemList.addAll(level.getEntitiesOfClass(ItemEntity.class, searchArea1));
itemList.addAll(level.getEntitiesOfClass(ItemEntity.class, searchArea2));
itemList.addAll(level.getEntitiesOfClass(ItemEntity.class, searchArea3));
return itemList;
}
return level.getEntitiesOfClass(ItemEntity.class, searchArea);
}
public enum BlastFurnaceType{
SMALL,
BIG_LEFT,
BIG_RIGHT,
INVALID
}
}

View File

@@ -1,69 +0,0 @@
package com.drmangotea.tfmg.content.machines.metal_processing.blast_furnace.blast_furnace_output;
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.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;
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
public class BlastFurnaceRenderer extends SafeBlockEntityRenderer<BlastFurnaceOutputBlockEntity> {
public BlastFurnaceRenderer(BlockEntityRendererProvider.Context context) {}
@Override
protected void renderSafe(BlastFurnaceOutputBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay) {
ms.pushPose();
TransformStack msr = TransformStack.cast(ms);
msr.translate(1 / 2f, 0.5, 1 / 2f);
float coalCokeLevel = be.coalCokeHeight.getValue()/32;
int lightInside = LevelRenderer.getLightColor(be.getLevel(), be.getBlockPos().above().relative(be.getBlockState().getValue(FACING).getOpposite()));
this.renderNorth(be,partialTicks,ms,buffer,lightInside,overlay,coalCokeLevel);
ms.popPose();
}
protected void renderNorth(BlastFurnaceOutputBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
int light, int overlay,float height) {
BlockState blockState = be.getBlockState();
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
//small
if (be.type == BlastFurnaceOutputBlockEntity.BlastFurnaceType.SMALL) {
CachedBufferer.partial(TFMGPartialModels.COAL_COKE_DUST_LAYER, blockState)
.centre()
.translateX(-1)
.translateY(height)
.light(light)
.renderInto(ms, vb);
}
}
@Override
public boolean shouldRenderOffScreen(BlastFurnaceOutputBlockEntity te) {
return true;
}
}

View File

@@ -1,76 +0,0 @@
package com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.Create;
import com.simibubi.create.content.equipment.wrench.IWrenchable;
import com.simibubi.create.content.fluids.transfer.GenericItemEmptying;
import com.simibubi.create.content.fluids.transfer.GenericItemFilling;
import com.simibubi.create.content.kinetics.belt.BeltBlockEntity;
import com.simibubi.create.content.kinetics.belt.behaviour.DirectBeltInputBehaviour;
import com.simibubi.create.content.logistics.funnel.FunnelBlock;
import com.simibubi.create.content.processing.basin.BasinOperatingBlockEntity;
import com.simibubi.create.foundation.block.IBE;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
import com.simibubi.create.foundation.fluid.FluidHelper;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.DirectionProperty;
import net.minecraft.world.level.pathfinder.PathComputationType;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.fluids.capability.IFluidHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemStackHandler;
public class DistilleryControllerBlock extends Block implements IBE<DistilleryControllerBlockEntity>, IWrenchable {
public DistilleryControllerBlock(Properties p_i48440_1_) {
super(p_i48440_1_);
}
@Override
public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
IBE.onRemove(state, worldIn, pos, newState);
}
@Override
public Class<DistilleryControllerBlockEntity> getBlockEntityClass() {
return DistilleryControllerBlockEntity.class;
}
@Override
public BlockEntityType<? extends DistilleryControllerBlockEntity> getBlockEntityType() {
return TFMGBlockEntities.CAST_IRON_DISTILLATION_CONTROLLER.get();
}
@Override
public boolean isPathfindable(BlockState state, BlockGetter reader, BlockPos pos, PathComputationType type) {
return false;
}
}

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.items;
package com.drmangotea.tfmg.items;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.items;
package com.drmangotea.tfmg.items;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.items;
package com.drmangotea.tfmg.items;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;

View File

@@ -1,6 +1,6 @@
package com.drmangotea.tfmg.content.items;
package com.drmangotea.tfmg.items;
import com.drmangotea.tfmg.content.pipes.normal.LockablePipeBlockEntity;
import com.drmangotea.tfmg.blocks.pipes.normal.LockablePipeBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import net.minecraft.core.BlockPos;
import net.minecraft.sounds.SoundEvents;

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg.mixins;
import com.drmangotea.tfmg.CreateTFMG;
import com.drmangotea.tfmg.content.pipes.normal.LockablePipeBlockEntity;
import com.drmangotea.tfmg.blocks.pipes.normal.LockablePipeBlockEntity;
import com.simibubi.create.AllBlockEntityTypes;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.content.contraptions.ITransformableBlock;

View File

@@ -0,0 +1,43 @@
package com.drmangotea.tfmg.mixins;
import com.drmangotea.tfmg.CreateTFMG;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ScreenEffectRenderer;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.FluidTags;
import net.minecraft.world.entity.player.Player;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import static net.minecraft.client.renderer.ScreenEffectRenderer.renderFluid;
@Mixin(ScreenEffectRenderer.class)
public class ScreenEffectRendererMixin {
private static final ResourceLocation MOLTEN_METAL_OVERLAY = CreateTFMG.asResource("textures/gui/molten_metal.png");
@Inject(method = "renderScreenEffect", at = @At("HEAD"))
private static void renderScreenEffect(Minecraft p_110719_, PoseStack p_110720_, CallbackInfo ci) {
if (!p_110719_.player.isSpectator()) {
if (p_110719_.player.getLevel().getBlockState(p_110719_.player.getOnPos().above(2)).is(TFMGBlocks.MOLTEN_METAL.get())) {
renderMoltenMetal(p_110719_, p_110720_);
}
}
}
private static void renderMoltenMetal(Minecraft p_110726_, PoseStack p_110727_) {
for(int i = 0 ; i<10; i++)
renderFluid(p_110726_, p_110727_, MOLTEN_METAL_OVERLAY);
}
}

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg.recipes.distillation;
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower.DistillationControllerBlockEntity;
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillery.DistilleryControllerBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower.DistillationControllerBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery.DistilleryControllerBlockEntity;
import com.simibubi.create.content.processing.burner.BlazeBurnerBlock;
import com.simibubi.create.content.processing.recipe.ProcessingRecipe;
import com.simibubi.create.content.processing.recipe.ProcessingRecipeBuilder;

View File

@@ -76,12 +76,6 @@ public class AdvancedDistillationCategory extends CreateRecipeCategory<AdvancedD
y -= 12;
TFMGGuiTextures.DISTILLATION_TOWER_TOP.render(matrixStack,10,y);
}
}

View File

@@ -356,4 +356,4 @@ public class TFMGJei implements IModPlugin {
.test(matchingStacks[0]);
}
}
}

View File

@@ -1,33 +1,34 @@
package com.drmangotea.tfmg.registry;
import com.drmangotea.tfmg.content.concrete.formwork.FormWorkBlockEntity;
import com.drmangotea.tfmg.content.concrete.formwork.FormWorkRenderer;
import com.drmangotea.tfmg.content.decoration.doors.TFMGSlidingDoorBlockEntity;
import com.drmangotea.tfmg.content.decoration.doors.TFMGSlidingDoorRenderer;
import com.drmangotea.tfmg.content.deposits.FluidDepositBlockEntity;
import com.drmangotea.tfmg.content.deposits.surface_scanner.SurfaceScannerRenderer;
import com.drmangotea.tfmg.content.deposits.surface_scanner.SurfaceScannerTileEntity;
import com.drmangotea.tfmg.content.machines.metal_processing.blast_furnace.blast_furnace_output.BlastFurnaceOutputBlockEntity;
import com.drmangotea.tfmg.content.machines.metal_processing.blast_furnace.blast_furnace_output.BlastFurnaceRenderer;
import com.drmangotea.tfmg.content.machines.metal_processing.coke_oven.CokeOvenBlockEntity;
import com.drmangotea.tfmg.content.machines.metal_processing.coke_oven.CokeOvenRenderer;
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower.DistillationControllerBlockEntity;
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.pipes.normal.LockablePipeBlockEntity;
import com.drmangotea.tfmg.content.tanks.SteelFluidTankRenderer;
import com.drmangotea.tfmg.content.tanks.SteelTankBlockEntity;
import com.drmangotea.tfmg.blocks.concrete.formwork.FormWorkBlockEntity;
import com.drmangotea.tfmg.blocks.concrete.formwork.FormWorkRenderer;
import com.drmangotea.tfmg.blocks.decoration.doors.TFMGSlidingDoorBlockEntity;
import com.drmangotea.tfmg.blocks.decoration.doors.TFMGSlidingDoorRenderer;
import com.drmangotea.tfmg.blocks.deposits.FluidDepositBlockEntity;
import com.drmangotea.tfmg.blocks.deposits.surface_scanner.SurfaceScannerBlockEntity;
import com.drmangotea.tfmg.blocks.deposits.surface_scanner.SurfaceScannerRenderer;
import com.drmangotea.tfmg.blocks.machines.metal_processing.blast_furnace.BlastFurnaceOutputBlockEntity;
import com.drmangotea.tfmg.blocks.machines.metal_processing.blast_furnace.BlastFurnaceRenderer;
import com.drmangotea.tfmg.blocks.machines.metal_processing.blast_furnace.MoltenMetalBlockEntity;
import com.drmangotea.tfmg.blocks.machines.metal_processing.coke_oven.CokeOvenBlockEntity;
import com.drmangotea.tfmg.blocks.machines.metal_processing.coke_oven.CokeOvenRenderer;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower.DistillationControllerBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower.DistillationOutputBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery.DistilleryControllerBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery.DistilleryOutputBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.base.PumpjackBaseRenderer;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.base.PumpjackBaseBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.crank.PumpjackCrankInstance;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.crank.PumpjackCrankRenderer;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.crank.PumpjackCrankBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderInstance;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderRenderer;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderBlockEntity;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.machine_input.MachineInputRenderer;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.machine_input.MachineInputBlockEntity;
import com.drmangotea.tfmg.blocks.pipes.normal.LockablePipeBlockEntity;
import com.drmangotea.tfmg.blocks.tanks.SteelFluidTankRenderer;
import com.drmangotea.tfmg.blocks.tanks.SteelTankBlockEntity;
import com.simibubi.create.content.fluids.pipes.SmartFluidPipeBlockEntity;
import com.simibubi.create.content.fluids.pipes.StraightPipeBlockEntity;
import com.simibubi.create.content.fluids.pipes.TransparentStraightPipeRenderer;
@@ -111,8 +112,8 @@ public class TFMGBlockEntities {
.renderer(() -> FluidValveRenderer::new)
.register();
public static final BlockEntityEntry<SurfaceScannerTileEntity> SURFACE_SCANNER = REGISTRATE
.blockEntity("deposit_scanner", SurfaceScannerTileEntity::new)
public static final BlockEntityEntry<SurfaceScannerBlockEntity> SURFACE_SCANNER = REGISTRATE
.blockEntity("deposit_scanner", SurfaceScannerBlockEntity::new)
.instance(() -> HorizontalHalfShaftInstance::new)
.validBlocks(TFMGBlocks.SURFACE_SCANNER)
.renderer(() -> SurfaceScannerRenderer::new)
@@ -178,6 +179,11 @@ public class TFMGBlockEntities {
.validBlocks(TFMGBlocks.COKE_OVEN)
.register();
public static final BlockEntityEntry<MoltenMetalBlockEntity> MOLTEN_METAL = REGISTRATE
.blockEntity("molten_metal", MoltenMetalBlockEntity::new)
.validBlocks(TFMGBlocks.MOLTEN_METAL)
.register();
public static void register() {}
}

View File

@@ -3,36 +3,37 @@ 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;
import com.drmangotea.tfmg.content.deposits.FluidDepositBlock;
import com.drmangotea.tfmg.content.gadgets.explosives.napalm.NapalmBombBlock;
import com.drmangotea.tfmg.content.items.CoalCokeBlockItem;
import com.drmangotea.tfmg.content.items.FossilstoneItem;
import com.drmangotea.tfmg.content.deposits.surface_scanner.SurfaceScannerBlock;
import com.drmangotea.tfmg.content.machines.metal_processing.blast_furnace.blast_furnace_output.BlastFurnaceOutputBlock;
import com.drmangotea.tfmg.content.machines.metal_processing.coke_oven.CokeOvenBlock;
import com.drmangotea.tfmg.content.machines.metal_processing.coke_oven.CokeOvenGenerator;
import com.drmangotea.tfmg.content.machines.oil_processing.distillation.distillation_tower.DistillationControllerBlock;
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.pipes.normal.steel.EncasedSteelPipeBlock;
import com.drmangotea.tfmg.content.pipes.normal.steel.GlassSteelPipeBlock;
import com.drmangotea.tfmg.content.pipes.normal.steel.SteelPipeAttachmentModel;
import com.drmangotea.tfmg.content.pipes.normal.steel.SteelPipeBlock;
import com.drmangotea.tfmg.content.pipes.pumps.TFMGPumpBlock;
import com.drmangotea.tfmg.content.pipes.smart_pipes.TFMGSmartFluidPipeBlock;
import com.drmangotea.tfmg.content.pipes.valves.TFMGFluidValveBlock;
import com.drmangotea.tfmg.content.tanks.SteelFluidTankModel;
import com.drmangotea.tfmg.content.tanks.SteelTankBlock;
import com.drmangotea.tfmg.content.tanks.SteelTankGenerator;
import com.drmangotea.tfmg.content.tanks.SteelTankItem;
import com.drmangotea.tfmg.blocks.concrete.formwork.FormWorkBlock;
import com.drmangotea.tfmg.blocks.concrete.formwork.FormWorkGenerator;
import com.drmangotea.tfmg.blocks.decoration.doors.TFMGSlidingDoorBlock;
import com.drmangotea.tfmg.blocks.deposits.FluidDepositBlock;
import com.drmangotea.tfmg.blocks.gadgets.explosives.napalm.NapalmBombBlock;
import com.drmangotea.tfmg.items.CoalCokeBlockItem;
import com.drmangotea.tfmg.items.FossilstoneItem;
import com.drmangotea.tfmg.blocks.deposits.surface_scanner.SurfaceScannerBlock;
import com.drmangotea.tfmg.blocks.machines.metal_processing.blast_furnace.BlastFurnaceOutputBlock;
import com.drmangotea.tfmg.blocks.machines.metal_processing.blast_furnace.MoltenMetalBlock;
import com.drmangotea.tfmg.blocks.machines.metal_processing.coke_oven.CokeOvenBlock;
import com.drmangotea.tfmg.blocks.machines.metal_processing.coke_oven.CokeOvenGenerator;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower.DistillationControllerBlock;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillation_tower.DistillationOutputBlock;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery.DistilleryControllerBlock;
import com.drmangotea.tfmg.blocks.machines.oil_processing.distillation.distillery.DistilleryOutputBlock;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.base.PumpjackBaseBlock;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.crank.PumpjackCrankBlock;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.hammer_holder.PumpjackHammerHolderBlock;
import com.drmangotea.tfmg.blocks.machines.oil_processing.pumpjack.machine_input.MachineInputBlock;
import com.drmangotea.tfmg.blocks.pipes.normal.steel.EncasedSteelPipeBlock;
import com.drmangotea.tfmg.blocks.pipes.normal.steel.GlassSteelPipeBlock;
import com.drmangotea.tfmg.blocks.pipes.normal.steel.SteelPipeAttachmentModel;
import com.drmangotea.tfmg.blocks.pipes.normal.steel.SteelPipeBlock;
import com.drmangotea.tfmg.blocks.pipes.pumps.TFMGPumpBlock;
import com.drmangotea.tfmg.blocks.pipes.smart_pipes.TFMGSmartFluidPipeBlock;
import com.drmangotea.tfmg.blocks.pipes.valves.TFMGFluidValveBlock;
import com.drmangotea.tfmg.blocks.tanks.SteelFluidTankModel;
import com.drmangotea.tfmg.blocks.tanks.SteelTankBlock;
import com.drmangotea.tfmg.blocks.tanks.SteelTankGenerator;
import com.drmangotea.tfmg.blocks.tanks.SteelTankItem;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllSpriteShifts;
import com.simibubi.create.content.decoration.encasing.CasingBlock;
@@ -43,7 +44,6 @@ import com.simibubi.create.content.fluids.pipes.SmartFluidPipeGenerator;
import com.simibubi.create.content.fluids.pipes.valve.FluidValveBlock;
import com.simibubi.create.content.kinetics.BlockStressDefaults;
import com.simibubi.create.content.processing.AssemblyOperatorBlockItem;
import com.simibubi.create.content.redstone.smartObserver.SmartObserverGenerator;
import com.simibubi.create.foundation.data.*;
import com.tterrag.registrate.util.entry.BlockEntry;
import net.minecraft.client.renderer.RenderType;
@@ -365,6 +365,16 @@ public static final BlockEntry<DistillationOutputBlock> STEEL_DISTILLATION_OUTPU
.build()
.lang("Blast Furnace Output")
.register();
public static final BlockEntry<MoltenMetalBlock> MOLTEN_METAL =
REGISTRATE.block("molten_metal", MoltenMetalBlock::new)
.initialProperties(SharedProperties.CRUSHING_WHEEL_CONTROLLER_MATERIAL)
.properties(p -> p.color(MaterialColor.COLOR_ORANGE))
.properties(p -> p.noOcclusion()
.noLootTable()
.air())
.blockstate((c, p) -> p.getVariantBuilder(c.get())
.forAllStatesExcept(BlockStateGen.mapToAir(p)))
.register();
//////////
public static final BlockEntry<CokeOvenBlock> COKE_OVEN = REGISTRATE.block("coke_oven", CokeOvenBlock::new)

View File

@@ -2,10 +2,10 @@ package com.drmangotea.tfmg.registry;
import com.drmangotea.tfmg.CreateTFMG;
import com.drmangotea.tfmg.base.spark.*;
import com.drmangotea.tfmg.content.gadgets.explosives.napalm.NapalmBombEntity;
import com.drmangotea.tfmg.content.gadgets.explosives.napalm.NapalmBombRenderer;
import com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades.ThermiteGrenade;
import com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades.ThermiteGrenadeRenderer;
import com.drmangotea.tfmg.blocks.gadgets.explosives.napalm.NapalmBombEntity;
import com.drmangotea.tfmg.blocks.gadgets.explosives.napalm.NapalmBombRenderer;
import com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades.ThermiteGrenade;
import com.drmangotea.tfmg.blocks.gadgets.explosives.thermite_grenades.ThermiteGrenadeRenderer;
import com.simibubi.create.foundation.data.CreateEntityBuilder;
import com.simibubi.create.foundation.utility.Lang;
import com.tterrag.registrate.util.entry.EntityEntry;

Some files were not shown because too many files have changed in this diff Show More