public static interface NaturesAuraAPI.IInternalHooks
NaturesAuraAPI.instance()| 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. |
java.util.List<net.minecraft.util.Tuple<net.minecraft.util.math.Vec3d,java.lang.Integer>> |
getActiveEffectPowders(net.minecraft.world.World world,
net.minecraft.util.math.AxisAlignedBB area,
net.minecraft.util.ResourceLocation name)
Get all of the active effect powders in the given area and consume
the position and the range that they have.
|
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) |
int |
getSpotAmountInArea(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius) |
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)
Returns true if there is an effect powder entity active anywhere
around the given position based on the radius it has.
|
void |
setParticleDepth(boolean depth)
Sets wether Nature's Aura particles that are spawned will be rendered
with depth test enabled or not.
|
void |
setParticleSpawnRange(int range)
Sets the range that Nature's Aura particles that are spawned will
have to have from the player at most to actually be spawned.
|
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) |
boolean extractAuraFromPlayer(net.minecraft.entity.player.EntityPlayer player,
int amount,
boolean simulate)
IAuraContainer 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.player - The playeramount - The amount to extractsimulate - If the extraction should be simulatedboolean insertAuraIntoPlayer(net.minecraft.entity.player.EntityPlayer player,
int amount,
boolean simulate)
IAuraContainer in the
supplied player's inventory or baubles slots. The method returns true
if the aura could be inserted.player - The playeramount - The amount to insertsimulate - If the insertion should be simulatedvoid 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)
posX - 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
disappearvoid spawnParticleStream(float startX,
float startY,
float startZ,
float endX,
float endY,
float endZ,
float speed,
int color,
float scale)
startX - 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 particlevoid setParticleDepth(boolean depth)
depth - Wether depth test should be enabled or notvoid setParticleSpawnRange(int range)
range - The range that particle spawning should haveIMultiblock createMultiblock(net.minecraft.util.ResourceLocation name, java.lang.String[][] pattern, java.lang.Object... rawMatchers)
name - 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.java.util.List<net.minecraft.util.Tuple<net.minecraft.util.math.Vec3d,java.lang.Integer>> getActiveEffectPowders(net.minecraft.world.World world,
net.minecraft.util.math.AxisAlignedBB area,
net.minecraft.util.ResourceLocation name)
NaturesAuraAPI.EFFECT_POWDERSworld - The worldarea - The area to find powders inname - The registry name of the powderboolean isEffectPowderActive(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.ResourceLocation name)
getActiveEffectPowders(World,
AxisAlignedBB, ResourceLocation) that returns true if the list is
non-emptyworld - The worldpos - The center positionname - The registry name of the powdervoid 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)
int getSpotAmountInArea(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius)
int getAuraInArea(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius)
int triangulateAuraInArea(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
int radius)
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)
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)