Cyan Flowers & Creative Tab
This commit is contained in:
parent
9d5def8db9
commit
ff97cd3776
11 changed files with 62 additions and 20 deletions
|
@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx1G
|
||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
version = 1.0.1
|
version = 2.0.0
|
||||||
maven_group = xyz.limepot
|
maven_group = xyz.limepot
|
||||||
archives_base_name = roses_mod
|
archives_base_name = roses_mod
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
package xyz.limepot.roses_mod;
|
package xyz.limepot.roses_mod;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
||||||
|
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
||||||
import net.fabricmc.fabric.api.loot.v2.LootTableEvents;
|
import net.fabricmc.fabric.api.loot.v2.LootTableEvents;
|
||||||
import net.minecraft.block.*;
|
import net.minecraft.block.*;
|
||||||
import net.minecraft.client.render.RenderLayer;
|
import net.minecraft.client.render.RenderLayer;
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
import net.minecraft.item.BlockItem;
|
import net.minecraft.item.BlockItem;
|
||||||
|
import net.minecraft.item.ItemGroups;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.loot.LootPool;
|
import net.minecraft.loot.LootPool;
|
||||||
import net.minecraft.loot.entry.ItemEntry;
|
import net.minecraft.loot.entry.ItemEntry;
|
||||||
|
@ -23,8 +25,13 @@ public class RosesMod implements ModInitializer {
|
||||||
public static final String MOD_ID = "roses_mod";
|
public static final String MOD_ID = "roses_mod";
|
||||||
public static final Logger LOGGER = LoggerFactory.getLogger("Roses Mod");
|
public static final Logger LOGGER = LoggerFactory.getLogger("Roses Mod");
|
||||||
|
|
||||||
|
//ROSE
|
||||||
public static final Block ROSE_FLOWER = new FlowerBlock(StatusEffects.HASTE, 8, QuiltBlockSettings.copyOf(Blocks.POPPY).nonOpaque());
|
public static final Block ROSE_FLOWER = new FlowerBlock(StatusEffects.HASTE, 8, QuiltBlockSettings.copyOf(Blocks.POPPY).nonOpaque());
|
||||||
public static final Block POTTED_ROSE = new FlowerPotBlock(ROSE_FLOWER, QuiltBlockSettings.copyOf(Blocks.POTTED_POPPY));
|
public static final Block POTTED_ROSE = new FlowerPotBlock(ROSE_FLOWER, QuiltBlockSettings.copyOf(Blocks.POTTED_POPPY));
|
||||||
|
//Cyan Rose
|
||||||
|
public static final Block CYAN_ROSE = new FlowerBlock(StatusEffects.NAUSEA, 8, QuiltBlockSettings.copyOf(Blocks.POPPY).nonOpaque());
|
||||||
|
public static final Block POTTED_CYAN = new FlowerPotBlock(CYAN_ROSE, QuiltBlockSettings.copyOf(Blocks.POTTED_POPPY));
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize(ModContainer mod) {
|
public void onInitialize(ModContainer mod) {
|
||||||
|
@ -37,6 +44,20 @@ public class RosesMod implements ModInitializer {
|
||||||
Registry.register(Registries.ITEM, new Identifier(MOD_ID, "rose_flower"), new BlockItem(ROSE_FLOWER, new QuiltItemSettings()));
|
Registry.register(Registries.ITEM, new Identifier(MOD_ID, "rose_flower"), new BlockItem(ROSE_FLOWER, new QuiltItemSettings()));
|
||||||
//POTTED ROSE FLOWER
|
//POTTED ROSE FLOWER
|
||||||
Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "potted_rose"), POTTED_ROSE);
|
Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "potted_rose"), POTTED_ROSE);
|
||||||
|
//CYAN ROSE
|
||||||
|
Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "cyan_rose"), CYAN_ROSE);
|
||||||
|
Registry.register(Registries.ITEM, new Identifier(MOD_ID, "cyan_rose"), new BlockItem(CYAN_ROSE, new QuiltItemSettings()));
|
||||||
|
//POTTED CYAN ROSE
|
||||||
|
Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "potted_cyan"), POTTED_CYAN);
|
||||||
|
|
||||||
|
|
||||||
|
//CREATIVE TABS
|
||||||
|
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL).register(content -> {
|
||||||
|
content.addAfter(Items.POPPY, ROSE_FLOWER);
|
||||||
|
});
|
||||||
|
ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL).register(content -> {
|
||||||
|
content.addAfter(Items.BLUE_ORCHID, CYAN_ROSE);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
//LOOT TABLES
|
//LOOT TABLES
|
||||||
|
|
|
@ -8,7 +8,12 @@ import org.quiltmc.qsl.base.api.entrypoint.client.ClientModInitializer;
|
||||||
|
|
||||||
public class RosesModClient implements ClientModInitializer {
|
public class RosesModClient implements ClientModInitializer {
|
||||||
public void onInitializeClient(ModContainer mod) {
|
public void onInitializeClient(ModContainer mod) {
|
||||||
|
//ROSE FLOWER
|
||||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.POTTED_ROSE);
|
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.POTTED_ROSE);
|
||||||
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.ROSE_FLOWER);
|
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.ROSE_FLOWER);
|
||||||
|
|
||||||
|
//CYAN ROSE
|
||||||
|
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.POTTED_CYAN);
|
||||||
|
BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.CYAN_ROSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": { "model": "roses_mod:block/cyan_rose"}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": { "model": "roses_mod:block/potted_cyan"}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
"block.roses_mod.rose_flower": "Rose",
|
"block.roses_mod.rose_flower": "Rose",
|
||||||
"block.roses_mod.potted_rose": "Potted Rose"
|
"block.roses_mod.potted_rose": "Potted Rose",
|
||||||
|
"block.roses_mod.cyan_rose": "Cyan Rose",
|
||||||
|
"block.roses_mod.potted_cyan": "Potted Cyan Rose"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cross",
|
||||||
|
"textures": {
|
||||||
|
"cross": "roses_mod:block/cyan_rose"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/flower_pot_cross",
|
||||||
|
"textures": {
|
||||||
|
"plant": "roses_mod:block/cyan_rose"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "roses_mod:block/cyan_rose"
|
||||||
|
}
|
||||||
|
}
|
BIN
src/main/resources/assets/roses_mod/textures/block/cyan_rose.png
Normal file
BIN
src/main/resources/assets/roses_mod/textures/block/cyan_rose.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 237 B |
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
"type": "minecraft:block",
|
|
||||||
"pools": [
|
|
||||||
{
|
|
||||||
"rolls": 2,
|
|
||||||
"entries": [
|
|
||||||
{
|
|
||||||
"type": "minecraft:item",
|
|
||||||
"name": "roses_mod:rose_flower"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
Reference in a new issue