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:
Luis C.M committed 2022-05-03 23:09:21 -05:00
1 parent 80e3c075c7
commit bfd872a239
7 files changed
+332 -5

No files matched your search

@@ -34,6 +34,7 @@ public class ScriptBlock implements IBlock {
}
protected void setTile(TileEntity tile) {
world.setTileEntity(pos.getX(),pos.getY(), pos.getZ(),new ScriptTileEntity(tile));
this.tile = tile;
}
@@ -112,6 +113,15 @@ public class ScriptBlock implements IBlock {
return this.tile != null;
}
public ScriptTileEntity getTileEntity() {
return new ScriptTileEntity(this.tile);
}
public void setTileEntity(ScriptTileEntity tileEntity){
world.setTileEntity(pos.getX(),pos.getY(), pos.getZ(),tileEntity);
this.tile = tileEntity.getMCTileEntity();
}
public TileEntity getMCTileEntity() {
return this.tile;
}