coke oven rendering+fluids
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_ingots_steel": {
|
||||
"conditions": {
|
||||
"items": [
|
||||
{
|
||||
"tag": "forge:ingots/steel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {
|
||||
"recipe": "createindustry:steel_ladder_from_ingots_steel_stonecutting"
|
||||
},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [
|
||||
[
|
||||
"has_ingots_steel",
|
||||
"has_the_recipe"
|
||||
]
|
||||
],
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"createindustry:steel_ladder_from_ingots_steel_stonecutting"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"count": 4,
|
||||
"ingredient": {
|
||||
"tag": "forge:ingots/steel"
|
||||
},
|
||||
"result": "createindustry:steel_bars"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"count": 2,
|
||||
"ingredient": {
|
||||
"tag": "forge:ingots/steel"
|
||||
},
|
||||
"result": "createindustry:steel_scaffolding"
|
||||
}
|
||||
@@ -36,10 +36,10 @@ public class TFMGSpriteShifts {
|
||||
|
||||
|
||||
public static final CTSpriteShiftEntry
|
||||
COKE_OVEN_TOP = getCT(AllCTTypes.RECTANGLE, "coke_oven_top"),
|
||||
COKE_OVEN_BOTTOM = getCT(AllCTTypes.RECTANGLE, "coke_oven_bottom"),
|
||||
COKE_OVEN_BACK = getCT(AllCTTypes.RECTANGLE, "coke_oven_back"),
|
||||
COKE_OVEN_SIDE = getCT(AllCTTypes.RECTANGLE, "coke_oven_side");
|
||||
COKE_OVEN_TOP = getCT(AllCTTypes.RECTANGLE, "coke_oven/top"),
|
||||
COKE_OVEN_BOTTOM = getCT(AllCTTypes.RECTANGLE, "coke_oven/bottom"),
|
||||
COKE_OVEN_BACK = getCT(AllCTTypes.RECTANGLE, "coke_oven/side"),
|
||||
COKE_OVEN_SIDE = getCT(AllCTTypes.RECTANGLE, "coke_oven/side");
|
||||
|
||||
|
||||
public static final CTSpriteShiftEntry
|
||||
|
||||
@@ -138,6 +138,7 @@ public class FlarestackBlockEntity extends SmartBlockEntity implements IHaveGogg
|
||||
stack.getFluid().isSame(TFMGFluids.DIESEL.getSource())||
|
||||
stack.getFluid().isSame(TFMGFluids.LUBRICATION_OIL.getSource())||
|
||||
stack.getFluid().isSame(TFMGFluids.HEAVY_OIL.getSource())||
|
||||
stack.getFluid().isSame(TFMGFluids.CREOSOTE.getSource())||
|
||||
stack.getFluid().isSame(TFMGFluids.GASOLINE.getSource());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -291,6 +291,9 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
CokeOvenBlockEntity checkedBE = (CokeOvenBlockEntity) level.getBlockEntity(checkedPos);
|
||||
checkedBE.controller = this;
|
||||
|
||||
if(checkedBE.getBlockState().getValue(FACING)!=getBlockState().getValue(FACING))
|
||||
level.setBlock(checkedPos,checkedBE.getBlockState().setValue(FACING,getBlockState().getValue(FACING)),2);
|
||||
|
||||
checkedPos = checkedPos.below();
|
||||
}
|
||||
|
||||
@@ -378,15 +381,15 @@ public class CokeOvenBlockEntity extends TFMGMachineBlockEntity implements IWren
|
||||
|
||||
// return true;
|
||||
// }
|
||||
|
||||
if(controller.getBlockPos() == getBlockPos()&&!isValid()){
|
||||
Lang.translate("goggles.coke_oven.invalid")
|
||||
.style(ChatFormatting.DARK_RED)
|
||||
.forGoggles(tooltip,1);
|
||||
if(controller!=null)
|
||||
if(controller.getBlockPos() == getBlockPos()&&!isValid()){
|
||||
Lang.translate("goggles.coke_oven.invalid")
|
||||
.style(ChatFormatting.DARK_RED)
|
||||
.forGoggles(tooltip,1);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.drmangotea.createindustry.blocks.machines.metal_processing.coke_oven;
|
||||
|
||||
import com.drmangotea.createindustry.CreateTFMG;
|
||||
import com.drmangotea.createindustry.base.TFMGSpriteShifts;
|
||||
import com.drmangotea.createindustry.registry.TFMGBlocks;
|
||||
import com.simibubi.create.AllSpriteShifts;
|
||||
import com.simibubi.create.api.connectivity.ConnectivityHandler;
|
||||
import com.simibubi.create.content.logistics.vault.ItemVaultBlock;
|
||||
@@ -11,10 +13,13 @@ import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.core.Direction.AxisDirection;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.BlockAndTintGetter;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import static com.drmangotea.createindustry.blocks.machines.metal_processing.coke_oven.CokeOvenBlock.CONTROLLER_TYPE;
|
||||
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
|
||||
|
||||
public class CokeOvenCTBehavior extends ConnectedTextureBehaviour.Base {
|
||||
@@ -22,46 +27,44 @@ public class CokeOvenCTBehavior extends ConnectedTextureBehaviour.Base {
|
||||
@Override
|
||||
public CTSpriteShiftEntry getShift(BlockState state, Direction direction, @Nullable TextureAtlasSprite sprite) {
|
||||
Direction cokeOvenDirection = state.getValue(FACING);
|
||||
boolean small = !ItemVaultBlock.isLarge(state);
|
||||
|
||||
if (cokeOvenDirection == null)
|
||||
return null;
|
||||
|
||||
if (direction == cokeOvenDirection.getOpposite())
|
||||
return TFMGSpriteShifts.COKE_OVEN_BACK;
|
||||
|
||||
if (direction == Direction.UP)
|
||||
return TFMGSpriteShifts.COKE_OVEN_TOP;
|
||||
if (direction == Direction.DOWN)
|
||||
return TFMGSpriteShifts.COKE_OVEN_BOTTOM;
|
||||
|
||||
return TFMGSpriteShifts.COKE_OVEN_SIDE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Direction getUpDirection(BlockAndTintGetter reader, BlockPos pos, BlockState state, Direction face) {
|
||||
Direction cokeOvenDirection =state.getValue(FACING);
|
||||
boolean alongX = cokeOvenDirection.getAxis() == Axis.X;
|
||||
if (face.getAxis()
|
||||
.isVertical() && alongX)
|
||||
return super.getUpDirection(reader, pos, state, face).getClockWise();
|
||||
if (face.getAxis() == cokeOvenDirection.getAxis() || face.getAxis()
|
||||
.isVertical())
|
||||
return super.getUpDirection(reader, pos, state, face);
|
||||
return Direction.fromAxisAndDirection(cokeOvenDirection.getAxis(), alongX ? AxisDirection.POSITIVE : AxisDirection.NEGATIVE);
|
||||
|
||||
if(face.getAxis().isVertical())
|
||||
return state.getValue(FACING).getOpposite();
|
||||
|
||||
return Direction.UP;
|
||||
}
|
||||
//
|
||||
//
|
||||
//
|
||||
@Override
|
||||
protected Direction getRightDirection(BlockAndTintGetter reader, BlockPos pos, BlockState state, Direction face) {
|
||||
//Axis vaultBlockAxis = ItemVaultBlock.getVaultBlockAxis(state);
|
||||
//if (face.getAxis()
|
||||
// .isVertical() && vaultBlockAxis == Axis.X)
|
||||
// return super.getRightDirection(reader, pos, state, face).getClockWise();
|
||||
//if (face.getAxis() == vaultBlockAxis || face.getAxis()
|
||||
// .isVertical())
|
||||
// return super.getRightDirection(reader, pos, state, face);
|
||||
//return Direction.fromAxisAndDirection(Axis.Y, face.getAxisDirection());
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected Direction getRightDirection(BlockAndTintGetter reader, BlockPos pos, BlockState state, Direction face) {
|
||||
Direction cokeOvenDirection =state.getValue(FACING);
|
||||
if (face.getAxis()
|
||||
.isVertical() && cokeOvenDirection.getAxis() == Axis.X)
|
||||
return super.getRightDirection(reader, pos, state, face).getClockWise();
|
||||
if (face.getAxis() == cokeOvenDirection.getAxis() || face.getAxis()
|
||||
.isVertical())
|
||||
return super.getRightDirection(reader, pos, state, face);
|
||||
return Direction.fromAxisAndDirection(Axis.Y, face.getAxisDirection());
|
||||
}
|
||||
return state.getValue(FACING).getClockWise();
|
||||
}
|
||||
|
||||
public boolean buildContextForOccludedDirections() {
|
||||
return super.buildContextForOccludedDirections();
|
||||
@@ -70,7 +73,17 @@ public class CokeOvenCTBehavior extends ConnectedTextureBehaviour.Base {
|
||||
@Override
|
||||
public boolean connectsTo(BlockState state, BlockState other, BlockAndTintGetter reader, BlockPos pos,
|
||||
BlockPos otherPos, Direction face) {
|
||||
return state == other && ConnectivityHandler.isConnected(reader, pos, otherPos); //ItemVaultConnectivityHandler.isConnected(reader, pos, otherPos);
|
||||
|
||||
|
||||
|
||||
//return true;
|
||||
|
||||
if(other.is(TFMGBlocks.COKE_OVEN.get())){
|
||||
if(other.getValue(FACING)==state.getValue(FACING))
|
||||
return super.connectsTo(state,other,reader,pos,otherPos,face);
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ public class TFMGFluids {
|
||||
|
||||
public static final ResourceLocation PROPANE_RL = CreateTFMG.asResource("fluid/propane");
|
||||
|
||||
public static final ResourceLocation AIR_RL = CreateTFMG.asResource("fluid/air");
|
||||
|
||||
public static final ResourceLocation CARBON_DIOXIDE_RL = CreateTFMG.asResource("fluid/carbon_dioxide");
|
||||
|
||||
public static final ResourceLocation NAPHTHA_STILL_RL = CreateTFMG.asResource("fluid/naphtha_still");
|
||||
@@ -57,6 +59,20 @@ public class TFMGFluids {
|
||||
public static final ResourceLocation CRUDE_OIL_STILL_RL = CreateTFMG.asResource("fluid/crude_oil_still");
|
||||
public static final ResourceLocation CRUDE_OIL_FLOW_RL = CreateTFMG.asResource("fluid/crude_oil_flow");
|
||||
|
||||
public static final ResourceLocation ASPHALT_RL = CreateTFMG.asResource("fluid/liquid_asphalt");
|
||||
|
||||
public static final ResourceLocation COOLING_FLUID_STILL_RL = CreateTFMG.asResource("fluid/cooling_fluid_still");
|
||||
public static final ResourceLocation COOLING_FLUID_FLOW_RL = CreateTFMG.asResource("fluid/cooling_fluid_flow");
|
||||
|
||||
public static final ResourceLocation CREOSOTE_STILL_RL = CreateTFMG.asResource("fluid/creosote_still");
|
||||
public static final ResourceLocation CREOSOTE_FLOW_RL = CreateTFMG.asResource("fluid/creosote_flow");
|
||||
|
||||
public static final ResourceLocation MOLTEN_STEEL_STILL_RL = CreateTFMG.asResource("fluid/molten_steel_still");
|
||||
public static final ResourceLocation MOLTEN_STEEL_FLOW_RL = CreateTFMG.asResource("fluid/molten_steel_flow");
|
||||
|
||||
public static final ResourceLocation MOLTEN_SLAG_STILL_RL = CreateTFMG.asResource("fluid/molten_slag_still");
|
||||
public static final ResourceLocation MOLTEN_SLAG_FLOW_RL = CreateTFMG.asResource("fluid/molten_slag_flow");
|
||||
|
||||
|
||||
public static final FluidEntry<VirtualFluid> CARBON_DIOXIDE
|
||||
= REGISTRATE.virtualFluid("carbon_dioxide",CARBON_DIOXIDE_RL,CARBON_DIOXIDE_RL)
|
||||
@@ -70,7 +86,7 @@ public class TFMGFluids {
|
||||
.register();
|
||||
|
||||
public static final FluidEntry<VirtualFluid> AIR =
|
||||
REGISTRATE.virtualFluid("air",LPG_RL,LPG_RL)
|
||||
REGISTRATE.virtualFluid("air",AIR_RL,AIR_RL)
|
||||
.lang("Air")
|
||||
.register();
|
||||
|
||||
@@ -129,7 +145,7 @@ public class TFMGFluids {
|
||||
.register();
|
||||
|
||||
public static final FluidEntry<ForgeFlowingFluid.Flowing> MOLTEN_STEEL =
|
||||
REGISTRATE.fluid("molten_steel",PLASTIC_STILL_RL,PLASTIC_FLOW_RL)
|
||||
REGISTRATE.fluid("molten_steel",MOLTEN_STEEL_STILL_RL,MOLTEN_STEEL_FLOW_RL)
|
||||
.lang("Molten Steel")
|
||||
.properties(b -> b.viscosity(1500)
|
||||
.density(1000))
|
||||
@@ -145,7 +161,7 @@ public class TFMGFluids {
|
||||
.register();
|
||||
|
||||
public static final FluidEntry<ForgeFlowingFluid.Flowing> MOLTEN_SLAG =
|
||||
REGISTRATE.fluid("molten_slag",PLASTIC_STILL_RL,PLASTIC_FLOW_RL)
|
||||
REGISTRATE.fluid("molten_slag",MOLTEN_SLAG_STILL_RL,MOLTEN_SLAG_FLOW_RL)
|
||||
.lang("Molten Slag")
|
||||
.properties(b -> b.viscosity(1500)
|
||||
.density(1000))
|
||||
@@ -275,7 +291,7 @@ public class TFMGFluids {
|
||||
.build()
|
||||
.register();
|
||||
public static final FluidEntry<ForgeFlowingFluid.Flowing> COOLING_FLUID =
|
||||
REGISTRATE.fluid("cooling_fluid",NAPALM_STILL_RL,NAPALM_FLOW_RL)
|
||||
REGISTRATE.fluid("cooling_fluid",COOLING_FLUID_STILL_RL,COOLING_FLUID_FLOW_RL)
|
||||
.lang("Cooling Fluid")
|
||||
.properties(b -> b.viscosity(1000)
|
||||
.density(1000))
|
||||
@@ -290,7 +306,7 @@ public class TFMGFluids {
|
||||
.build()
|
||||
.register();
|
||||
public static final FluidEntry<ForgeFlowingFluid.Flowing> CREOSOTE =
|
||||
REGISTRATE.fluid("creosote",NAPALM_STILL_RL,NAPALM_FLOW_RL)
|
||||
REGISTRATE.fluid("creosote",CREOSOTE_STILL_RL,CREOSOTE_FLOW_RL)
|
||||
.lang("Creosote")
|
||||
.properties(b -> b.viscosity(1000)
|
||||
.density(1000))
|
||||
@@ -326,7 +342,7 @@ public class TFMGFluids {
|
||||
.register();
|
||||
|
||||
public static final FluidEntry<ForgeFlowingFluid.Flowing> LIQUID_ASPHALT =
|
||||
REGISTRATE.fluid("liquid_asphalt",CONCRETE_RL,CONCRETE_RL,
|
||||
REGISTRATE.fluid("liquid_asphalt", ASPHALT_RL, ASPHALT_RL,
|
||||
ConcreteFluidType.create(0x333333,
|
||||
() -> 1f / 24f ))
|
||||
.lang("Liquid Asphalt")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"parent": "createindustry:block/coke_oven/controller",
|
||||
"textures": {
|
||||
"front": "createindustry:block/coke_oven"
|
||||
"front": "createindustry:block/coke_oven/side"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"parent": "createindustry:block/coke_oven/controller",
|
||||
"textures": {
|
||||
"front": "createindustry:block/coke_oven"
|
||||
"front": "createindustry:block/coke_oven/side"
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube",
|
||||
"textures": {
|
||||
"particle": "createindustry:block/coke_oven",
|
||||
"down": "createindustry:block/coke_oven",
|
||||
"up": "createindustry:block/coke_oven",
|
||||
"north": "createindustry:block/coke_oven",
|
||||
"east": "createindustry:block/coke_oven",
|
||||
"particle": "createindustry:block/coke_oven/side",
|
||||
"down": "createindustry:block/coke_oven/bottom",
|
||||
"up": "createindustry:block/coke_oven/top",
|
||||
"north": "createindustry:block/coke_oven/side",
|
||||
"east": "createindustry:block/coke_oven/side",
|
||||
"south": "#front",
|
||||
"west": "createindustry:block/coke_oven"
|
||||
"west": "createindustry:block/coke_oven/side"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 277 B |
|
After Width: | Height: | Size: 587 B |
|
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B |
|
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 218 B |
|
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 189 B |
|
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 211 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 201 B |
|
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 217 B |
|
After Width: | Height: | Size: 270 B |
|
After Width: | Height: | Size: 455 B |
|
After Width: | Height: | Size: 284 B |
|
After Width: | Height: | Size: 513 B |
|
Before Width: | Height: | Size: 289 B After Width: | Height: | Size: 465 B |
|
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 402 B |
BIN
src/main/resources/assets/createindustry/textures/fluid/air.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation": {
|
||||
"frametime": 2
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation": {
|
||||
"frametime": 2
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation": {
|
||||
"frametime": 2
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 7.7 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation": {
|
||||
"frametime": 2
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation": {
|
||||
"frametime": 2
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 225 B |
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 223 B |
@@ -18,14 +18,6 @@
|
||||
"chance": 0.15
|
||||
}
|
||||
],
|
||||
"processingTime": 250,
|
||||
"conditions": [
|
||||
{
|
||||
"value": {
|
||||
"tag": "forge:ores/aluminum",
|
||||
"type": "forge:tag_empty"
|
||||
},
|
||||
"type": "forge:not"
|
||||
}
|
||||
]
|
||||
"processingTime": 250
|
||||
|
||||
}
|
||||