finished the offshoot observer

This commit is contained in:
Ell 2020-09-28 17:18:40 +02:00
parent 6163c8efde
commit 0c97d2f832
12 changed files with 121 additions and 2 deletions

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "naturesaura:block/slime_split_generator"
}
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "minecraft:block/cube_bottom_top",
"textures": {
"side": "naturesaura:block/slime_split_generator",
"bottom": "naturesaura:block/slime_split_generator_bottom",
"top": "naturesaura:block/slime_split_generator_top"
}
}

View file

@ -0,0 +1,3 @@
{
"parent": "naturesaura:block/slime_split_generator"
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "naturesaura:slime_split_generator"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -1,22 +1,50 @@
package de.ellpeck.naturesaura.blocks;
import de.ellpeck.naturesaura.Helper;
import de.ellpeck.naturesaura.api.render.IVisualizable;
import de.ellpeck.naturesaura.blocks.tiles.TileEntitySlimeSplitGenerator;
import de.ellpeck.naturesaura.data.BlockStateGenerator;
import de.ellpeck.naturesaura.reg.ICustomBlockState;
import net.minecraft.block.Blocks;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.monster.SlimeEntity;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingDamageEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.eventbus.api.EventPriority;
import net.minecraftforge.eventbus.api.SubscribeEvent;
public class BlockSlimeSplitGenerator extends BlockContainerImpl {
public class BlockSlimeSplitGenerator extends BlockContainerImpl implements IVisualizable, ICustomBlockState {
public BlockSlimeSplitGenerator() {
super("slime_split_generator", TileEntitySlimeSplitGenerator::new, Properties.from(Blocks.SLIME_BLOCK).hardnessAndResistance(2));
MinecraftForge.EVENT_BUS.register(new Events());
}
@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")));
}
@Override
@OnlyIn(Dist.CLIENT)
public AxisAlignedBB getVisualizationBounds(World world, BlockPos pos) {
return new AxisAlignedBB(pos).grow(8);
}
@Override
@OnlyIn(Dist.CLIENT)
public int getVisualizationColor(World world, BlockPos pos) {
return 0x4da84f;
}
private static class Events {
@SubscribeEvent

View file

@ -80,7 +80,7 @@ public class TileEntitySlimeSplitGenerator extends TileEntityImpl implements ITi
if (slime instanceof MagmaCubeEntity) {
return 0x942516;
} else {
return 0x1ed921;
return 0x4da84f;
}
}

View file

@ -65,6 +65,7 @@
"block.naturesaura.nether_grass": "Grassy Netherrack",
"block.naturesaura.chorus_generator": "Reaper of Ender Heights",
"block.naturesaura.aura_timer": "Redstone Aura Vaporizer",
"block.naturesaura.slime_split_generator": "Offshoot Observer",
"item.naturesaura.eye": "Environmental Eye",
"item.naturesaura.eye_improved": "Environmental Ocular",
"item.naturesaura.gold_fiber": "Brilliant Fiber",

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

View file

@ -0,0 +1,21 @@
{
"name": "Offshoot Observer",
"icon": "naturesaura:slime_split_generator",
"category": "creating",
"advancement": "naturesaura:sky_ingot",
"pages": [
{
"type": "text",
"text": "$(thing)Slimes$() and $(thing)Magma Cubes$() are peculiar beings. Upon being hurt enough, they $(thing)split$() into smaller versions of themselves, similarly to how cells multiply in the body. This natural process can be exploited by the $(item)Offshoot Observer$(): When such a creature splits in its vicinity, the created entropy will be consumed and $(aura) will be dispersed into the environment."
},
{
"type": "text",
"text": "Needless to say, the amount of $(aura) created is based on the $(thing)size$() and $(thing)rarity$() of the creature.$(br)It should also be noted that, while the $(item)Offshoot Observer$() is in the process of dispering $(aura), causing an additional creature to split will not cause any more $(aura) to be created."
},
{
"type": "crafting",
"recipe": "naturesaura:slime_split_generator",
"text": "Creating the $(item)Offshoot Observer$()"
}
]
}

View file

@ -0,0 +1,32 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"NJS",
"ISI",
"SWN"
],
"key": {
"S": {
"item": "minecraft:slime_block"
},
"J": {
"item": "naturesaura:token_joy"
},
"W": {
"item": "naturesaura:token_grief"
},
"N": {
"type": "forge:nbt",
"item": "naturesaura:aura_bottle",
"nbt": {
"stored_type": "naturesaura:nether"
}
},
"I": {
"item": "naturesaura:sky_ingot"
}
},
"result": {
"item": "naturesaura:slime_split_generator"
}
}