diff --git a/src/main/java/io/github/protonmc/proton/module/decoration/RainbowWoolModule.java b/src/main/java/io/github/protonmc/proton/module/decoration/RainbowWoolModule.java new file mode 100644 index 0000000..07b3e7b --- /dev/null +++ b/src/main/java/io/github/protonmc/proton/module/decoration/RainbowWoolModule.java @@ -0,0 +1,41 @@ +package io.github.protonmc.proton.module.decoration; + +import io.github.protonmc.proton.Proton; +import io.github.protonmc.proton.base.handler.ProtonRegisterHandler; +import io.github.protonmc.proton.base.handler.ResourceHandler; +import io.github.protonmc.proton.base.module.ProtonModule; +import net.fabricmc.fabric.api.item.v1.FabricItemSettings; +import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; +import net.minecraft.block.Block; +import net.minecraft.block.Blocks; +import net.minecraft.item.ItemGroup; + +/** + * Adds rainbow wool. Don't ask me why + * + * @author YTG1234 + */ +public class RainbowWoolModule extends ProtonModule { + public static Block rainbowWoolBlock; + + public RainbowWoolModule() { + super(Proton.identifier("rainbow_wool")); + } + + /** + * @see ProtonModule#commonInit() + */ + @Override + public void commonInit() { + if (!enabled) return; + rainbowWoolBlock = ProtonRegisterHandler.block("rainbow_wool", new Block(FabricBlockSettings.copyOf(Blocks.WHITE_WOOL)), new FabricItemSettings().group(ItemGroup.DECORATIONS)); + } + + /** + * @see ProtonModule#registerResources(ResourceHandler) + */ + @Override + public void registerResources(ResourceHandler resourceHandler) { + resourceHandler.generateSimpleBlock("rainbow_wool"); + } +} diff --git a/src/main/resources/assets/proton/textures/block/rainbow_wool.png b/src/main/resources/assets/proton/textures/block/rainbow_wool.png new file mode 100644 index 0000000..6fc148c Binary files /dev/null and b/src/main/resources/assets/proton/textures/block/rainbow_wool.png differ diff --git a/src/main/resources/assets/proton/textures/block/rainbow_wool.png.mcmeta b/src/main/resources/assets/proton/textures/block/rainbow_wool.png.mcmeta new file mode 100644 index 0000000..a7e5fcf --- /dev/null +++ b/src/main/resources/assets/proton/textures/block/rainbow_wool.png.mcmeta @@ -0,0 +1,38 @@ +{ + "animation": { + "frametime": 10, + "frames": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 14, + 13, + 12, + 11, + 10, + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1, + 0 + ] + } +}