/** * Returns a new instance of a block's tile entity class. Called on placing the block. */ public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityDaylightDetector(); }
/** * Returns a new instance of a block's tile entity class. Called on placing the block. */ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityDaylightDetector(); }
@Override public Class<?> getTargetClass() { return TileEntityDaylightDetector.class; }
@ScriptCallable(returnTypes = ReturnType.BOOLEAN, description = "Get true if age has normal sky") public boolean hasSky(TileEntityDaylightDetector target) { World world = target.getWorldObj(); return !world.provider.hasNoSky; }
@ScriptCallable(returnTypes = ReturnType.NUMBER, description = "Get level of natural light (sky)") public int getSkyLight(TileEntityDaylightDetector target) { World world = target.getWorldObj(); Preconditions.checkArgument(!world.provider.hasNoSky, "World has no sky"); return world.getSavedLightValue(EnumSkyBlock.Sky, target.xCoord, target.yCoord, target.zCoord) - world.skylightSubtracted; }
@ScriptCallable(returnTypes = ReturnType.NUMBER, description = "Get level of block light") public int getBlockLight(TileEntityDaylightDetector target) { World world = target.getWorldObj(); return world.getSavedLightValue(EnumSkyBlock.Block, target.xCoord, target.yCoord, target.zCoord); }
@ScriptCallable(returnTypes = ReturnType.NUMBER, description = "Get angle of sun (in degrees, 0 is zenith)") public float getCelestialAngle(TileEntityDaylightDetector target) { World world = target.getWorldObj(); return world.getCelestialAngle(1) * 360; }
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityDaylightDetector(); }
public TileEntity func_72274_a(World p_72274_1_) { return new TileEntityDaylightDetector(); }
/** * Returns a new instance of a block's tile entity class. Called on placing the block. */ public TileEntity createNewTileEntity(World par1World) { return new TileEntityDaylightDetector(); }