mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 20:49:05 +00:00
ScriptEntity:
-Added getEntityId() function -Moved getUniqueId() function ScriptWorld: -Added getPlayerByUUID(uuidstring) function -Added several functions from World and WorldServer: isBlockFreezable,isBlockFreezableNaturally,canBlockFreeze,canBlockFreezeBody,canSnowAt,canSnowAtBody,getTopBlock,getHeightValue,getChunkHeightMapMinimum,getBlockMetadata,setBlockMetadataWithNotify,canBlockSeeTheSky,getFullBlockLightValue,getBlockLightValue,playSoundAtEntity,playSoundToNearExcept,getEntityByID,spawnEntityInWorld,getClosestPlayerToEntity,getClosestPlayer,getClosestVulnerablePlayerToEntity,getClosestVulnerablePlayer,countEntities,setTileEntity,removeTileEntity,isBlockFullCube,getSeed,setSpawnLocation,canLightningStrikeAt,isBlockHighHumidity ScriptTileEntity: Added a ScriptTileEntity class for MC Tile Entities, with nearly all its functions. ScriptBlock: -Added getTileEntity() and setTileEntity() functions using the new ScriptTileEntity class as a return value and parameter respectively. API: -Added playSoundAtEntity and playSoundToNearExcept functions. -Added set/getMOTD() functions.
This commit is contained in:
1 parent
80e3c075c7
commit
bfd872a239
7 files changed
+332
-5
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package noppes.npcs.scripted.interfaces;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
@@ -18,6 +20,8 @@ public interface IWorld {
|
||||
*/
|
||||
public long getTotalTime();
|
||||
|
||||
boolean areAllPlayersAsleep();
|
||||
|
||||
/**
|
||||
* @param x World position x
|
||||
* @param y World position y
|
||||
@@ -26,6 +30,66 @@ public interface IWorld {
|
||||
*/
|
||||
public IBlock getBlock(int x, int y, int z);
|
||||
|
||||
IBlock getTopBlock(int x, int z);
|
||||
|
||||
public boolean isBlockFreezable(int x, int y, int z);
|
||||
|
||||
public boolean isBlockFreezableNaturally(int x, int y, int z);
|
||||
|
||||
public boolean canBlockFreeze(int x, int y, int z, boolean adjacentToWater);
|
||||
|
||||
public boolean canBlockFreezeBody(int x, int y, int z, boolean adjacentToWater);
|
||||
|
||||
public boolean canSnowAt(int x, int y, int z, boolean checkLight);
|
||||
|
||||
public boolean canSnowAtBody(int x, int y, int z, boolean checkLight);
|
||||
|
||||
public int getHeightValue(int x, int z);
|
||||
|
||||
public int getChunkHeightMapMinimum(int x, int z);
|
||||
|
||||
public int getBlockMetadata(int x, int y, int z);
|
||||
|
||||
public boolean setBlockMetadataWithNotify(int x, int y, int z, int metadata, int flag);
|
||||
|
||||
public boolean canBlockSeeTheSky(int x, int y, int z);
|
||||
|
||||
public int getFullBlockLightValue(int x, int y, int z);
|
||||
|
||||
public int getBlockLightValue(int x, int y, int z);
|
||||
|
||||
public void playSoundAtEntity(ScriptEntity entity, String sound, float volume, float pitch);
|
||||
|
||||
public void playSoundToNearExcept(ScriptPlayer player, String sound, float volume, float pitch);
|
||||
|
||||
public ScriptEntity getEntityByID(int id);
|
||||
|
||||
public boolean spawnEntityInWorld(ScriptEntity entity);
|
||||
|
||||
public ScriptPlayer getClosestPlayerToEntity(ScriptEntity entity, double range);
|
||||
|
||||
public ScriptPlayer getClosestPlayer(double x, double y, double z, double range);
|
||||
|
||||
public ScriptPlayer getClosestVulnerablePlayerToEntity(ScriptEntity entity, double range);
|
||||
|
||||
public ScriptPlayer getClosestVulnerablePlayer(double x, double y, double z, double range);
|
||||
|
||||
public int countEntities(ScriptEntity entity);
|
||||
|
||||
public void setTileEntity(int x, int y, int z, ScriptTileEntity tileEntity);
|
||||
|
||||
public void removeTileEntity(int x, int y, int z);
|
||||
|
||||
public boolean isBlockFullCube(int x, int y, int z);
|
||||
|
||||
public long getSeed();
|
||||
|
||||
public void setSpawnLocation(int x, int y, int z);
|
||||
|
||||
public boolean canLightningStrikeAt(int x, int y, int z);
|
||||
|
||||
boolean isBlockHighHumidity(int x, int y, int z);
|
||||
|
||||
/**
|
||||
* @param x World position x
|
||||
* @param y World position y
|
||||
@@ -56,6 +120,8 @@ public interface IWorld {
|
||||
*/
|
||||
public ScriptPlayer getPlayer(String name);
|
||||
|
||||
ScriptPlayer getPlayerByUUID(String uuid);
|
||||
|
||||
/**
|
||||
* @param time The world time to be set
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user