Blaze heater fan interaction

- moved fan transparent blocks to block tag
- added blaze heater as transparent
- blaze heater on lowest level is now a valid bulk smokig block
- blaze heater on heat 2 and higher is now a valid bulk smelting block (that requires fuel but does not spill lava or set your house on fire)
This commit is contained in:
LordGrimmauld 2020-07-14 00:05:22 +02:00
parent 509edd9181
commit 42b78b01eb
8 changed files with 30 additions and 10 deletions

View file

@ -2481,6 +2481,7 @@ d3fdb8ece6cb072a93ddb64a0baad5ac952117a4 data/create/recipes/weathered_limestone
11667414f73bc2d00bda7c5c1a7d2934bf6e9165 data/create/recipes/weathered_limestone_pillar_from_weathered_limestone_stonecutting.json
266f08e604d229a9d2b46f7272c0b06ec270bf3d data/create/recipes/zinc_block.json
403576ae5710d4fe731144fe623b1673093076ea data/create/tags/blocks/brittle.json
06d3931993d4f61713390416f1e6fe1a0b5aaf43 data/create/tags/blocks/fan_transparent.json
081f5aa35602fc27af2ca01ea9f2fd5e7eb284dc data/create/tags/items/create_ingots.json
d2dc4ff179ef7b2aa9276455c196e15d44aa95a8 data/create/tags/items/crushed_ores.json
16bcb8fcbe9170c2c11f1ca8d99d8b36cd812bbd data/forge/tags/blocks/glass/colorless.json

View file

@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"create:blaze_heater"
]
}

View file

@ -404,6 +404,7 @@ public class AllBlocks {
.initialProperties(SharedProperties::softMetal)
.properties(p -> p.lightValue(12))
.addLayer(() -> RenderType::getCutoutMipped)
.tag(AllBlockTags.FAN_TRANSPARENT.tag)
.blockstate((c, p) -> p.simpleBlock(c.getEntry(), AssetLookup.partialBaseModel(c, p)))
.item(HeaterBlockItem::new)
.build()

View file

@ -88,7 +88,7 @@ public class AllTags {
}
public static enum AllBlockTags {
WINDMILL_SAILS, FAN_HEATERS, WINDOWABLE, NON_MOVABLE, BRITTLE
WINDMILL_SAILS, FAN_HEATERS, WINDOWABLE, NON_MOVABLE, BRITTLE, FAN_TRANSPARENT
;

View file

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import com.simibubi.create.AllTags;
import org.apache.commons.lang3.tuple.Pair;
import com.simibubi.create.content.contraptions.particle.AirFlowParticleData;
@ -304,11 +305,7 @@ public class AirCurrent {
}
private static boolean shouldAlwaysPass(BlockState state) {
if (state.isIn(Tags.Blocks.FENCES))
return true;
if (state.getBlock() == Blocks.IRON_BARS)
return true;
return false;
return AllTags.AllBlockTags.FAN_TRANSPARENT.matches(state);
}
public InWorldProcessing.Type getSegmentAt(float offset) {

View file

@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.fan;
import com.simibubi.create.AllTags.AllBlockTags;
import com.simibubi.create.content.contraptions.base.GeneratingKineticTileEntity;
import com.simibubi.create.content.contraptions.processing.HeaterBlock;
import com.simibubi.create.content.contraptions.processing.HeaterTileEntity;
import com.simibubi.create.content.logistics.block.chute.ChuteTileEntity;
import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.config.CKinetics;
@ -75,9 +75,10 @@ public class EncasedFanTileEntity extends GeneratingKineticTileEntity {
public boolean blockBelowIsHot() {
BlockState checkState = world.getBlockState(pos.down());
TileEntity te = world.getTileEntity(pos.down());
return checkState.getBlock()
.isIn(AllBlockTags.FAN_HEATERS.tag)
|| (checkState.has(HeaterBlock.HAS_BLAZE) && checkState.get(HeaterBlock.HAS_BLAZE));
|| (te instanceof HeaterTileEntity && ((HeaterTileEntity) te).getHeatLevel() >= 2);
}
public float getMaxDistance() {

View file

@ -7,6 +7,7 @@ import java.util.Optional;
import com.simibubi.create.AllRecipeTypes;
import com.simibubi.create.content.contraptions.components.fan.SplashingRecipe;
import com.simibubi.create.content.contraptions.processing.HeaterTileEntity;
import com.simibubi.create.content.contraptions.processing.ProcessingRecipe;
import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack;
import com.simibubi.create.foundation.config.AllConfigs;
@ -31,6 +32,7 @@ import net.minecraft.particles.RedstoneParticleData;
import net.minecraft.tileentity.BlastFurnaceTileEntity;
import net.minecraft.tileentity.FurnaceTileEntity;
import net.minecraft.tileentity.SmokerTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.IBlockReader;
@ -60,12 +62,17 @@ public class InWorldProcessing {
if (fluidState.getFluid() == Fluids.WATER || fluidState.getFluid() == Fluids.FLOWING_WATER)
return Type.SPLASHING;
if (blockState.getBlock() == Blocks.FIRE
|| (blockState.getBlock() == Blocks.CAMPFIRE && blockState.get(CampfireBlock.LIT)))
|| (blockState.getBlock() == Blocks.CAMPFIRE && blockState.get(CampfireBlock.LIT)) || getHeaterLevel(reader, pos) == 1)
return Type.SMOKING;
if (blockState.getBlock() == Blocks.LAVA)
if (blockState.getBlock() == Blocks.LAVA || getHeaterLevel(reader, pos) >= 2)
return Type.BLASTING;
return null;
}
private static int getHeaterLevel(IBlockReader reader, BlockPos pos) {
TileEntity te = reader.getTileEntity(pos);
return te instanceof HeaterTileEntity ? ((HeaterTileEntity) te).getHeatLevel() : 0;
}
}
public static boolean canProcess(ItemEntity entity, Type type) {

View file

@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"#minecraft:fences",
"minecraft:iron_bars"
]
}