diff --git a/src/generated/resources/assets/naturesaura/blockstates/snow_creator.json b/src/generated/resources/assets/naturesaura/blockstates/snow_creator.json new file mode 100644 index 00000000..12afbbba --- /dev/null +++ b/src/generated/resources/assets/naturesaura/blockstates/snow_creator.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "naturesaura:block/snow_creator" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/naturesaura/models/block/snow_creator.json b/src/generated/resources/assets/naturesaura/models/block/snow_creator.json new file mode 100644 index 00000000..9fc7a394 --- /dev/null +++ b/src/generated/resources/assets/naturesaura/models/block/snow_creator.json @@ -0,0 +1,8 @@ +{ + "parent": "block/cube_bottom_top", + "textures": { + "side": "naturesaura:block/snow_creator", + "bottom": "naturesaura:block/snow_creator_top", + "top": "naturesaura:block/snow_creator_top" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/naturesaura/models/item/snow_creator.json b/src/generated/resources/assets/naturesaura/models/item/snow_creator.json new file mode 100644 index 00000000..ee4d5bee --- /dev/null +++ b/src/generated/resources/assets/naturesaura/models/item/snow_creator.json @@ -0,0 +1,3 @@ +{ + "parent": "naturesaura:block/snow_creator" +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/snow_creator.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/snow_creator.json new file mode 100644 index 00000000..34c9d794 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/snow_creator.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:snow_creator" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockSnowCreator.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockSnowCreator.java index 49acd2d4..2a32690a 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockSnowCreator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockSnowCreator.java @@ -2,6 +2,8 @@ package de.ellpeck.naturesaura.blocks; import de.ellpeck.naturesaura.api.render.IVisualizable; import de.ellpeck.naturesaura.blocks.tiles.TileEntitySnowCreator; +import de.ellpeck.naturesaura.data.BlockStateGenerator; +import de.ellpeck.naturesaura.reg.ICustomBlockState; import net.minecraft.block.Blocks; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.AxisAlignedBB; @@ -10,7 +12,7 @@ import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -public class BlockSnowCreator extends BlockContainerImpl implements IVisualizable { +public class BlockSnowCreator extends BlockContainerImpl implements IVisualizable, ICustomBlockState { public BlockSnowCreator() { super("snow_creator", TileEntitySnowCreator::new, ModBlocks.prop(Blocks.CRAFTING_TABLE)); } @@ -31,4 +33,12 @@ public class BlockSnowCreator extends BlockContainerImpl implements IVisualizabl public int getVisualizationColor(World world, BlockPos pos) { return 0xdbe9ff; } + + @Override + public void generateCustomBlockState(BlockStateGenerator generator) { + generator.simpleBlock(this, generator.models().cubeBottomTop(this.getBaseName(), + generator.modLoc("block/" + this.getBaseName()), + generator.modLoc("block/" + this.getBaseName() + "_top"), + generator.modLoc("block/" + this.getBaseName() + "_top"))); + } } diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySnowCreator.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySnowCreator.java index 423322a1..cdfc1edd 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySnowCreator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntitySnowCreator.java @@ -75,7 +75,7 @@ public class TileEntitySnowCreator extends TileEntityImpl implements ITickableTi } else { if (this.world.getGameTime() % 30 != 0) return; - for (int i = range * 5; i >= 0; i--) { + for (int i = range * 4; i >= 0; i--) { BlockPos randomPos = this.pos.add( MathHelper.nextInt(this.world.rand, -range, range), MathHelper.nextInt(this.world.rand, range / 2, range), diff --git a/src/main/resources/assets/naturesaura/lang/en_us.json b/src/main/resources/assets/naturesaura/lang/en_us.json index c803c22a..be988229 100644 --- a/src/main/resources/assets/naturesaura/lang/en_us.json +++ b/src/main/resources/assets/naturesaura/lang/en_us.json @@ -56,6 +56,7 @@ "block.naturesaura.blast_furnace_booster": "Armorer's Aid", "block.naturesaura.nether_wart_mushroom": "Nether Wart Mushroom", "block.naturesaura.animal_container": "Corporeal Eye", + "block.naturesaura.snow_creator": "Winter's Calling", "item.naturesaura.eye": "Environmental Eye", "item.naturesaura.eye_improved": "Environmental Ocular", "item.naturesaura.gold_fiber": "Brilliant Fiber", diff --git a/src/main/resources/assets/naturesaura/textures/block/snow_creator.png b/src/main/resources/assets/naturesaura/textures/block/snow_creator.png new file mode 100644 index 00000000..29f4e4ea Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/block/snow_creator.png differ diff --git a/src/main/resources/assets/naturesaura/textures/block/snow_creator_top.png b/src/main/resources/assets/naturesaura/textures/block/snow_creator_top.png new file mode 100644 index 00000000..455c3005 Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/block/snow_creator_top.png differ diff --git a/src/main/resources/data/naturesaura/patchouli_books/book/en_us/entries/using/snow_creator.json b/src/main/resources/data/naturesaura/patchouli_books/book/en_us/entries/using/snow_creator.json new file mode 100644 index 00000000..14135c78 --- /dev/null +++ b/src/main/resources/data/naturesaura/patchouli_books/book/en_us/entries/using/snow_creator.json @@ -0,0 +1,22 @@ +{ + "name": "Winter's Calling", + "icon": "naturesaura:snow_creator", + "category": "using", + "advancement": "naturesaura:sky_ingot", + "flag": "naturesaura:chunk_loader", + "pages": [ + { + "type": "text", + "text": "Sometimes, especially during some holidays, one wishes for the cold to arrive and enlace the world in a white blanket. Nowadays, this occurence has become a lot rarer due to $(italic)some circumstances$(). The $(item)Winter's Calling$() brings this occurence back by causing snow to fall in a vast area around it, provided a little bit of $(aura)." + }, + { + "type": "text", + "text": "Additionally, water will freeze into ice and very occasionally, snow golems will spawn to help with covering the lands. To get this process going, a $(thing)redstone signal$() needs to be supplied. The higher the strength of the signal, the biger the area in which snow will fall." + }, + { + "type": "crafting", + "text": "Creating the $(item)Winter's Calling$()$(p)$(italic)Glacial Precipitator", + "recipe": "naturesaura:snow_creator" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/naturesaura/recipes/snow_creator.json b/src/main/resources/data/naturesaura/recipes/snow_creator.json new file mode 100644 index 00000000..0062ae94 --- /dev/null +++ b/src/main/resources/data/naturesaura/recipes/snow_creator.json @@ -0,0 +1,25 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "BSB", + "IGI", + "BSB" + ], + "key": { + "G": { + "item": "minecraft:pumpkin" + }, + "S": { + "item": "minecraft:ice" + }, + "B": { + "item": "naturesaura:infused_brick" + }, + "I": { + "item": "naturesaura:sky_ingot" + } + }, + "result": { + "item": "naturesaura:snow_creator" + } +} \ No newline at end of file