Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ~~~~~~~~~~~~DataUtils~~~~~~~~~~~~~
- public static void registerFlammable(Block block, int encouragement, int flammability) {
- FireUtils fire = (FireUtils) Blocks.FIRE;
- fire.setFireInfo(block, encouragement, flammability);
- }
- ~~~~~~~~~~~~FireUtils~~~~~~~~~~~~~
- public class FireUtils extends FireBlock {
- protected static final Object2IntMap<Block> encouragements = new Object2IntOpenHashMap<>();
- protected static final Object2IntMap<Block> flammabilities = new Object2IntOpenHashMap<>();
- public FireUtils(Properties builder) {
- super(builder);
- }
- public void setFireInfo(Block blockIn, int encouragement, int flammability) {
- if (blockIn == Blocks.AIR) throw new IllegalArgumentException("Tried to set air on fire... This is bad.");
- FireUtils.encouragements.put(blockIn, encouragement);
- FireUtils.flammabilities.put(blockIn, flammability);
- }
- }
- ~~~~~~~~~RegisterCommon~~~~~~~~~~
- public static void registerFlammables() {
- // Wood & Trees
- DataUtils.registerFlammable(ModBlocks.LAVENDER_PLANKS.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.CHERRY_PLANKS.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.STRAWBERRY_PLANKS.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.LAVENDER_STAIRS.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.CHERRY_STAIRS.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.STRAWBERRY_STAIRS.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.LAVENDER_SLAB.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.STRAWBERRY_SLAB.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.CHERRY_SLAB.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.LAVENDER_FENCE.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.STRAWBERRY_FENCE.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.CHERRY_FENCE.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.LAVENDER_FENCE_GATE.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.STRAWBERRY_FENCE_GATE.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.CHERRY_FENCE_GATE.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.VERTICAL_LAVENDER_PLANKS.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.VERTICAL_STRAWBERRY_PLANKS.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.VERTICAL_CHERRY_PLANKS.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.VERTICAL_LAVENDER_SLAB.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.VERTICAL_STRAWBERRY_SLAB.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.VERTICAL_CHERRY_SLAB.get(), 5, 20);
- DataUtils.registerFlammable(ModBlocks.LAVENDER_LOG.get(), 5, 5);
- DataUtils.registerFlammable(ModBlocks.STRAWBERRY_LOG.get(), 5, 5);
- DataUtils.registerFlammable(ModBlocks.CHERRY_LOG.get(), 5, 5);
- DataUtils.registerFlammable(ModBlocks.LAVENDER_WOOD.get(), 5, 5);
- DataUtils.registerFlammable(ModBlocks.STRAWBERRY_WOOD.get(), 5, 5);
- DataUtils.registerFlammable(ModBlocks.CHERRY_WOOD.get(), 5, 5);
- DataUtils.registerFlammable(ModBlocks.STRIPPED_LAVENDER_LOG.get(), 5, 5);
- DataUtils.registerFlammable(ModBlocks.STRIPPED_STRAWBERRY_LOG.get(), 5, 5);
- DataUtils.registerFlammable(ModBlocks.STRIPPED_CHERRY_LOG.get(), 5, 5);
- DataUtils.registerFlammable(ModBlocks.STRIPPED_LAVENDER_WOOD.get(), 5, 5);
- DataUtils.registerFlammable(ModBlocks.STRIPPED_STRAWBERRY_WOOD.get(), 5, 5);
- DataUtils.registerFlammable(ModBlocks.STRIPPED_CHERRY_WOOD.get(), 5, 5);
- // Leaves
- DataUtils.registerFlammable(ModBlocks.LAVENDER_BLOSSOM_LEAVES.get(), 30, 60);
- DataUtils.registerFlammable(ModBlocks.STRAWBERRY_BLOSSOM_LEAVES.get(), 30, 60);
- DataUtils.registerFlammable(ModBlocks.SWEET_BLOSSOM_LEAVES.get(), 30, 60);
- DataUtils.registerFlammable(ModBlocks.PINK_CHERRY_BLOSSOM_LEAVES.get(), 30, 60);
- DataUtils.registerFlammable(ModBlocks.WHITE_CHERRY_BLOSSOM_LEAVES.get(), 30, 60);
- DataUtils.registerFlammable(ModBlocks.LAVENDER_BLOSSOM_LEAF_CARPET.get(), 30, 60);
- DataUtils.registerFlammable(ModBlocks.STRAWBERRY_BLOSSOM_LEAF_CARPET.get(), 30, 60);
- DataUtils.registerFlammable(ModBlocks.SWEET_BLOSSOM_LEAF_CARPET.get(), 30, 60);
- DataUtils.registerFlammable(ModBlocks.PINK_CHERRY_BLOSSOM_LEAF_CARPET.get(), 30, 60);
- DataUtils.registerFlammable(ModBlocks.WHITE_CHERRY_BLOSSOM_LEAF_CARPET.get(), 30, 60);
- // Flowers & Nature
- DataUtils.registerFlammable(ModBlocks.LAVENDER.get(), 60, 100);
- DataUtils.registerFlammable(ModBlocks.WHITE_WILDFLOWER.get(), 60, 100);
- DataUtils.registerFlammable(ModBlocks.PINK_WILDFLOWER.get(), 60, 100);
- DataUtils.registerFlammable(ModBlocks.STRAWBERRY_BUSH.get(), 60, 100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement