From 7facce56c24cec20900da6c0eee440bdefe8b260 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 2 Feb 2020 23:27:40 +0100 Subject: [PATCH] finished the Winter's Calling --- .../naturesaura/blockstates/snow_creator.json | 7 +++++ .../models/block/snow_creator.json | 8 ++++++ .../naturesaura/models/item/snow_creator.json | 3 +++ .../loot_tables/blocks/snow_creator.json | 19 +++++++++++++ .../naturesaura/blocks/BlockSnowCreator.java | 12 ++++++++- .../blocks/tiles/TileEntitySnowCreator.java | 2 +- .../assets/naturesaura/lang/en_us.json | 1 + .../textures/block/snow_creator.png | Bin 0 -> 620 bytes .../textures/block/snow_creator_top.png | Bin 0 -> 634 bytes .../en_us/entries/using/snow_creator.json | 22 +++++++++++++++ .../naturesaura/recipes/snow_creator.json | 25 ++++++++++++++++++ 11 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 src/generated/resources/assets/naturesaura/blockstates/snow_creator.json create mode 100644 src/generated/resources/assets/naturesaura/models/block/snow_creator.json create mode 100644 src/generated/resources/assets/naturesaura/models/item/snow_creator.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/snow_creator.json create mode 100644 src/main/resources/assets/naturesaura/textures/block/snow_creator.png create mode 100644 src/main/resources/assets/naturesaura/textures/block/snow_creator_top.png create mode 100644 src/main/resources/data/naturesaura/patchouli_books/book/en_us/entries/using/snow_creator.json create mode 100644 src/main/resources/data/naturesaura/recipes/snow_creator.json 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 0000000000000000000000000000000000000000..29f4e4eaad49966e1aa65fda00af9a882ad649c9 GIT binary patch literal 620 zcmV-y0+aoTP)in)6otQC?XLA>*?~A7$m9)ZDS2O79)Oa97obWJaLhP3 zjw8$ZTS=>>P{tl+(s7$xo$uar?iF7?fA#!FDS(^z*Jx!3q~z)OiKpzDtHlEFbiG3k zkWLeX3@Gc0&7TLBiv?MpBLSRqs6ZkE$!tDD2*E`<$C!}FgiJz%kcvPm;wU1DBBsd{ zU<5=aLI#Q<5cIA?2*J=hv{J}G5~vAbIKg#2WmzJGz%iUHbVEm9_tbU8dr-pefxLuWel;6pUoVK+L!+?}>1SCm< z_Z}%F&bfcY+g$~VnB^jdJ%p1GAwUR0(=;RCdhre+ptcR0ra6g^MLPh2a7S}mE{(Ob)c1zn>`j=$qu{cdU7A?1{ z^0bM!e!Pqn=MXDv0mxQA0a$PCY5L7_!g@PG*~4SD!+Xy#3>afZfYusoElE73tO`D~ z-_HB5VgAwqX0tg(ab%Xxsp@hB^j(WmipXdpb-^T#kw}6`fEEgEG|qYIx}K6-Q(M0000=-9f#ona0NQwp~g~- zu;+w`Q1*g-nc%4R^bByB|MyRzi3dtB%L7e_bQG)-kUuLpPv1APT8qtYtorgc$JN)88FPdnBh!rQRAmKR-he_Ms<| z$ji=d6{1opNL4}zSTV#9(MB;UH{cQi0O!x2{=G0&WnEXArXi(-F^0#dFO*WKwNgsK zdw&I-bA%8W`U5dt3p?lV-cxI(?*@!9s49Ejndcwe9q+lU%N5vD#9B+|9i6o_eUGA; z#^A)_yd&qzx-P_=7{@ct>g^IA-aJri#d=SFJYv*<6vDExrj_sC|0af&n0DfxQC0e( zzcrY~kq|bVc}og`5Cf_TRhZTpYYlk{R0QiR&N=33z5#Q%0Py(q^q=4O$7KQFAN~&& U0|GMZRR91007*qoM6N<$f_e-jQ~&?~ literal 0 HcmV?d00001 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