    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005
    006    public class DerivedWorldInfo extends WorldInfo
    007    {
    008        /** Instance of WorldInfo. */
    009        private final WorldInfo theWorldInfo;
    010
    011        public DerivedWorldInfo(WorldInfo par1WorldInfo)
    012        {
    013            this.theWorldInfo = par1WorldInfo;
    014        }
    015
    016        /**
    017         * Gets the NBTTagCompound for the worldInfo
    018         */
    019        public NBTTagCompound getNBTTagCompound()
    020        {
    021            return this.theWorldInfo.getNBTTagCompound();
    022        }
    023
    024        /**
    025         * Creates a new NBTTagCompound for the world, with the given NBTTag as the "Player"
    026         */
    027        public NBTTagCompound cloneNBTCompound(NBTTagCompound par1NBTTagCompound)
    028        {
    029            return this.theWorldInfo.cloneNBTCompound(par1NBTTagCompound);
    030        }
    031
    032        /**
    033         * Returns the seed of current world.
    034         */
    035        public long getSeed()
    036        {
    037            return this.theWorldInfo.getSeed();
    038        }
    039
    040        /**
    041         * Returns the x spawn position
    042         */
    043        public int getSpawnX()
    044        {
    045            return this.theWorldInfo.getSpawnX();
    046        }
    047
    048        /**
    049         * Return the Y axis spawning point of the player.
    050         */
    051        public int getSpawnY()
    052        {
    053            return this.theWorldInfo.getSpawnY();
    054        }
    055
    056        /**
    057         * Returns the z spawn position
    058         */
    059        public int getSpawnZ()
    060        {
    061            return this.theWorldInfo.getSpawnZ();
    062        }
    063
    064        /**
    065         * Get current world time
    066         */
    067        public long getWorldTime()
    068        {
    069            return this.theWorldInfo.getWorldTime();
    070        }
    071
    072        @SideOnly(Side.CLIENT)
    073        public long getSizeOnDisk()
    074        {
    075            return this.theWorldInfo.getSizeOnDisk();
    076        }
    077
    078        /**
    079         * Returns the player's NBTTagCompound to be loaded
    080         */
    081        public NBTTagCompound getPlayerNBTTagCompound()
    082        {
    083            return this.theWorldInfo.getPlayerNBTTagCompound();
    084        }
    085
    086        public int getDimension()
    087        {
    088            return this.theWorldInfo.getDimension();
    089        }
    090
    091        /**
    092         * Get current world name
    093         */
    094        public String getWorldName()
    095        {
    096            return this.theWorldInfo.getWorldName();
    097        }
    098
    099        /**
    100         * Returns the save version of this world
    101         */
    102        public int getSaveVersion()
    103        {
    104            return this.theWorldInfo.getSaveVersion();
    105        }
    106
    107        @SideOnly(Side.CLIENT)
    108
    109        /**
    110         * Return the last time the player was in this world.
    111         */
    112        public long getLastTimePlayed()
    113        {
    114            return this.theWorldInfo.getLastTimePlayed();
    115        }
    116
    117        /**
    118         * Returns true if it is thundering, false otherwise.
    119         */
    120        public boolean isThundering()
    121        {
    122            return this.theWorldInfo.isThundering();
    123        }
    124
    125        /**
    126         * Returns the number of ticks until next thunderbolt.
    127         */
    128        public int getThunderTime()
    129        {
    130            return this.theWorldInfo.getThunderTime();
    131        }
    132
    133        /**
    134         * Returns true if it is raining, false otherwise.
    135         */
    136        public boolean isRaining()
    137        {
    138            return this.theWorldInfo.isRaining();
    139        }
    140
    141        /**
    142         * Return the number of ticks until rain.
    143         */
    144        public int getRainTime()
    145        {
    146            return this.theWorldInfo.getRainTime();
    147        }
    148
    149        /**
    150         * Gets the GameType.
    151         */
    152        public EnumGameType getGameType()
    153        {
    154            return this.theWorldInfo.getGameType();
    155        }
    156
    157        @SideOnly(Side.CLIENT)
    158
    159        /**
    160         * Set the x spawn position to the passed in value
    161         */
    162        public void setSpawnX(int par1) {}
    163
    164        @SideOnly(Side.CLIENT)
    165
    166        /**
    167         * Sets the y spawn position
    168         */
    169        public void setSpawnY(int par1) {}
    170
    171        /**
    172         * Set current world time
    173         */
    174        public void setWorldTime(long par1) {}
    175
    176        @SideOnly(Side.CLIENT)
    177
    178        /**
    179         * Set the z spawn position to the passed in value
    180         */
    181        public void setSpawnZ(int par1) {}
    182
    183        /**
    184         * Sets the spawn zone position. Args: x, y, z
    185         */
    186        public void setSpawnPosition(int par1, int par2, int par3) {}
    187
    188        public void setWorldName(String par1Str) {}
    189
    190        /**
    191         * Sets the save version of the world
    192         */
    193        public void setSaveVersion(int par1) {}
    194
    195        /**
    196         * Sets whether it is thundering or not.
    197         */
    198        public void setThundering(boolean par1) {}
    199
    200        /**
    201         * Defines the number of ticks until next thunderbolt.
    202         */
    203        public void setThunderTime(int par1) {}
    204
    205        /**
    206         * Sets whether it is raining or not.
    207         */
    208        public void setRaining(boolean par1) {}
    209
    210        /**
    211         * Sets the number of ticks until rain.
    212         */
    213        public void setRainTime(int par1) {}
    214
    215        /**
    216         * Get whether the map features (e.g. strongholds) generation is enabled or disabled.
    217         */
    218        public boolean isMapFeaturesEnabled()
    219        {
    220            return this.theWorldInfo.isMapFeaturesEnabled();
    221        }
    222
    223        /**
    224         * Returns true if hardcore mode is enabled, otherwise false
    225         */
    226        public boolean isHardcoreModeEnabled()
    227        {
    228            return this.theWorldInfo.isHardcoreModeEnabled();
    229        }
    230
    231        public WorldType getTerrainType()
    232        {
    233            return this.theWorldInfo.getTerrainType();
    234        }
    235
    236        public void setTerrainType(WorldType par1WorldType) {}
    237
    238        /**
    239         * Returns true if commands are allowed on this World.
    240         */
    241        public boolean areCommandsAllowed()
    242        {
    243            return this.theWorldInfo.areCommandsAllowed();
    244        }
    245
    246        /**
    247         * Returns true if the World is initialized.
    248         */
    249        public boolean isInitialized()
    250        {
    251            return this.theWorldInfo.isInitialized();
    252        }
    253
    254        /**
    255         * Sets the initialization status of the World.
    256         */
    257        public void setServerInitialized(boolean par1) {}
    258    }