From 9c9e285acf4fe13ee2b9ee6351a5b3bc2f4d6207 Mon Sep 17 00:00:00 2001 From: Agatha Rose Date: Tue, 16 Mar 2021 20:57:20 +0200 Subject: [PATCH] * add asbestos tiles and popcorn ceilings * add mod config * add blocks that are dangerous to break --- build.gradle | 8 ++++ gradle.properties | 5 ++- .../dev/agatharose/asbestos/Asbestos.java | 33 ++++++++++++++-- .../asbestos/CarcinogenicBlock.java | 36 ++++++++++++++++++ .../asbestos/MesotheliomaStatusEffect.java | 9 +++-- .../asbestos/config/AsbestosConfig.java | 28 ++++++++++++++ .../asbestos/config/ModMenuIntegration.java | 16 ++++++++ .../agatharose/asbestos/item/ScraperItem.java | 7 +++- .../asbestos/scheduler/MesotheliomaSched.java | 21 +++++----- .../blockstates/asbestos_tile_block.json | 7 ++++ .../blockstates/popcorn_ceiling_block.json | 7 ++++ .../resources/assets/asbestos/lang/en_us.json | 13 ++++++- .../models/block/asbestos_tile_block.json | 6 +++ .../models/block/popcorn_ceiling_block.json | 8 ++++ .../models/item/asbestos_tile_block.json | 3 ++ .../models/item/popcorn_ceiling_block.json | 3 ++ .../textures/block/asbestos_tiles.png | Bin 0 -> 319 bytes .../textures/block/popcorn_bottom.png | Bin 0 -> 474 bytes .../asbestos/textures/block/popcorn_side.png | Bin 0 -> 467 bytes .../asbestos/textures/block/popcorn_top.png | Bin 0 -> 370 bytes .../blocks/asbestos_tile_block.json | 19 +++++++++ .../blocks/popcorn_ceiling_block.json | 19 +++++++++ .../asbestos/recipes/asbestos_tile_block.json | 19 +++++++++ .../recipes/popcorn_ceiling_block.json | 22 +++++++++++ src/main/resources/fabric.mod.json | 3 ++ 25 files changed, 270 insertions(+), 22 deletions(-) create mode 100644 src/main/java/dev/agatharose/asbestos/CarcinogenicBlock.java create mode 100644 src/main/java/dev/agatharose/asbestos/config/AsbestosConfig.java create mode 100644 src/main/java/dev/agatharose/asbestos/config/ModMenuIntegration.java create mode 100644 src/main/resources/assets/asbestos/blockstates/asbestos_tile_block.json create mode 100644 src/main/resources/assets/asbestos/blockstates/popcorn_ceiling_block.json create mode 100644 src/main/resources/assets/asbestos/models/block/asbestos_tile_block.json create mode 100644 src/main/resources/assets/asbestos/models/block/popcorn_ceiling_block.json create mode 100644 src/main/resources/assets/asbestos/models/item/asbestos_tile_block.json create mode 100644 src/main/resources/assets/asbestos/models/item/popcorn_ceiling_block.json create mode 100644 src/main/resources/assets/asbestos/textures/block/asbestos_tiles.png create mode 100644 src/main/resources/assets/asbestos/textures/block/popcorn_bottom.png create mode 100644 src/main/resources/assets/asbestos/textures/block/popcorn_side.png create mode 100644 src/main/resources/assets/asbestos/textures/block/popcorn_top.png create mode 100644 src/main/resources/data/asbestos/loot_tables/blocks/asbestos_tile_block.json create mode 100644 src/main/resources/data/asbestos/loot_tables/blocks/popcorn_ceiling_block.json create mode 100644 src/main/resources/data/asbestos/recipes/asbestos_tile_block.json create mode 100644 src/main/resources/data/asbestos/recipes/popcorn_ceiling_block.json diff --git a/build.gradle b/build.gradle index 7017e6f..2930289 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,9 @@ repositories { name = "Ladysnake Libs" url = "https://dl.bintray.com/ladysnake/libs" } + maven { + url "https://maven.shedaniel.me/" + } maven { url "https://jitpack.io" } @@ -38,6 +41,11 @@ dependencies { exclude(group: "net.fabricmc.fabric-api") } + // Cloth Config + modApi("me.shedaniel.cloth:cloth-config-fabric:${cloth_version}") { + exclude(group: "net.fabricmc.fabric-api") + } + // CardinalComponentsAPI modApi "io.github.onyxstudios.Cardinal-Components-API:cardinal-components-base:${cca_version}" modApi "io.github.onyxstudios.Cardinal-Components-API:cardinal-components-entity:${cca_version}" diff --git a/gradle.properties b/gradle.properties index 144eaf5..0fa0685 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.10.7 # Mod Properties - mod_version = 1.0.1 + mod_version = 1.1 maven_group = dev.agatharose archives_base_name = asbestos @@ -16,4 +16,5 @@ org.gradle.jvmargs=-Xmx1G # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api fabric_version=0.25.1+build.416-1.16 modmenu_version=1.14.6+build.31 - cca_version=2.7.9 \ No newline at end of file + cca_version=2.7.9 + cloth_version=4.10.13 \ No newline at end of file diff --git a/src/main/java/dev/agatharose/asbestos/Asbestos.java b/src/main/java/dev/agatharose/asbestos/Asbestos.java index 7a17ee5..9f73a1b 100644 --- a/src/main/java/dev/agatharose/asbestos/Asbestos.java +++ b/src/main/java/dev/agatharose/asbestos/Asbestos.java @@ -2,6 +2,7 @@ package dev.agatharose.asbestos; import dev.agatharose.asbestos.component.MesotheliomaComponent; import dev.agatharose.asbestos.component.PlayerMesotheliomaComponent; +import dev.agatharose.asbestos.config.AsbestosConfig; import dev.agatharose.asbestos.item.ScraperItem; import dev.agatharose.asbestos.item.ScraperToolMaterial; import dev.agatharose.asbestos.scheduler.MesotheliomaSched; @@ -9,6 +10,8 @@ import dev.onyxstudios.cca.api.v3.component.ComponentKey; import dev.onyxstudios.cca.api.v3.component.ComponentRegistryV3; import dev.onyxstudios.cca.api.v3.entity.EntityComponentFactoryRegistry; import dev.onyxstudios.cca.api.v3.entity.EntityComponentInitializer; +import me.shedaniel.autoconfig.AutoConfig; +import me.shedaniel.autoconfig.serializer.Toml4jConfigSerializer; import nerdhub.cardinal.components.api.util.RespawnCopyStrategy; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.biome.v1.BiomeModifications; @@ -52,11 +55,18 @@ public class Asbestos implements ModInitializer, EntityComponentInitializer { .statusEffect(new StatusEffectInstance(StatusEffects.WITHER, 30 * 20, 4, false, false), 1.0f) .build())); - public static final Block ASBESTOS_BLOCK = new Block( - FabricBlockSettings.of(Material.WOOL).hardness(1.0f).sounds(BlockSoundGroup.WOOL)); + public static final CarcinogenicBlock ASBESTOS_BLOCK = new CarcinogenicBlock( + FabricBlockSettings.of(Material.WOOL).hardness(1.0f).sounds(BlockSoundGroup.WOOL), 40); - public static final Block SERPENTINITE_BLOCK = new Block( - FabricBlockSettings.of(Material.STONE).hardness(2.0f).breakByTool(FabricToolTags.PICKAXES).requiresTool()); + public static final CarcinogenicBlock SERPENTINITE_BLOCK = new CarcinogenicBlock( + FabricBlockSettings.of(Material.STONE).hardness(3.0f).breakByTool(FabricToolTags.PICKAXES).requiresTool(), + 20); + + public static final CarcinogenicBlock POPCORN_CEILING_BLOCK = new CarcinogenicBlock(FabricBlockSettings + .of(Material.WOOD).hardness(2.0f).breakByTool(FabricToolTags.AXES).sounds(BlockSoundGroup.WOOD), 20); + + public static final CarcinogenicBlock ASBESTOS_TILE_BLOCK = new CarcinogenicBlock( + FabricBlockSettings.of(Material.STONE).hardness(3.0f).sounds(BlockSoundGroup.NETHER_BRICKS), 20); public static ToolItem IRON_SCRAPER = new ScraperItem(ScraperToolMaterial.INSTANCE, 0.0f, -3.0f, new Item.Settings().group(ItemGroup.TOOLS)); @@ -70,6 +80,9 @@ public class Asbestos implements ModInitializer, EntityComponentInitializer { SERPENTINITE_BLOCK.getDefaultState(), 5)) .decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(0, 0, 32))).spreadHorizontally().repeat(10); + // blocks that will contribute to mesothelioma levels without being broken + public static Block[] HARMFUL_PASSIVE_BLOCKS = { ASBESTOS_BLOCK }; + @Override public void onInitialize() { // asbestos fibers item @@ -85,6 +98,16 @@ public class Asbestos implements ModInitializer, EntityComponentInitializer { Registry.register(Registry.ITEM, new Identifier("asbestos", "serpentinite_block"), new BlockItem(SERPENTINITE_BLOCK, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); + // popcorn ceiling block + Registry.register(Registry.BLOCK, new Identifier("asbestos", "popcorn_ceiling_block"), POPCORN_CEILING_BLOCK); + Registry.register(Registry.ITEM, new Identifier("asbestos", "popcorn_ceiling_block"), + new BlockItem(POPCORN_CEILING_BLOCK, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS).fireproof())); + + // asbestos tile block + Registry.register(Registry.BLOCK, new Identifier("asbestos", "asbestos_tile_block"), ASBESTOS_TILE_BLOCK); + Registry.register(Registry.ITEM, new Identifier("asbestos", "asbestos_tile_block"), + new BlockItem(ASBESTOS_TILE_BLOCK, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS))); + // serpentinite worldgen RegistryKey> serpentiniteOverworld = RegistryKey .of(Registry.CONFIGURED_FEATURE_WORLDGEN, new Identifier("asbestos", "serpentinite_overworld")); @@ -100,6 +123,8 @@ public class Asbestos implements ModInitializer, EntityComponentInitializer { // mesothelioma status effect Registry.register(Registry.STATUS_EFFECT, new Identifier("asbestos", "mesothelioma"), MESOTHELIOMA_EFFECT); + AutoConfig.register(AsbestosConfig.class, Toml4jConfigSerializer::new); + // Mesothelioma tick scheduler MesotheliomaSched.init(); } diff --git a/src/main/java/dev/agatharose/asbestos/CarcinogenicBlock.java b/src/main/java/dev/agatharose/asbestos/CarcinogenicBlock.java new file mode 100644 index 0000000..b873d6d --- /dev/null +++ b/src/main/java/dev/agatharose/asbestos/CarcinogenicBlock.java @@ -0,0 +1,36 @@ +package dev.agatharose.asbestos; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class CarcinogenicBlock extends Block { + private int dangerousness; + + /** + * A type of a block that is cancerous and makes the player more sick when + * broken + * + * @param settings inherited block settings + * @param dangerousness how many mesothelioma points will be added on block + * break + */ + public CarcinogenicBlock(Settings settings, int dangerousness) { + super(settings); + this.dangerousness = dangerousness; + } + + @Override + public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) { + // call the original method + super.onBreak(world, pos, state, player); + + // get the player's initial mesothelioma progress + int exposure = Asbestos.MESOTHELIOMA.get(player).getMesothelioma(); + + // increase it by the block's dangerousness level + Asbestos.MESOTHELIOMA.get(player).setMesothelioma(exposure + dangerousness); + } +} diff --git a/src/main/java/dev/agatharose/asbestos/MesotheliomaStatusEffect.java b/src/main/java/dev/agatharose/asbestos/MesotheliomaStatusEffect.java index 482e4bc..d908563 100644 --- a/src/main/java/dev/agatharose/asbestos/MesotheliomaStatusEffect.java +++ b/src/main/java/dev/agatharose/asbestos/MesotheliomaStatusEffect.java @@ -1,5 +1,7 @@ package dev.agatharose.asbestos; +import dev.agatharose.asbestos.config.AsbestosConfig; +import me.shedaniel.autoconfig.AutoConfig; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectInstance; @@ -19,8 +21,7 @@ public class MesotheliomaStatusEffect extends StatusEffect { @Override public void applyUpdateEffect(LivingEntity entity, int amplifier) { - // TODO: move into mod config - int threshold = 180; + AsbestosConfig config = AutoConfig.getConfigHolder(AsbestosConfig.class).getConfig(); // for the sake of performance, non-players are immune to mesothelioma // and will not receive financial compensation @@ -29,11 +30,11 @@ public class MesotheliomaStatusEffect extends StatusEffect { int exposure = Asbestos.MESOTHELIOMA.get(player).getMesothelioma(); // slows you down because breathing is hard - if (exposure >= (threshold / 1.5)) { + if (exposure >= (config.mesothelioma.threshold / 1.5)) { player.addStatusEffect(new StatusEffectInstance(StatusEffects.SLOWNESS, 32767, 1)); } - if (exposure >= threshold) { + if (exposure >= config.mesothelioma.threshold) { player.damage(Asbestos.MESOTHELIOMA_DAMAGE, 1 << amplifier); } } diff --git a/src/main/java/dev/agatharose/asbestos/config/AsbestosConfig.java b/src/main/java/dev/agatharose/asbestos/config/AsbestosConfig.java new file mode 100644 index 0000000..0b157fd --- /dev/null +++ b/src/main/java/dev/agatharose/asbestos/config/AsbestosConfig.java @@ -0,0 +1,28 @@ +package dev.agatharose.asbestos.config; + +import me.shedaniel.autoconfig.ConfigData; +import me.shedaniel.autoconfig.annotation.Config; +import me.shedaniel.autoconfig.annotation.*; + +@Config(name = "asbestos") +@Config.Gui.Background("asbestos:textures/block/serpentinite_block.png") +public class AsbestosConfig implements ConfigData { + @ConfigEntry.Gui.CollapsibleObject + public Mesothelioma mesothelioma = new Mesothelioma(); + + // options related to the mesothelioma status effect + public static class Mesothelioma { + // how many blocks around the player will be checked + @ConfigEntry.BoundedDiscrete(min = 0, max = 32) + @ConfigEntry.Gui.Tooltip + public int offset = 3; + + // how many seconds will pass between each check + @ConfigEntry.Gui.Tooltip(count = 2) + public int period = 5; + + // how many mesothelioma points must the player have to die + @ConfigEntry.Gui.Tooltip + public int threshold = 180; + } +} diff --git a/src/main/java/dev/agatharose/asbestos/config/ModMenuIntegration.java b/src/main/java/dev/agatharose/asbestos/config/ModMenuIntegration.java new file mode 100644 index 0000000..66689fd --- /dev/null +++ b/src/main/java/dev/agatharose/asbestos/config/ModMenuIntegration.java @@ -0,0 +1,16 @@ +package dev.agatharose.asbestos.config; + +import io.github.prospector.modmenu.api.ConfigScreenFactory; +import io.github.prospector.modmenu.api.ModMenuApi; +import me.shedaniel.autoconfig.AutoConfig; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; + +@Environment(EnvType.CLIENT) +public class ModMenuIntegration implements ModMenuApi { + + @Override + public ConfigScreenFactory getModConfigScreenFactory() { + return parent -> AutoConfig.getConfigScreen(AsbestosConfig.class, parent).get(); + } +} \ No newline at end of file diff --git a/src/main/java/dev/agatharose/asbestos/item/ScraperItem.java b/src/main/java/dev/agatharose/asbestos/item/ScraperItem.java index 8230450..06bcf0d 100644 --- a/src/main/java/dev/agatharose/asbestos/item/ScraperItem.java +++ b/src/main/java/dev/agatharose/asbestos/item/ScraperItem.java @@ -2,14 +2,19 @@ package dev.agatharose.asbestos.item; import java.util.Arrays; import java.util.HashSet; +import java.util.Set; import dev.agatharose.asbestos.Asbestos; +import net.minecraft.block.Block; import net.minecraft.item.MiningToolItem; import net.minecraft.item.ToolMaterial; public class ScraperItem extends MiningToolItem { + private static Set affectedBlocks = new HashSet( + Arrays.asList(Asbestos.ASBESTOS_BLOCK, Asbestos.POPCORN_CEILING_BLOCK, Asbestos.ASBESTOS_TILE_BLOCK)); + public ScraperItem(ToolMaterial material, float attackDamage, float attackSpeed, Settings settings) { - super(attackDamage, attackSpeed, material, new HashSet<>(Arrays.asList(Asbestos.ASBESTOS_BLOCK)), settings); + super(attackDamage, attackSpeed, material, affectedBlocks, settings); } } \ No newline at end of file diff --git a/src/main/java/dev/agatharose/asbestos/scheduler/MesotheliomaSched.java b/src/main/java/dev/agatharose/asbestos/scheduler/MesotheliomaSched.java index a62f6f4..72f9f78 100644 --- a/src/main/java/dev/agatharose/asbestos/scheduler/MesotheliomaSched.java +++ b/src/main/java/dev/agatharose/asbestos/scheduler/MesotheliomaSched.java @@ -3,6 +3,8 @@ package dev.agatharose.asbestos.scheduler; import java.util.Arrays; import dev.agatharose.asbestos.Asbestos; +import dev.agatharose.asbestos.config.AsbestosConfig; +import me.shedaniel.autoconfig.AutoConfig; import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents; import net.minecraft.block.Block; import net.minecraft.entity.effect.StatusEffectInstance; @@ -11,15 +13,12 @@ import net.minecraft.util.math.Vec3d; public class MesotheliomaSched { public static void init() { - // how many blocks around the player will be checked - // TODO: move into mod config - int offset = 3; - int period = 5; - int threshold = 180; - ServerTickEvents.END_SERVER_TICK.register(server -> { - // run every 5 seconds - if (server.getTicks() % (period * 20) == 0) { + // load mod config from the toml file + AsbestosConfig config = AutoConfig.getConfigHolder(AsbestosConfig.class).getConfig(); + + // run every 5 seconds by default + if (server.getTicks() % (config.mesothelioma.period * 20) == 0) { server.getWorlds().forEach(world -> { world.getPlayers().forEach(player -> { // get the player's asbestos exposure level @@ -27,11 +26,13 @@ public class MesotheliomaSched { // let the player know that they may be entitled to financial compensation... // before it's too late - if (exposure >= (threshold / 2)) { + if (exposure >= (config.mesothelioma.threshold / 2)) { // give the player infinite mesothelioma effect player.addStatusEffect(new StatusEffectInstance(Asbestos.MESOTHELIOMA_EFFECT, 32767)); } + int offset = config.mesothelioma.offset; + // iterate over every block in the cuboid findasbestos: for (int i = -offset; i < offset; i++) { for (int j = -offset; j < offset; j++) { @@ -42,7 +43,7 @@ public class MesotheliomaSched { Block block = world.getBlockState(pos).getBlock(); - if (Arrays.asList(Asbestos.DANGEROUS_BLOCKS).contains(block)) { + if (Arrays.asList(Asbestos.HARMFUL_PASSIVE_BLOCKS).contains(block)) { Asbestos.MESOTHELIOMA.get(player).setMesothelioma(exposure + 1); break findasbestos; diff --git a/src/main/resources/assets/asbestos/blockstates/asbestos_tile_block.json b/src/main/resources/assets/asbestos/blockstates/asbestos_tile_block.json new file mode 100644 index 0000000..95b3467 --- /dev/null +++ b/src/main/resources/assets/asbestos/blockstates/asbestos_tile_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "asbestos:block/asbestos_tile_block" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/asbestos/blockstates/popcorn_ceiling_block.json b/src/main/resources/assets/asbestos/blockstates/popcorn_ceiling_block.json new file mode 100644 index 0000000..4249ef4 --- /dev/null +++ b/src/main/resources/assets/asbestos/blockstates/popcorn_ceiling_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "asbestos:block/popcorn_ceiling_block" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/asbestos/lang/en_us.json b/src/main/resources/assets/asbestos/lang/en_us.json index a922599..63d5dc1 100644 --- a/src/main/resources/assets/asbestos/lang/en_us.json +++ b/src/main/resources/assets/asbestos/lang/en_us.json @@ -1,8 +1,19 @@ { "block.asbestos.asbestos_block": "Asbestos Block", "block.asbestos.serpentinite_block": "Serpentinite", + "block.asbestos.popcorn_ceiling_block": "Popcorn Ceiling", + "block.asbestos.asbestos_tile_block": "Asbestos Tiles", "item.asbestos.asbestos_fibers": "Asbests Fibers", "item.asbestos.iron_scraper": "Asbestos Scraper", "effect.asbestos.mesothelioma": "Mesothelioma", - "death.attack.mesotheliomaDamage": "%1$s was entitled to financial compensation" + "death.attack.mesotheliomaDamage": "%1$s was entitled to financial compensation", + "text.autoconfig.asbestos.title": "Asbestos Removal", + "text.autoconfig.asbestos.option.mesothelioma": "Mesothelioma settings", + "text.autoconfig.asbestos.option.mesothelioma.offset": "Offset (blocks)", + "text.autoconfig.asbestos.option.mesothelioma.offset.@Tooltip": "How many blocks around the player will be checked", + "text.autoconfig.asbestos.option.mesothelioma.period": "Period (seconds)", + "text.autoconfig.asbestos.option.mesothelioma.period.@Tooltip[0]": "How many seconds will pass between", + "text.autoconfig.asbestos.option.mesothelioma.period.@Tooltip[1]": "each check for asbestos around the player", + "text.autoconfig.asbestos.option.mesothelioma.threshold": "Mesothelioma threshold", + "text.autoconfig.asbestos.option.mesothelioma.threshold.@Tooltip": "How many mesothelioma points must the player have to die" } \ No newline at end of file diff --git a/src/main/resources/assets/asbestos/models/block/asbestos_tile_block.json b/src/main/resources/assets/asbestos/models/block/asbestos_tile_block.json new file mode 100644 index 0000000..1c1ca98 --- /dev/null +++ b/src/main/resources/assets/asbestos/models/block/asbestos_tile_block.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "asbestos:block/asbestos_tiles" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/asbestos/models/block/popcorn_ceiling_block.json b/src/main/resources/assets/asbestos/models/block/popcorn_ceiling_block.json new file mode 100644 index 0000000..a07968c --- /dev/null +++ b/src/main/resources/assets/asbestos/models/block/popcorn_ceiling_block.json @@ -0,0 +1,8 @@ +{ + "parent": "block/cube_bottom_top", + "textures": { + "top": "asbestos:block/popcorn_top", + "bottom": "asbestos:block/popcorn_bottom", + "side": "asbestos:block/popcorn_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/asbestos/models/item/asbestos_tile_block.json b/src/main/resources/assets/asbestos/models/item/asbestos_tile_block.json new file mode 100644 index 0000000..6912912 --- /dev/null +++ b/src/main/resources/assets/asbestos/models/item/asbestos_tile_block.json @@ -0,0 +1,3 @@ +{ + "parent": "asbestos:block/asbestos_tile_block" +} \ No newline at end of file diff --git a/src/main/resources/assets/asbestos/models/item/popcorn_ceiling_block.json b/src/main/resources/assets/asbestos/models/item/popcorn_ceiling_block.json new file mode 100644 index 0000000..00bbe9b --- /dev/null +++ b/src/main/resources/assets/asbestos/models/item/popcorn_ceiling_block.json @@ -0,0 +1,3 @@ +{ + "parent": "asbestos:block/popcorn_ceiling_block" +} \ No newline at end of file diff --git a/src/main/resources/assets/asbestos/textures/block/asbestos_tiles.png b/src/main/resources/assets/asbestos/textures/block/asbestos_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..5bb66b8c6e8ee643dd3fa299941e2d6f483a22c6 GIT binary patch literal 319 zcmV-F0l@x=P)Px#`AI}UR5*==lQD7vF$_f?vVqx#nN6Exq)x#Na^)O?f_e|Y42@@(HBb;a-)0lk zSlZS9`j+I?``gD2vD18_kA3lvhwt()ouS+P`T)@r-ONH2YjW!YSQS{{dd>W0^QDf* z)DS4xERge5D$W;(>zZKOfwl5gNeG*AX9cSg^MKUIN(ooq}$3SQlP30xGk6?2}7 z-&$Nhs(N*R)i4Y8YkWlJi6e8}7i@uFLAI R*?j;2002ovPDHLkV1oO;k@5fl literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/asbestos/textures/block/popcorn_bottom.png b/src/main/resources/assets/asbestos/textures/block/popcorn_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..3fc361befe06cad0fbcf276a64d19c9047a42d67 GIT binary patch literal 474 zcmV<00VV#4P)Px$lu1NER5*=wlR-+uKoo|*)&vSJL;?eKGrKIjL7^0S0zo$(BT~?f7jPkZ0@ra9 z=m`W7dIJ~P=zyjYEX9RTNTe>tHysnrCi61$9{)H0pU&s{ZCx4wP#R<{&&Ac0^V1^$ zs;UMc3Qv9Eh59dUkoL{-&PRgKbiZ+EYDXFD&i@9XAtfV=xg zhJ*M=S;Q8fycczAuk-Z$wifAfaBfyDq=#AVnq&_mx*|Oc14^?XNp4Zv4qFz1Q#2gJ zD7{g*ECQCr$8Utb?(xNnEX_Un_Hb3zJj`+qk7HLW9a)6`91!V;$1xC5nuT)!V3JJf zO7kR{Hu&s&IEcy8oYE|u1EsOpXD0_%fpFQ$5tHPG%j*NgVnGbUpy3X5BuGvB{6@J4 zzb=i%>t<<=(vb_xc(m_0eO6oVxEf$Q+TUDaU-w%6``-I&U)`@DSsS;>(pf8oe}zkF ztP3J(ZdR^YLbEJBn46VzrupNwE>SKiORfLSY$$E>AV?0upYHSe2!Dm`8x@%i_ASL6 Qd;kCd07*qoM6N<$f)BdSfB*mh literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/asbestos/textures/block/popcorn_side.png b/src/main/resources/assets/asbestos/textures/block/popcorn_side.png new file mode 100644 index 0000000000000000000000000000000000000000..0c9dc69cb720f45d1501c155c70b688b5f609e9d GIT binary patch literal 467 zcmV;^0WAKBP)Px$jY&j7R5*=&l09zQKoEt$-C0wDgS2i`Cym>Qk%qC4$#1YKj6NmR5V$D!lEDN#xsRlL+v4}XXlLS|fbgz?%NwC*L6`6(_ z*g75CDZ2)YnX*-5zt7dbGvKosERDU;dp?VgByHMu*n_!@B5sh(cW)+#MDNEv@V?`{ zO`HP~UzQhY?(Uy-yIuisa|@^Aa6Ud9`2J(X=?J_1 z0f6m#6=Qb$;oW3;p*Ob!!^ejM+x3dwemDatOu(n()aGt~;6D_)_3w2pEh+#2002ov JPDHLkV1il-*8>0m literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/asbestos/textures/block/popcorn_top.png b/src/main/resources/assets/asbestos/textures/block/popcorn_top.png new file mode 100644 index 0000000000000000000000000000000000000000..80e1c5a207bd8bb31373c39e19b249e3d561fd42 GIT binary patch literal 370 zcmV-&0ge8NP)Px$EJ;K`R5*=&QbBISAPgL^!$w+ZU(o)c|NqoVD^*JXLl49bq-nX37>_;UvHSY` zXpgW$k4Ulauq=?;aCJ0~0f4*%0HmA^2;dj^oCg3*-cNx|DuCmEET#pC7~~zKw$327 zx+nF!NZmVn#I#Ls8aD=a4yGrpw}~PVh;qIYVj#5u0Z1EK;nn zVu-j)_-klaL)8Y#hGVOy6V4sz)=cj+zNf;|3;^H}Zd3QsuKz4eIrjpijYQn3O1T6p zP-JHywSq#hg!54K=vL|srcHdM*mXH)+Rwhnv|a83-_^4HJ~N4}Vs&0olf@}#um;YW zN1CH;$1V(eK;D7;G9?gk?^crSy>0B!h+ipA)QPA+4)JGvTO0slPLSP(A8aPw!ne+B QR{#J207*qoM6N<$f`;s&TL1t6 literal 0 HcmV?d00001 diff --git a/src/main/resources/data/asbestos/loot_tables/blocks/asbestos_tile_block.json b/src/main/resources/data/asbestos/loot_tables/blocks/asbestos_tile_block.json new file mode 100644 index 0000000..86a3934 --- /dev/null +++ b/src/main/resources/data/asbestos/loot_tables/blocks/asbestos_tile_block.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "asbestos:asbestos_tile_block" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/asbestos/loot_tables/blocks/popcorn_ceiling_block.json b/src/main/resources/data/asbestos/loot_tables/blocks/popcorn_ceiling_block.json new file mode 100644 index 0000000..629fca6 --- /dev/null +++ b/src/main/resources/data/asbestos/loot_tables/blocks/popcorn_ceiling_block.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "asbestos:popcorn_ceiling_block" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/asbestos/recipes/asbestos_tile_block.json b/src/main/resources/data/asbestos/recipes/asbestos_tile_block.json new file mode 100644 index 0000000..9fb5f05 --- /dev/null +++ b/src/main/resources/data/asbestos/recipes/asbestos_tile_block.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "AB", + "BA" + ], + "key": { + "A": { + "item": "asbestos:asbestos_fibers" + }, + "B": { + "item": "minecraft:polished_andesite" + } + }, + "result": { + "item": "asbestos:asbestos_tile_block", + "count": 4 + } +} \ No newline at end of file diff --git a/src/main/resources/data/asbestos/recipes/popcorn_ceiling_block.json b/src/main/resources/data/asbestos/recipes/popcorn_ceiling_block.json new file mode 100644 index 0000000..dde4f24 --- /dev/null +++ b/src/main/resources/data/asbestos/recipes/popcorn_ceiling_block.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "PP", + "AD" + ], + "key": { + "P": { + "tag": "minecraft:planks" + }, + "A": { + "item": "asbestos:asbestos_block" + }, + "D": { + "item": "minecraft:white_dye" + } + }, + "result": { + "item": "asbestos:popcorn_ceiling_block", + "count": 4 + } +} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 77cdea0..ce1eb79 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -20,6 +20,9 @@ ], "cardinal-components-entity": [ "dev.agatharose.asbestos.Asbestos" + ], + "modmenu": [ + "dev.agatharose.asbestos.config.ModMenuIntegration" ] }, "custom": {