mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +01:00
finished the weather changer
This commit is contained in:
parent
5adf4a1428
commit
bb2763028c
12 changed files with 102 additions and 2 deletions
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "naturesaura:block/weather_changer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_bottom_top",
|
||||||
|
"textures": {
|
||||||
|
"side": "naturesaura:block/weather_changer",
|
||||||
|
"bottom": "naturesaura:block/weather_changer_bottom",
|
||||||
|
"top": "naturesaura:block/weather_changer_top"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "naturesaura:block/weather_changer"
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "naturesaura:weather_changer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,13 +1,23 @@
|
||||||
package de.ellpeck.naturesaura.blocks;
|
package de.ellpeck.naturesaura.blocks;
|
||||||
|
|
||||||
import de.ellpeck.naturesaura.blocks.tiles.TileEntityWeatherChanger;
|
import de.ellpeck.naturesaura.blocks.tiles.TileEntityWeatherChanger;
|
||||||
|
import de.ellpeck.naturesaura.data.BlockStateGenerator;
|
||||||
|
import de.ellpeck.naturesaura.reg.ICustomBlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
public class BlockWeatherChanger extends BlockContainerImpl {
|
public class BlockWeatherChanger extends BlockContainerImpl implements ICustomBlockState {
|
||||||
public BlockWeatherChanger() {
|
public BlockWeatherChanger() {
|
||||||
super("weather_changer", TileEntityWeatherChanger::new, Properties.from(Blocks.STONE_BRICKS));
|
super("weather_changer", TileEntityWeatherChanger::new, Properties.from(Blocks.STONE_BRICKS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateCustomBlockState(BlockStateGenerator generator) {
|
||||||
|
generator.simpleBlock(this, generator.models().cubeBottomTop(this.getBaseName(),
|
||||||
|
generator.modLoc("block/" + this.getBaseName()),
|
||||||
|
generator.modLoc("block/" + this.getBaseName() + "_bottom"),
|
||||||
|
generator.modLoc("block/" + this.getBaseName() + "_top")));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class TileEntityWeatherChanger extends TileEntityImpl implements ITickabl
|
||||||
if (this.processTime > 0) {
|
if (this.processTime > 0) {
|
||||||
if (this.processTime % 20 == 0) {
|
if (this.processTime % 20 == 0) {
|
||||||
BlockPos spot = IAuraChunk.getHighestSpot(this.world, this.pos, 35, this.pos);
|
BlockPos spot = IAuraChunk.getHighestSpot(this.world, this.pos, 35, this.pos);
|
||||||
IAuraChunk.getAuraChunk(this.world, spot).drainAura(spot, 30000);
|
IAuraChunk.getAuraChunk(this.world, spot).drainAura(spot, 30000 * this.itemAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.processTime--;
|
this.processTime--;
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
"block.naturesaura.aura_timer": "Redstone Aura Vaporizer",
|
"block.naturesaura.aura_timer": "Redstone Aura Vaporizer",
|
||||||
"block.naturesaura.slime_split_generator": "Offshoot Observer",
|
"block.naturesaura.slime_split_generator": "Offshoot Observer",
|
||||||
"block.naturesaura.spring": "Everlasting Spring",
|
"block.naturesaura.spring": "Everlasting Spring",
|
||||||
|
"block.naturesaura.weather_changer": "Cloudshifter",
|
||||||
"item.naturesaura.eye": "Environmental Eye",
|
"item.naturesaura.eye": "Environmental Eye",
|
||||||
"item.naturesaura.eye_improved": "Environmental Ocular",
|
"item.naturesaura.eye_improved": "Environmental Ocular",
|
||||||
"item.naturesaura.gold_fiber": "Brilliant Fiber",
|
"item.naturesaura.gold_fiber": "Brilliant Fiber",
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 704 B |
Binary file not shown.
After Width: | Height: | Size: 764 B |
Binary file not shown.
After Width: | Height: | Size: 662 B |
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "Cloudshifter",
|
||||||
|
"icon": "naturesaura:weather_changer",
|
||||||
|
"category": "using",
|
||||||
|
"advancement": "naturesaura:offering",
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
"type": "text",
|
||||||
|
"text": "Occasionally, it may be desirable for a magical botanist to change one of the many things that drives our daily actions and dictates when we can go outside: $(thing)the weather$(). With the $(item)Cloudshifter$(), this wish becomes truly possible. Accepting certain items that were thrown on the ground for activation, this device will $(thing)change the weather$() into whichever kind is desired, using $(aura) in the process."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "text",
|
||||||
|
"text": "The following items can be used, and will shift the weather as follows: $(item)Sunflowers$() will make it sunny, $(item)Dark Prismarine$() will make it rain, and lastly, $(item)Fire Charges$() will invoke a thunderstorm. Throwing more items also increases the amount of time that the desired weather will most likely remain for, but also increases the $(aura) usage of the shift.$(br)Additionally, when the weather is already the desired type, the $(item)Cloudshifter$() will not cease to do its work."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "crafting",
|
||||||
|
"text": "Creating the $(item)Cloudshifter$()",
|
||||||
|
"recipe": "naturesaura:weather_changer"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"BFB",
|
||||||
|
"PES",
|
||||||
|
"BTB"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"F": {
|
||||||
|
"item": "minecraft:fire_charge"
|
||||||
|
},
|
||||||
|
"P": {
|
||||||
|
"item": "minecraft:dark_prismarine"
|
||||||
|
},
|
||||||
|
"S": {
|
||||||
|
"item": "minecraft:sunflower"
|
||||||
|
},
|
||||||
|
"B": {
|
||||||
|
"item": "naturesaura:infused_brick"
|
||||||
|
},
|
||||||
|
"E": {
|
||||||
|
"item": "naturesaura:token_euphoria"
|
||||||
|
},
|
||||||
|
"T": {
|
||||||
|
"item": "naturesaura:token_terror"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "naturesaura:weather_changer"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue