public class StubHooks extends java.lang.Object implements NaturesAuraAPI.IInternalHooks
| Constructor and Description |
|---|
StubHooks() |
| Modifier and Type | Method and Description |
|---|---|
IMultiblock |
createMultiblock(net.minecraft.util.ResourceLocation name,
java.lang.String[][] pattern,
java.lang.Object... rawMatchers)
This method is used to create a custom multiblock from within the
API.
|
boolean |
extractAuraFromPlayer(net.minecraft.entity.player.EntityPlayer player,
int amount,
boolean simulate)
Helper method to extract aura from an
IAuraContainer in the
supplied player's inventory or baubles slots. |
int |
getAuraInArea(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius) |
void |
getAuraSpotsInArea(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius,
java.util.function.BiConsumer<net.minecraft.util.math.BlockPos,java.lang.Integer> consumer) |
net.minecraft.util.math.BlockPos |
getHighestAuraDrainSpot(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius,
net.minecraft.util.math.BlockPos defaultSpot) |
net.minecraft.util.math.BlockPos |
getLowestAuraDrainSpot(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius,
net.minecraft.util.math.BlockPos defaultSpot) |
boolean |
insertAuraIntoPlayer(net.minecraft.entity.player.EntityPlayer player,
int amount,
boolean simulate)
Helper method to insert aura into an
IAuraContainer in the
supplied player's inventory or baubles slots. |
boolean |
isEffectPowderActive(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.ResourceLocation name,
int radius)
Returns true if there is an effect powder entity active anywhere
around the given position in the given radius.
|
void |
spawnMagicParticle(double posX,
double posY,
double posZ,
double motionX,
double motionY,
double motionZ,
int color,
float scale,
int maxAge,
float gravity,
boolean collision,
boolean fade)
This method can be used to spawn the magic particle effect used by
Nature's Aura.
|
void |
spawnParticleStream(float startX,
float startY,
float startZ,
float endX,
float endY,
float endZ,
float speed,
int color,
float scale)
This method can be used to spawn the magic particle effect used by
Nature's Aura.
|
int |
triangulateAuraInArea(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius) |
public boolean extractAuraFromPlayer(net.minecraft.entity.player.EntityPlayer player,
int amount,
boolean simulate)
NaturesAuraAPI.IInternalHooksIAuraContainer in the
supplied player's inventory or baubles slots. The method returns true
if the aura could be extracted. Note that, if the player is in
creative mode, this method will always return true and no extraction
will take place.extractAuraFromPlayer in interface NaturesAuraAPI.IInternalHooksplayer - The playeramount - The amount to extractsimulate - If the extraction should be simulatedpublic boolean insertAuraIntoPlayer(net.minecraft.entity.player.EntityPlayer player,
int amount,
boolean simulate)
NaturesAuraAPI.IInternalHooksIAuraContainer in the
supplied player's inventory or baubles slots. The method returns true
if the aura could be inserted.insertAuraIntoPlayer in interface NaturesAuraAPI.IInternalHooksplayer - The playeramount - The amount to insertsimulate - If the insertion should be simulatedpublic void spawnMagicParticle(double posX,
double posY,
double posZ,
double motionX,
double motionY,
double motionZ,
int color,
float scale,
int maxAge,
float gravity,
boolean collision,
boolean fade)
NaturesAuraAPI.IInternalHooksspawnMagicParticle in interface NaturesAuraAPI.IInternalHooksposX - The x positionposY - The y positionposZ - The z positionmotionX - The x motionmotionY - The y motionmotionZ - The z motioncolor - The color the particle should have, in hexscale - The scale of the particlemaxAge - The max age before the particle should diegravity - The amount of gravity the particle should have, can
be 0collision - If the particle should collide with blocksfade - If the particle should slowly fade out or suddenly
disappearpublic void spawnParticleStream(float startX,
float startY,
float startZ,
float endX,
float endY,
float endZ,
float speed,
int color,
float scale)
NaturesAuraAPI.IInternalHooksspawnParticleStream in interface NaturesAuraAPI.IInternalHooksstartX - The start xstartY - The start ystartZ - The start zendX - The end xendY - The end yendZ - The end zspeed - The speed at which the particle should gocolor - The color of the particlescale - The scale of the particlepublic IMultiblock createMultiblock(net.minecraft.util.ResourceLocation name, java.lang.String[][] pattern, java.lang.Object... rawMatchers)
NaturesAuraAPI.IInternalHookscreateMultiblock in interface NaturesAuraAPI.IInternalHooksname - The name the multiblock should havepattern - The pattern that the multiblock should have, where
each character is mapped to a raw matcherrawMatchers - Each char matcher in the form of the char followed
by a matcher, either in the form of a Block, an
IBlockState or a Matcher, similar to the
old way that crafting recipes work.public boolean isEffectPowderActive(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.ResourceLocation name,
int radius)
NaturesAuraAPI.IInternalHooksNaturesAuraAPI.EFFECT_POWDERSisEffectPowderActive in interface NaturesAuraAPI.IInternalHooksworld - The worldpos - The center positionname - The registry name of the powderradius - The radius around the center to check forpublic void getAuraSpotsInArea(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius,
java.util.function.BiConsumer<net.minecraft.util.math.BlockPos,java.lang.Integer> consumer)
getAuraSpotsInArea in interface NaturesAuraAPI.IInternalHooksIAuraChunk.getSpotsInArea(World, BlockPos, int, BiConsumer)public int getAuraInArea(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius)
getAuraInArea in interface NaturesAuraAPI.IInternalHooksIAuraChunk.getAuraInArea(World, BlockPos, int)public int triangulateAuraInArea(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius)
triangulateAuraInArea in interface NaturesAuraAPI.IInternalHooksIAuraChunk.triangulateAuraInArea(World, BlockPos, int)public net.minecraft.util.math.BlockPos getLowestAuraDrainSpot(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius,
net.minecraft.util.math.BlockPos defaultSpot)
getLowestAuraDrainSpot in interface NaturesAuraAPI.IInternalHooksIAuraChunk.getLowestSpot(World, BlockPos, int, BlockPos)public net.minecraft.util.math.BlockPos getHighestAuraDrainSpot(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius,
net.minecraft.util.math.BlockPos defaultSpot)
getHighestAuraDrainSpot in interface NaturesAuraAPI.IInternalHooksIAuraChunk.getHighestSpot(World, BlockPos, int, BlockPos)