This commit is contained in:
gamma-delta 2022-05-09 10:10:43 -05:00
parent 6f6566a575
commit f11024cdf5
9 changed files with 150 additions and 12 deletions

View file

@ -1,5 +1,6 @@
package at.petrak.hexcasting.common.blocks.akashic;
import at.petrak.hexcasting.annotations.SoftImplement;
import at.petrak.hexcasting.common.blocks.decoration.BlockAxis;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@ -11,17 +12,18 @@ public class BlockAkashicLog extends BlockAxis {
super(props);
}
@Override
@SoftImplement("forge")
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return true;
}
@Override
@SoftImplement("forge")
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return 5;
}
@Override
@SoftImplement("forge")
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return 5;
}

View file

@ -1,9 +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.DoorBlock;
import net.minecraft.world.level.block.state.BlockState;
public class BlockHexDoor extends DoorBlock {
public BlockHexDoor(Properties $$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;
}
}

View file

@ -1,9 +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.PressurePlateBlock;
import net.minecraft.world.level.block.state.BlockState;
public class BlockHexPressurePlate extends PressurePlateBlock {
public BlockHexPressurePlate(Sensitivity $$0, Properties $$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;
}
}

View file

@ -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;
}
}

View file

@ -1,5 +1,9 @@
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.state.BlockState;
@ -7,4 +11,20 @@ public class BlockHexStairs extends StairBlock {
public BlockHexStairs(BlockState $$0, Properties $$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;
}
}

View file

@ -1,9 +1,29 @@
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.state.BlockState;
public class BlockHexTrapdoor extends TrapDoorBlock {
public BlockHexTrapdoor(Properties $$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;
}
}

View file

@ -1,9 +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.WoodButtonBlock;
import net.minecraft.world.level.block.state.BlockState;
public class BlockHexWoodButton extends WoodButtonBlock {
public BlockHexWoodButton(Properties $$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;
}
}

View file

@ -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.BlockStoredPlayerImpetus;
import at.petrak.hexcasting.common.blocks.decoration.*;
import at.petrak.hexcasting.xplat.IXplatAbstractions;
import com.mojang.datafixers.util.Pair;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EntityType;
@ -154,15 +153,14 @@ public class HexBlocks {
public static final AmethystBlock AMETHYST_TILES = blockItem("amethyst_tiles",
new AmethystBlock(BlockBehaviour.Properties.copy(Blocks.AMETHYST_BLOCK)));
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",
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",
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(
"ancient_scroll_paper_lantern",
IXplatAbstractions.INSTANCE.makeFlammable(papery(MaterialColor.TERRACOTTA_ORANGE).lightLevel($ -> 12), 100,
60));
new BlockFlammable(papery(MaterialColor.TERRACOTTA_ORANGE).lightLevel($ -> 12), 100, 60));
public static final BlockSconce SCONCE = blockItem("amethyst_sconce",
new BlockSconce(BlockBehaviour.Properties.of(Material.AMETHYST, MaterialColor.COLOR_PURPLE)
.sound(SoundType.AMETHYST)
@ -170,7 +168,7 @@ public class HexBlocks {
.lightLevel($ -> 15)));
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",
new BlockAkashicLog(akashicWoody()));
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",
new BlockHexStairs(AKASHIC_PLANKS.defaultBlockState(), akashicWoody().noOcclusion()));
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",
new BlockHexWoodButton(akashicWoody().noOcclusion()));
public static final PressurePlateBlock AKASHIC_PRESSURE_PLATE = blockItem("akashic_pressure_plate",

View file

@ -81,11 +81,16 @@ object FabricHexInitializer : ModInitializer {
HexBlocks.SCROLL_PAPER_LANTERN,
HexBlocks.ANCIENT_SCROLL_PAPER,
HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN,
)) {
flameOn.add(papery, 100, 60)
}
for (leaves in listOf(
HexBlocks.AKASHIC_LEAVES1,
HexBlocks.AKASHIC_LEAVES2,
HexBlocks.AKASHIC_LEAVES3,
)) {
flameOn.add(papery, 100, 60)
flameOn.add(leaves, 60, 30)
}
}