mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +01:00
finished the crimson meal
This commit is contained in:
parent
22c38d363e
commit
40757e258a
3 changed files with 39 additions and 5 deletions
|
@ -119,11 +119,6 @@ public class ClientEvents {
|
|||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderLast(RenderWorldLastEvent event) {
|
||||
ParticleHandler.renderParticles(event.getMatrixStack(), Minecraft.getInstance().getRenderPartialTicks());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onClientTick(TickEvent.ClientTickEvent event) {
|
||||
if (event.phase != TickEvent.Phase.END) {
|
||||
|
@ -203,6 +198,8 @@ public class ClientEvents {
|
|||
@SubscribeEvent
|
||||
public void onWorldRender(RenderWorldLastEvent event) {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
ParticleHandler.renderParticles(event.getMatrixStack(), mc.getRenderPartialTicks());
|
||||
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.multMatrix(event.getMatrixStack().getLast().getPositionMatrix());
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import net.minecraft.block.NetherWartBlock;
|
|||
import net.minecraft.item.ItemUseContext;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.IFeatureConfig;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
|
@ -35,6 +36,18 @@ public class ItemCrimsonMeal extends ItemImpl {
|
|||
context.getItem().shrink(1);
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
} else if (world.getBlockState(pos.up()).isAir(world, pos.up()) && world.getBlockState(pos).getBlock() == Blocks.SOUL_SAND) {
|
||||
if (!world.isRemote) {
|
||||
for (int i = world.rand.nextInt(5); i >= 0; i--) {
|
||||
BlockPos offset = pos.add(MathHelper.nextInt(world.rand, -3, 3), 1, MathHelper.nextInt(world.rand, -3, 3));
|
||||
if (world.getBlockState(offset.down()).getBlock() == Blocks.SOUL_SAND && world.getBlockState(offset).isAir(world, offset)) {
|
||||
world.setBlockState(offset, Blocks.NETHER_WART.getDefaultState());
|
||||
}
|
||||
}
|
||||
world.playEvent(2005, pos, 0);
|
||||
context.getItem().shrink(1);
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
return ActionResultType.FAIL;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"OOO",
|
||||
"OEO",
|
||||
"OOO"
|
||||
],
|
||||
"key": {
|
||||
"E": {
|
||||
"type": "forge:nbt",
|
||||
"item": "naturesaura:aura_bottle",
|
||||
"nbt": {
|
||||
"stored_type": "naturesaura:nether"
|
||||
}
|
||||
},
|
||||
"O": {
|
||||
"item": "minecraft:bone_meal"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "naturesaura:crimson_meal",
|
||||
"count": 8
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue