Skip to content

Commit

Permalink
retexture & ancient plants
Browse files Browse the repository at this point in the history
  • Loading branch information
PssbleTrngle committed Nov 5, 2023
1 parent f0d4654 commit 3d54033
Show file tree
Hide file tree
Showing 34 changed files with 1,036 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"half=lower": {
"model": "blissful:block/bliss_bloom_lower"
},
"half=upper": {
"model": "blissful:block/bliss_bloom_upper"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"variants": {
"": [
{
"model": "blissful:block/feral_hemp"
},
{
"model": "blissful:block/feral_hemp_2"
},
{
"model": "blissful:block/feral_hemp_3"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"block.blissful.bliss_bloom": "ɯooןᗺ ssıןᗺ",
"block.blissful.feral_hemp": "dɯǝH ןɐɹǝℲ",
"block.blissful.hemp": "dɯǝH",
"block.blissful.hemp_crate": "ǝʇɐɹƆ dɯǝH",
"block.blissful.weed_crate": "ǝʇɐɹƆ pǝǝM",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"block.blissful.bliss_bloom": "Bliss Bloom",
"block.blissful.feral_hemp": "Feral Hemp",
"block.blissful.hemp": "Hemp",
"block.blissful.hemp_crate": "Hemp Crate",
"block.blissful.weed_crate": "Weed Crate",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cross",
"textures": {
"cross": "blissful:block/bliss_bloom_lower"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cross",
"textures": {
"cross": "blissful:block/bliss_bloom_upper"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "blissful:block/bliss_bloom_upper"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "blissful:block/feral_hemp"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
},
{
"block": "blissful:bliss_bloom",
"condition": "minecraft:block_state_property",
"properties": {
"half": "lower"
}
}
],
"entries": [
{
"type": "minecraft:item",
"name": "blissful:bliss_bloom"
}
],
"rolls": 1.0
}
],
"random_sequence": "blissful:blocks/bliss_bloom"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "blissful:feral_hemp"
}
],
"rolls": 1.0
}
],
"random_sequence": "blissful:blocks/feral_hemp"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"blissful:feral_hemp"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"blissful:bliss_bloom"
]
}
26 changes: 26 additions & 0 deletions common/src/main/java/galena/blissful/index/BlissfulBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import net.minecraft.tags.BlockTags;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.BushBlock;
import net.minecraft.world.level.block.DoublePlantBlock;

import static galena.blissful.platform.Services.DATAGEN;

Expand Down Expand Up @@ -49,6 +51,30 @@ public class BlissfulBlocks {
.build()
.register();

public static final BlockEntry<DoublePlantBlock> BLISS_BLOOM = REGISTRATE
.block("bliss_bloom", DoublePlantBlock::new)
.initialProperties(() -> Blocks.ROSE_BUSH)
.addLayer(() -> RenderType::cutout)
.blockstate(DATAGEN::blissBloom)
.loot(DATAGEN::blissBloom)
.tag(BlockTags.TALL_FLOWERS)
.item()
.tab(CreativeModeTabs.NATURAL_BLOCKS)
.model((c, p) -> p.generated(c, p.modLoc("block/" + c.getName() + "_upper")))
.build()
.register();

public static final BlockEntry<BushBlock> FERAL_HEMP = REGISTRATE
.block("feral_hemp", BushBlock::new)
.initialProperties(() -> Blocks.FERN)
.addLayer(() -> RenderType::cutout)
.blockstate(DATAGEN::feralHemp)
.tag(BlockTags.SMALL_FLOWERS)
.item()
.tab(CreativeModeTabs.NATURAL_BLOCKS)
.build()
.register();

public static void register() {
// loads this class
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.CropBlock;
import net.minecraft.world.level.block.DoublePlantBlock;

public interface IDataGenHelper {

Expand All @@ -18,4 +19,9 @@ public interface IDataGenHelper {

void joint(DataGenContext<Item, ? extends Item> context, RegistrateItemModelProvider provider);

void blissBloom(DataGenContext<Block, ? extends DoublePlantBlock> context, RegistrateBlockstateProvider provider);

void blissBloom(RegistrateBlockLootTables provider, DoublePlantBlock block);

void feralHemp(DataGenContext<Block, ? extends Block> context, RegistrateBlockstateProvider provider);
}
Loading

0 comments on commit 3d54033

Please sign in to comment.