fire!
This commit is contained in:
parent
6f6566a575
commit
f11024cdf5
9 changed files with 150 additions and 12 deletions
|
@ -1,5 +1,6 @@
|
||||||
package at.petrak.hexcasting.common.blocks.akashic;
|
package at.petrak.hexcasting.common.blocks.akashic;
|
||||||
|
|
||||||
|
import at.petrak.hexcasting.annotations.SoftImplement;
|
||||||
import at.petrak.hexcasting.common.blocks.decoration.BlockAxis;
|
import at.petrak.hexcasting.common.blocks.decoration.BlockAxis;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
|
@ -11,17 +12,18 @@ public class BlockAkashicLog extends BlockAxis {
|
||||||
super(props);
|
super(props);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
|
@SoftImplement("forge")
|
||||||
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@SoftImplement("forge")
|
||||||
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@SoftImplement("forge")
|
||||||
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,30 @@
|
||||||
package at.petrak.hexcasting.common.blocks.decoration;
|
package at.petrak.hexcasting.common.blocks.decoration;
|
||||||
|
|
||||||
|
import at.petrak.hexcasting.annotations.SoftImplement;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.world.level.BlockGetter;
|
||||||
import net.minecraft.world.level.block.DoorBlock;
|
import net.minecraft.world.level.block.DoorBlock;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
|
||||||
public class BlockHexDoor extends DoorBlock {
|
public class BlockHexDoor extends DoorBlock {
|
||||||
public BlockHexDoor(Properties $$0) {
|
public BlockHexDoor(Properties $$0) {
|
||||||
super($$0);
|
super($$0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,30 @@
|
||||||
package at.petrak.hexcasting.common.blocks.decoration;
|
package at.petrak.hexcasting.common.blocks.decoration;
|
||||||
|
|
||||||
|
import at.petrak.hexcasting.annotations.SoftImplement;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.world.level.BlockGetter;
|
||||||
import net.minecraft.world.level.block.PressurePlateBlock;
|
import net.minecraft.world.level.block.PressurePlateBlock;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
|
||||||
public class BlockHexPressurePlate extends PressurePlateBlock {
|
public class BlockHexPressurePlate extends PressurePlateBlock {
|
||||||
public BlockHexPressurePlate(Sensitivity $$0, Properties $$1) {
|
public BlockHexPressurePlate(Sensitivity $$0, Properties $$1) {
|
||||||
super($$0, $$1);
|
super($$0, $$1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
package at.petrak.hexcasting.common.blocks.decoration;
|
||||||
|
|
||||||
|
import at.petrak.hexcasting.annotations.SoftImplement;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.world.level.BlockGetter;
|
||||||
|
import net.minecraft.world.level.block.SlabBlock;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
|
||||||
|
public class BlockHexSlab extends SlabBlock {
|
||||||
|
public BlockHexSlab(Properties properties) {
|
||||||
|
super(properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,9 @@
|
||||||
package at.petrak.hexcasting.common.blocks.decoration;
|
package at.petrak.hexcasting.common.blocks.decoration;
|
||||||
|
|
||||||
|
import at.petrak.hexcasting.annotations.SoftImplement;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.world.level.BlockGetter;
|
||||||
import net.minecraft.world.level.block.StairBlock;
|
import net.minecraft.world.level.block.StairBlock;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
|
||||||
|
@ -7,4 +11,20 @@ public class BlockHexStairs extends StairBlock {
|
||||||
public BlockHexStairs(BlockState $$0, Properties $$1) {
|
public BlockHexStairs(BlockState $$0, Properties $$1) {
|
||||||
super($$0, $$1);
|
super($$0, $$1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,29 @@
|
||||||
package at.petrak.hexcasting.common.blocks.decoration;
|
package at.petrak.hexcasting.common.blocks.decoration;
|
||||||
|
|
||||||
|
import at.petrak.hexcasting.annotations.SoftImplement;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.world.level.BlockGetter;
|
||||||
import net.minecraft.world.level.block.TrapDoorBlock;
|
import net.minecraft.world.level.block.TrapDoorBlock;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
|
||||||
public class BlockHexTrapdoor extends TrapDoorBlock {
|
public class BlockHexTrapdoor extends TrapDoorBlock {
|
||||||
public BlockHexTrapdoor(Properties $$0) {
|
public BlockHexTrapdoor(Properties $$0) {
|
||||||
super($$0);
|
super($$0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,30 @@
|
||||||
package at.petrak.hexcasting.common.blocks.decoration;
|
package at.petrak.hexcasting.common.blocks.decoration;
|
||||||
|
|
||||||
|
import at.petrak.hexcasting.annotations.SoftImplement;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.world.level.BlockGetter;
|
||||||
import net.minecraft.world.level.block.WoodButtonBlock;
|
import net.minecraft.world.level.block.WoodButtonBlock;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
|
||||||
public class BlockHexWoodButton extends WoodButtonBlock {
|
public class BlockHexWoodButton extends WoodButtonBlock {
|
||||||
public BlockHexWoodButton(Properties $$0) {
|
public BlockHexWoodButton(Properties $$0) {
|
||||||
super($$0);
|
super($$0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SoftImplement("forge")
|
||||||
|
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ import at.petrak.hexcasting.common.blocks.circles.impetuses.BlockLookingImpetus;
|
||||||
import at.petrak.hexcasting.common.blocks.circles.impetuses.BlockRightClickImpetus;
|
import at.petrak.hexcasting.common.blocks.circles.impetuses.BlockRightClickImpetus;
|
||||||
import at.petrak.hexcasting.common.blocks.circles.impetuses.BlockStoredPlayerImpetus;
|
import at.petrak.hexcasting.common.blocks.circles.impetuses.BlockStoredPlayerImpetus;
|
||||||
import at.petrak.hexcasting.common.blocks.decoration.*;
|
import at.petrak.hexcasting.common.blocks.decoration.*;
|
||||||
import at.petrak.hexcasting.xplat.IXplatAbstractions;
|
|
||||||
import com.mojang.datafixers.util.Pair;
|
import com.mojang.datafixers.util.Pair;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
|
@ -154,15 +153,14 @@ public class HexBlocks {
|
||||||
public static final AmethystBlock AMETHYST_TILES = blockItem("amethyst_tiles",
|
public static final AmethystBlock AMETHYST_TILES = blockItem("amethyst_tiles",
|
||||||
new AmethystBlock(BlockBehaviour.Properties.copy(Blocks.AMETHYST_BLOCK)));
|
new AmethystBlock(BlockBehaviour.Properties.copy(Blocks.AMETHYST_BLOCK)));
|
||||||
public static final Block SCROLL_PAPER = blockItem("scroll_paper",
|
public static final Block SCROLL_PAPER = blockItem("scroll_paper",
|
||||||
IXplatAbstractions.INSTANCE.makeFlammable(papery(MaterialColor.TERRACOTTA_WHITE), 100, 60));
|
new BlockFlammable(papery(MaterialColor.TERRACOTTA_WHITE), 100, 60));
|
||||||
public static final Block ANCIENT_SCROLL_PAPER = blockItem("ancient_scroll_paper",
|
public static final Block ANCIENT_SCROLL_PAPER = blockItem("ancient_scroll_paper",
|
||||||
IXplatAbstractions.INSTANCE.makeFlammable(papery(MaterialColor.TERRACOTTA_ORANGE), 100, 60));
|
new BlockFlammable(papery(MaterialColor.TERRACOTTA_ORANGE), 100, 60));
|
||||||
public static final Block SCROLL_PAPER_LANTERN = blockItem("scroll_paper_lantern",
|
public static final Block SCROLL_PAPER_LANTERN = blockItem("scroll_paper_lantern",
|
||||||
IXplatAbstractions.INSTANCE.makeFlammable(papery(MaterialColor.TERRACOTTA_WHITE).lightLevel($ -> 15), 100, 60));
|
new BlockFlammable(papery(MaterialColor.TERRACOTTA_WHITE).lightLevel($ -> 15), 100, 60));
|
||||||
public static final Block ANCIENT_SCROLL_PAPER_LANTERN = blockItem(
|
public static final Block ANCIENT_SCROLL_PAPER_LANTERN = blockItem(
|
||||||
"ancient_scroll_paper_lantern",
|
"ancient_scroll_paper_lantern",
|
||||||
IXplatAbstractions.INSTANCE.makeFlammable(papery(MaterialColor.TERRACOTTA_ORANGE).lightLevel($ -> 12), 100,
|
new BlockFlammable(papery(MaterialColor.TERRACOTTA_ORANGE).lightLevel($ -> 12), 100, 60));
|
||||||
60));
|
|
||||||
public static final BlockSconce SCONCE = blockItem("amethyst_sconce",
|
public static final BlockSconce SCONCE = blockItem("amethyst_sconce",
|
||||||
new BlockSconce(BlockBehaviour.Properties.of(Material.AMETHYST, MaterialColor.COLOR_PURPLE)
|
new BlockSconce(BlockBehaviour.Properties.of(Material.AMETHYST, MaterialColor.COLOR_PURPLE)
|
||||||
.sound(SoundType.AMETHYST)
|
.sound(SoundType.AMETHYST)
|
||||||
|
@ -170,7 +168,7 @@ public class HexBlocks {
|
||||||
.lightLevel($ -> 15)));
|
.lightLevel($ -> 15)));
|
||||||
|
|
||||||
public static final Block AKASHIC_LOG = blockItem("akashic_log",
|
public static final Block AKASHIC_LOG = blockItem("akashic_log",
|
||||||
new BlockFlammable(akashicWoody(), 5, 5));
|
new BlockAkashicLog(akashicWoody()));
|
||||||
public static final BlockAxis AKASHIC_LOG_STRIPPED = blockItem("akashic_log_stripped",
|
public static final BlockAxis AKASHIC_LOG_STRIPPED = blockItem("akashic_log_stripped",
|
||||||
new BlockAkashicLog(akashicWoody()));
|
new BlockAkashicLog(akashicWoody()));
|
||||||
public static final Block AKASHIC_WOOD = blockItem("akashic_log",
|
public static final Block AKASHIC_WOOD = blockItem("akashic_log",
|
||||||
|
@ -190,7 +188,7 @@ public class HexBlocks {
|
||||||
public static final StairBlock AKASHIC_STAIRS = blockItem("akashic_stairs",
|
public static final StairBlock AKASHIC_STAIRS = blockItem("akashic_stairs",
|
||||||
new BlockHexStairs(AKASHIC_PLANKS.defaultBlockState(), akashicWoody().noOcclusion()));
|
new BlockHexStairs(AKASHIC_PLANKS.defaultBlockState(), akashicWoody().noOcclusion()));
|
||||||
public static final SlabBlock AKASHIC_SLAB = blockItem("akashic_slab",
|
public static final SlabBlock AKASHIC_SLAB = blockItem("akashic_slab",
|
||||||
new SlabBlock(akashicWoody().noOcclusion()));
|
new BlockHexSlab(akashicWoody().noOcclusion()));
|
||||||
public static final WoodButtonBlock AKASHIC_BUTTON = blockItem("akashic_button",
|
public static final WoodButtonBlock AKASHIC_BUTTON = blockItem("akashic_button",
|
||||||
new BlockHexWoodButton(akashicWoody().noOcclusion()));
|
new BlockHexWoodButton(akashicWoody().noOcclusion()));
|
||||||
public static final PressurePlateBlock AKASHIC_PRESSURE_PLATE = blockItem("akashic_pressure_plate",
|
public static final PressurePlateBlock AKASHIC_PRESSURE_PLATE = blockItem("akashic_pressure_plate",
|
||||||
|
|
|
@ -81,11 +81,16 @@ object FabricHexInitializer : ModInitializer {
|
||||||
HexBlocks.SCROLL_PAPER_LANTERN,
|
HexBlocks.SCROLL_PAPER_LANTERN,
|
||||||
HexBlocks.ANCIENT_SCROLL_PAPER,
|
HexBlocks.ANCIENT_SCROLL_PAPER,
|
||||||
HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN,
|
HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN,
|
||||||
|
|
||||||
|
)) {
|
||||||
|
flameOn.add(papery, 100, 60)
|
||||||
|
}
|
||||||
|
for (leaves in listOf(
|
||||||
HexBlocks.AKASHIC_LEAVES1,
|
HexBlocks.AKASHIC_LEAVES1,
|
||||||
HexBlocks.AKASHIC_LEAVES2,
|
HexBlocks.AKASHIC_LEAVES2,
|
||||||
HexBlocks.AKASHIC_LEAVES3,
|
HexBlocks.AKASHIC_LEAVES3,
|
||||||
)) {
|
)) {
|
||||||
flameOn.add(papery, 100, 60)
|
flameOn.add(leaves, 60, 30)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue