diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 76b1f48b5..dc09e9419 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -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 diff --git a/src/generated/resources/data/create/tags/blocks/fan_transparent.json b/src/generated/resources/data/create/tags/blocks/fan_transparent.json new file mode 100644 index 000000000..2cf03ca08 --- /dev/null +++ b/src/generated/resources/data/create/tags/blocks/fan_transparent.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "create:blaze_heater" + ] +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index a6c86d494..e1a041167 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -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() diff --git a/src/main/java/com/simibubi/create/AllTags.java b/src/main/java/com/simibubi/create/AllTags.java index 72a957c20..4916a1129 100644 --- a/src/main/java/com/simibubi/create/AllTags.java +++ b/src/main/java/com/simibubi/create/AllTags.java @@ -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 ; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/fan/AirCurrent.java b/src/main/java/com/simibubi/create/content/contraptions/components/fan/AirCurrent.java index d9bf3a889..8331bcf87 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/fan/AirCurrent.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/fan/AirCurrent.java @@ -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) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanTileEntity.java index 7c8a2606e..e6e95bae4 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanTileEntity.java @@ -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() { diff --git a/src/main/java/com/simibubi/create/content/logistics/InWorldProcessing.java b/src/main/java/com/simibubi/create/content/logistics/InWorldProcessing.java index 9aa814255..2a26cb3c0 100644 --- a/src/main/java/com/simibubi/create/content/logistics/InWorldProcessing.java +++ b/src/main/java/com/simibubi/create/content/logistics/InWorldProcessing.java @@ -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) { diff --git a/src/main/resources/data/create/tags/blocks/fan_transparent.json b/src/main/resources/data/create/tags/blocks/fan_transparent.json new file mode 100644 index 000000000..1d51b2a42 --- /dev/null +++ b/src/main/resources/data/create/tags/blocks/fan_transparent.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "#minecraft:fences", + "minecraft:iron_bars" + ] +} \ No newline at end of file