mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 21:20:12 +00:00
Redirect a lot of functions through WorldProvider for Mystcraft, allowing them to be overriden by the provider.
This commit is contained in:
1 parent
6b78512a48
commit
cf3bc6a9d9
4 files changed
+435
-31
No files matched your search
@@ -26,7 +26,7 @@
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -254,4 +258,110 @@
|
||||
@@ -254,4 +258,241 @@
|
||||
* Returns the dimension's name, e.g. "The End", "Nether", or "Overworld".
|
||||
*/
|
||||
public abstract String getDimensionName();
|
||||
@@ -135,5 +135,136 @@
|
||||
+ }
|
||||
+
|
||||
+ return var5;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /*======================================= Start Moved From World =========================================*/
|
||||
+
|
||||
+ public BiomeGenBase getBiomeGenForCoords(int x, int z)
|
||||
+ {
|
||||
+ return worldObj.getBiomeGenForCoordsBody(x, z);
|
||||
+ }
|
||||
+
|
||||
+ public boolean isDaytime()
|
||||
+ {
|
||||
+ return worldObj.skylightSubtracted < 4;
|
||||
+ }
|
||||
+
|
||||
+ @SideOnly(Side.CLIENT)
|
||||
+ public Vec3 getSkyColor(Entity cameraEntity, float partialTicks)
|
||||
+ {
|
||||
+ return worldObj.getSkyColorBody(cameraEntity, partialTicks);
|
||||
+ }
|
||||
+
|
||||
+ @SideOnly(Side.CLIENT)
|
||||
+ public Vec3 drawClouds(float partialTicks)
|
||||
+ {
|
||||
+ return worldObj.drawCloudsBody(partialTicks);
|
||||
+ }
|
||||
+
|
||||
+ @SideOnly(Side.CLIENT)
|
||||
+ public float getStarBrightness(float par1)
|
||||
+ {
|
||||
+ return worldObj.getStarBrightnessBody(par1);
|
||||
+ }
|
||||
+
|
||||
+ public void setAllowedSpawnTypes(boolean allowHostile, boolean allowPeaceful)
|
||||
+ {
|
||||
+ worldObj.spawnHostileMobs = allowHostile;
|
||||
+ worldObj.spawnPeacefulMobs = allowPeaceful;
|
||||
+ }
|
||||
+
|
||||
+ public void calculateInitialWeather()
|
||||
+ {
|
||||
+ worldObj.calculateInitialWeatherBody();
|
||||
+ }
|
||||
+
|
||||
+ public void updateWeather()
|
||||
+ {
|
||||
+ worldObj.updateWeatherBody();
|
||||
+ }
|
||||
+
|
||||
+ public void toggleRain()
|
||||
+ {
|
||||
+ worldObj.worldInfo.setRainTime(1);
|
||||
+ }
|
||||
+
|
||||
+ public boolean canBlockFreeze(int x, int y, int z, boolean byWater)
|
||||
+ {
|
||||
+ return worldObj.canBlockFreezeBody(x, y, z, byWater);
|
||||
+ }
|
||||
+
|
||||
+ public boolean canSnowAt(int x, int y, int z)
|
||||
+ {
|
||||
+ return worldObj.canSnowAtBody(x, y, z);
|
||||
+ }
|
||||
+
|
||||
+ public void setWorldTime(long time)
|
||||
+ {
|
||||
+ worldObj.worldInfo.setWorldTime(time);
|
||||
+ }
|
||||
+
|
||||
+ public long getSeed()
|
||||
+ {
|
||||
+ return worldObj.worldInfo.getSeed();
|
||||
+ }
|
||||
+
|
||||
+ public long getWorldTime()
|
||||
+ {
|
||||
+ return worldObj.worldInfo.getWorldTime();
|
||||
+ }
|
||||
+
|
||||
+ public ChunkCoordinates getSpawnPoint()
|
||||
+ {
|
||||
+ WorldInfo info = worldObj.worldInfo;
|
||||
+ return new ChunkCoordinates(info.getSpawnX(), info.getSpawnY(), info.getSpawnZ());
|
||||
+ }
|
||||
+
|
||||
+ public void setSpawnPoint(int x, int y, int z)
|
||||
+ {
|
||||
+ worldObj.worldInfo.setSpawnPosition(x, y, z);
|
||||
+ }
|
||||
+
|
||||
+ public boolean canMineBlock(EntityPlayer player, int x, int y, int z)
|
||||
+ {
|
||||
+ return worldObj.canMineBlockBody(player, x, y, z);
|
||||
+ }
|
||||
+
|
||||
+ public boolean isBlockHighHumidity(int x, int y, int z)
|
||||
+ {
|
||||
+ return worldObj.getBiomeGenForCoords(x, z).isHighHumidity();
|
||||
+ }
|
||||
+
|
||||
+ public int getHeight()
|
||||
+ {
|
||||
+ return 256;
|
||||
+ }
|
||||
+
|
||||
+ public int getActualHeight()
|
||||
+ {
|
||||
+ return hasNoSky ? 128 : 256;
|
||||
+ }
|
||||
+
|
||||
+ public double getHorizon()
|
||||
+ {
|
||||
+ return worldObj.worldInfo.getTerrainType().getHorizon(worldObj);
|
||||
+ }
|
||||
+
|
||||
+ public void resetRainAndThunder()
|
||||
+ {
|
||||
+ worldObj.worldInfo.setRainTime(0);
|
||||
+ worldObj.worldInfo.setRaining(false);
|
||||
+ worldObj.worldInfo.setThunderTime(0);
|
||||
+ worldObj.worldInfo.setThundering(false);
|
||||
+ }
|
||||
+
|
||||
+ public boolean canDoLightning(Chunk chunk)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ public boolean canDoRainSnowIce(Chunk chunk)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
Reference in new issue
Block a user