mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-25 20:58:34 +01:00
finished the chorus generator
This commit is contained in:
parent
6c46a37793
commit
3a65e1dd1e
5 changed files with 78 additions and 2 deletions
|
@ -6,6 +6,9 @@ import de.ellpeck.naturesaura.packet.PacketHandler;
|
|||
import de.ellpeck.naturesaura.packet.PacketParticles;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.ListNBT;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.tileentity.TileEntityType;
|
||||
import net.minecraft.util.Direction;
|
||||
|
@ -98,4 +101,28 @@ public class TileEntityChorusGenerator extends TileEntityImpl implements ITickab
|
|||
this.collectChorusPlant(offset, blocks);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNBT(CompoundNBT compound, SaveType type) {
|
||||
super.writeNBT(compound, type);
|
||||
if (type == SaveType.TILE) {
|
||||
ListNBT list = new ListNBT();
|
||||
for (BlockPos pos : this.currentlyBreaking)
|
||||
list.add(NBTUtil.writeBlockPos(pos));
|
||||
compound.put("breaking", list);
|
||||
compound.putInt("aura", this.auraPerBlock);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readNBT(CompoundNBT compound, SaveType type) {
|
||||
super.readNBT(compound, type);
|
||||
if (type == SaveType.TILE) {
|
||||
this.currentlyBreaking.clear();
|
||||
ListNBT list = compound.getList("breaking", 10);
|
||||
for (int i = 0; i < list.size(); i++)
|
||||
this.currentlyBreaking.add(NBTUtil.readBlockPos(list.getCompound(i)));
|
||||
this.auraPerBlock = compound.getInt("aura");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -503,7 +503,7 @@ public class PacketParticles {
|
|||
world.rand.nextGaussian() * 0.01F,
|
||||
world.rand.nextFloat() * 0.04F + 0.02F,
|
||||
world.rand.nextGaussian() * 0.01F,
|
||||
0x5ccc30, 1F + world.rand.nextFloat() * 1.5F, 40, 0F, false, true);
|
||||
IAuraType.forWorld(world).getColor(), 1F + world.rand.nextFloat() * 1.5F, 40, 0F, false, true);
|
||||
});
|
||||
|
||||
public final BiConsumer<PacketParticles, World> action;
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
"block.naturesaura.aura_cactus": "Aura Cactus",
|
||||
"block.naturesaura.tainted_gold_block": "Tainted Gold Block",
|
||||
"block.naturesaura.nether_grass": "Grassy Netherrack",
|
||||
"block.naturesaura.chorus_generator": "Reaper of the Ender Heights",
|
||||
"block.naturesaura.chorus_generator": "Reaper of Ender Heights",
|
||||
"item.naturesaura.eye": "Environmental Eye",
|
||||
"item.naturesaura.eye_improved": "Environmental Ocular",
|
||||
"item.naturesaura.gold_fiber": "Brilliant Fiber",
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "Reaper of Ender Heights",
|
||||
"icon": "naturesaura:chorus_generator",
|
||||
"category": "creating",
|
||||
"advancement": "naturesaura:aura_bottle_end",
|
||||
"pages": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Once the mighty dragon of $(thing)the End$() has been defeated, one may start venturing out through the many barren islands around its lair. While doing so, one can discover $(thing)chorus$() plants: Flowers that sprout upwards and high into the sky. Flowers of this kind contain quite a substantial amount of $(aura), gathered from the ender air around them."
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Through the $(item)Reaper of Ender Heights$(), this energy can be extracted. First of all, a $(thing)chorus flower$() has to be grown at most about two blocks away from it. Once it has grown high enough, supplying the $(item)Reaper of Ender Heights$() with a $(thing)redstone signal$() will cause it to start harvesting the entire plant, dispersing $(aura) in the process.$(br)The higher and broader the plant has grown prior to harvesting, the more $(aura) is created."
|
||||
},
|
||||
{
|
||||
"type": "crafting",
|
||||
"recipe": "naturesaura:chorus_generator",
|
||||
"text": "Creating the $(item)Reaper of Ender Heights$()"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"EPE",
|
||||
"RFJ",
|
||||
"EPE"
|
||||
],
|
||||
"key": {
|
||||
"E": {
|
||||
"item": "minecraft:end_stone"
|
||||
},
|
||||
"R": {
|
||||
"item": "naturesaura:token_rage"
|
||||
},
|
||||
"J": {
|
||||
"item": "naturesaura:token_joy"
|
||||
},
|
||||
"P": {
|
||||
"item": "minecraft:popped_chorus_fruit"
|
||||
},
|
||||
"F": {
|
||||
"item": "minecraft:chorus_flower"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "naturesaura:chorus_generator"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue