@SubscribeEvent
public void move(TickEvent.PlayerTickEvent event) {
if (event.player.world.isRemote) {
//System.out.println("CLIENT "+event.player.world.getBiome(event.player.getPosition()).getBiomeName());
return;
}
//System.out.println(event.player.world.getBiome(event.player.getPosition()).getBiomeName());
if (CommonProxy.d == 0) {
return;
}
World w = event.player.world;
if (w != null && w.getWorldType() == WorldType.DEFAULT) {
new SpawnTeleport(DimensionManager.getWorld(CommonProxy.d)).teleport(event.player, DimensionManager.getWorld(CommonProxy.d));
}
}
java类net.minecraft.world.WorldType的实例源码
JoinHandler.java 文件源码
项目:Firma
阅读 22
收藏 0
点赞 0
评论 0
ChunkData.java 文件源码
项目:Geolosys
阅读 18
收藏 0
点赞 0
评论 0
public void addChunk(ChunkPos pos, World world, IBlockState state)
{
populatedChunks.add(pos);
if (world.getWorldType() == WorldType.FLAT)
{
return;
}
int cap = getSampleCount(state);
for (int i = 0; i < cap; i++)
{
BlockPos p = getSamplePos(world, pos);
if (world.getBlockState(p.down()).getBlock() instanceof BlockSample || world.getBlockState(p.down()).getBlock() instanceof BlockSampleVanilla)
{
continue;
}
if (Config.getInstance().generateSamplesInWater || !isMoist(world, p))
{
world.setBlockState(p, state);
}
}
}
GenLayerBiome.java 文件源码
项目:DecompiledMinecraft
阅读 25
收藏 0
点赞 0
评论 0
public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, String p_i45560_5_)
{
super(p_i45560_1_);
this.parent = p_i45560_3_;
if (p_i45560_4_ == WorldType.DEFAULT_1_1)
{
this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.swampland, BiomeGenBase.plains, BiomeGenBase.taiga};
this.field_175973_g = null;
}
else if (p_i45560_4_ == WorldType.CUSTOMIZED)
{
this.field_175973_g = ChunkProviderSettings.Factory.jsonToFactory(p_i45560_5_).func_177864_b();
}
else
{
this.field_175973_g = null;
}
}
S01PacketJoinGame.java 文件源码
项目:DecompiledMinecraft
阅读 21
收藏 0
点赞 0
评论 0
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.entityId = buf.readInt();
int i = buf.readUnsignedByte();
this.hardcoreMode = (i & 8) == 8;
i = i & -9;
this.gameType = WorldSettings.GameType.getByID(i);
this.dimension = buf.readByte();
this.difficulty = EnumDifficulty.getDifficultyEnum(buf.readUnsignedByte());
this.maxPlayers = buf.readUnsignedByte();
this.worldType = WorldType.parseWorldType(buf.readStringFromBuffer(16));
if (this.worldType == null)
{
this.worldType = WorldType.DEFAULT;
}
this.reducedDebugInfo = buf.readBoolean();
}
GenLayerBiome.java 文件源码
项目:DecompiledMinecraft
阅读 20
收藏 0
点赞 0
评论 0
public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, String p_i45560_5_)
{
super(p_i45560_1_);
this.parent = p_i45560_3_;
if (p_i45560_4_ == WorldType.DEFAULT_1_1)
{
this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.swampland, BiomeGenBase.plains, BiomeGenBase.taiga};
this.field_175973_g = null;
}
else if (p_i45560_4_ == WorldType.CUSTOMIZED)
{
this.field_175973_g = ChunkProviderSettings.Factory.jsonToFactory(p_i45560_5_).func_177864_b();
}
else
{
this.field_175973_g = null;
}
}
BlockRendererDispatcher.java 文件源码
项目:DecompiledMinecraft
阅读 23
收藏 0
点赞 0
评论 0
public IBakedModel getModelFromBlockState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
{
Block block = state.getBlock();
if (worldIn.getWorldType() != WorldType.DEBUG_WORLD)
{
try
{
state = block.getActualState(state, worldIn, pos);
}
catch (Exception var6)
{
;
}
}
IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state);
if (pos != null && this.gameSettings.allowBlockAlternatives && ibakedmodel instanceof WeightedBakedModel)
{
ibakedmodel = ((WeightedBakedModel)ibakedmodel).getAlternativeModel(MathHelper.getPositionRandom(pos));
}
return ibakedmodel;
}
GenLayerBiome.java 文件源码
项目:BaseClient
阅读 45
收藏 0
点赞 0
评论 0
public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, String p_i45560_5_)
{
super(p_i45560_1_);
this.parent = p_i45560_3_;
if (p_i45560_4_ == WorldType.DEFAULT_1_1)
{
this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.swampland, BiomeGenBase.plains, BiomeGenBase.taiga};
this.field_175973_g = null;
}
else if (p_i45560_4_ == WorldType.CUSTOMIZED)
{
this.field_175973_g = ChunkProviderSettings.Factory.jsonToFactory(p_i45560_5_).func_177864_b();
}
else
{
this.field_175973_g = null;
}
}
GenLayerBiome.java 文件源码
项目:BaseClient
阅读 24
收藏 0
点赞 0
评论 0
public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, String p_i45560_5_)
{
super(p_i45560_1_);
this.parent = p_i45560_3_;
if (p_i45560_4_ == WorldType.DEFAULT_1_1)
{
this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.swampland, BiomeGenBase.plains, BiomeGenBase.taiga};
this.field_175973_g = null;
}
else if (p_i45560_4_ == WorldType.CUSTOMIZED)
{
this.field_175973_g = ChunkProviderSettings.Factory.jsonToFactory(p_i45560_5_).func_177864_b();
}
else
{
this.field_175973_g = null;
}
}
S01PacketJoinGame.java 文件源码
项目:BaseClient
阅读 18
收藏 0
点赞 0
评论 0
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.entityId = buf.readInt();
int i = buf.readUnsignedByte();
this.hardcoreMode = (i & 8) == 8;
i = i & -9;
this.gameType = WorldSettings.GameType.getByID(i);
this.dimension = buf.readByte();
this.difficulty = EnumDifficulty.getDifficultyEnum(buf.readUnsignedByte());
this.maxPlayers = buf.readUnsignedByte();
this.worldType = WorldType.parseWorldType(buf.readStringFromBuffer(16));
if (this.worldType == null)
{
this.worldType = WorldType.DEFAULT;
}
this.reducedDebugInfo = buf.readBoolean();
}
SPacketJoinGame.java 文件源码
项目:CustomWorldGen
阅读 25
收藏 0
点赞 0
评论 0
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.playerId = buf.readInt();
int i = buf.readUnsignedByte();
this.hardcoreMode = (i & 8) == 8;
i = i & -9;
this.gameType = GameType.getByID(i);
this.dimension = buf.readInt();
this.difficulty = EnumDifficulty.getDifficultyEnum(buf.readUnsignedByte());
this.maxPlayers = buf.readUnsignedByte();
this.worldType = WorldType.parseWorldType(buf.readStringFromBuffer(16));
if (this.worldType == null)
{
this.worldType = WorldType.DEFAULT;
}
this.reducedDebugInfo = buf.readBoolean();
}
SPacketJoinGame.java 文件源码
项目:Backmemed
阅读 24
收藏 0
点赞 0
评论 0
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.playerId = buf.readInt();
int i = buf.readUnsignedByte();
this.hardcoreMode = (i & 8) == 8;
i = i & -9;
this.gameType = GameType.getByID(i);
this.dimension = buf.readInt();
this.difficulty = EnumDifficulty.getDifficultyEnum(buf.readUnsignedByte());
this.maxPlayers = buf.readUnsignedByte();
this.worldType = WorldType.parseWorldType(buf.readStringFromBuffer(16));
if (this.worldType == null)
{
this.worldType = WorldType.DEFAULT;
}
this.reducedDebugInfo = buf.readBoolean();
}
WorldTypeEvent.java 文件源码
项目:CustomWorldGen
阅读 19
收藏 0
点赞 0
评论 0
public InitBiomeGens(WorldType worldType, long seed, GenLayer[] original)
{
super(worldType);
this.seed = seed;
originalBiomeGens = original;
setNewBiomeGens(original.clone());
}
FirmaGenLayer.java 文件源码
项目:Firma
阅读 21
收藏 0
点赞 0
评论 0
public static FirmaGenLayer[] initialize(long seed, WorldType worldTypeIn) {
FirmaGenLayer continent = genContinent(0L, false);
continent = new GenLayerDeepOcean(4L, continent);
drawImage(512, continent, "8b Continents Done Deep Ocean");
byte var4 = 4;
// Create Biomes
FirmaGenLayer continentCopy2 = FirmaGenLayerZoom.magnify(200L, continent, 0);
FirmaGenLayer var17 = new FirmaGenLayerBiome(200L, continentCopy2, worldTypeIn);
FirmaGenLayer lakes = new GenLayerLakes(200L, var17);
continentCopy2 = FirmaGenLayerZoom.magnify(1000L, lakes, 2);
FirmaGenLayer var18 = new GenLayerBiomeEdge(1000L, continentCopy2);
for (int var7 = 0; var7 < var4; ++var7) {
var18 = new FirmaGenLayerZoom(1000 + var7, var18);
drawImage(512, var18, "18-" + var7 + " Zoom");
if (var7 == 0)
var18 = new FirmaGenLayerAddIsland(3L, var18);
if (var7 == 1) {
var18 = new FirmaGenLayerShore(1000L, var18);
drawImage(512, var18, "18z Shore");
}
}
// Create Rivers
FirmaGenLayer riverCont = FirmaGenLayerZoom.magnify(1000L, continent, 2);
riverCont = new FirmaGenLayerRiverInit(100L, riverCont);
riverCont = FirmaGenLayerZoom.magnify(1000L, riverCont, 6);
riverCont = new FirmaGenLayerRiver(1L, riverCont);
riverCont = new FirmaGenLayerSmooth(1000L, riverCont);
FirmaGenLayerSmoothBiome smoothContinent = new FirmaGenLayerSmoothBiome(1000L, var18);
FirmaGenLayerRiverMix riverMix = new FirmaGenLayerRiverMix(100L, smoothContinent, riverCont);
FirmaGenLayer finalCont = FirmaGenLayerZoom.magnify(1000L, riverMix, 2);
finalCont = new FirmaGenLayerSmoothBiome(1001L, finalCont);
riverMix.initWorldGenSeed(seed);
finalCont.initWorldGenSeed(seed);
drawImage(512, riverMix, "Biome 20");
drawImage(512, finalCont, "Biome 21");
return new FirmaGenLayer[] { riverMix, finalCont };
}
WorldChunkManager.java 文件源码
项目:DecompiledMinecraft
阅读 26
收藏 0
点赞 0
评论 0
public WorldChunkManager(long seed, WorldType p_i45744_3_, String p_i45744_4_)
{
this();
this.field_180301_f = p_i45744_4_;
GenLayer[] agenlayer = GenLayer.initializeAllBiomeGenerators(seed, p_i45744_3_, p_i45744_4_);
this.genBiomes = agenlayer[0];
this.biomeIndexLayer = agenlayer[1];
}
EntitySlime.java 文件源码
项目:DecompiledMinecraft
阅读 26
收藏 0
点赞 0
评论 0
/**
* Checks if the entity's current position is a valid location to spawn this entity.
*/
public boolean getCanSpawnHere()
{
BlockPos blockpos = new BlockPos(MathHelper.floor_double(this.posX), 0, MathHelper.floor_double(this.posZ));
Chunk chunk = this.worldObj.getChunkFromBlockCoords(blockpos);
if (this.worldObj.getWorldInfo().getTerrainType() == WorldType.FLAT && this.rand.nextInt(4) != 1)
{
return false;
}
else
{
if (this.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL)
{
BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(blockpos);
if (biomegenbase == BiomeGenBase.swampland && this.posY > 50.0D && this.posY < 70.0D && this.rand.nextFloat() < 0.5F && this.rand.nextFloat() < this.worldObj.getCurrentMoonPhaseFactor() && this.worldObj.getLightFromNeighbors(new BlockPos(this)) <= this.rand.nextInt(8))
{
return super.getCanSpawnHere();
}
if (this.rand.nextInt(10) == 0 && chunk.getRandomWithSeed(987234911L).nextInt(10) == 0 && this.posY < 40.0D)
{
return super.getCanSpawnHere();
}
}
return false;
}
}
S07PacketRespawn.java 文件源码
项目:DecompiledMinecraft
阅读 20
收藏 0
点赞 0
评论 0
public S07PacketRespawn(int dimensionIDIn, EnumDifficulty difficultyIn, WorldType worldTypeIn, WorldSettings.GameType gameTypeIn)
{
this.dimensionID = dimensionIDIn;
this.difficulty = difficultyIn;
this.gameType = gameTypeIn;
this.worldType = worldTypeIn;
}
S07PacketRespawn.java 文件源码
项目:DecompiledMinecraft
阅读 18
收藏 0
点赞 0
评论 0
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.dimensionID = buf.readInt();
this.difficulty = EnumDifficulty.getDifficultyEnum(buf.readUnsignedByte());
this.gameType = WorldSettings.GameType.getByID(buf.readUnsignedByte());
this.worldType = WorldType.parseWorldType(buf.readStringFromBuffer(16));
if (this.worldType == null)
{
this.worldType = WorldType.DEFAULT;
}
}
S01PacketJoinGame.java 文件源码
项目:DecompiledMinecraft
阅读 20
收藏 0
点赞 0
评论 0
public S01PacketJoinGame(int entityIdIn, WorldSettings.GameType gameTypeIn, boolean hardcoreModeIn, int dimensionIn, EnumDifficulty difficultyIn, int maxPlayersIn, WorldType worldTypeIn, boolean reducedDebugInfoIn)
{
this.entityId = entityIdIn;
this.dimension = dimensionIn;
this.difficulty = difficultyIn;
this.gameType = gameTypeIn;
this.maxPlayers = maxPlayersIn;
this.hardcoreMode = hardcoreModeIn;
this.worldType = worldTypeIn;
this.reducedDebugInfo = reducedDebugInfoIn;
}
WorldChunkManager.java 文件源码
项目:DecompiledMinecraft
阅读 25
收藏 0
点赞 0
评论 0
public WorldChunkManager(long seed, WorldType p_i45744_3_, String p_i45744_4_)
{
this();
this.field_180301_f = p_i45744_4_;
GenLayer[] agenlayer = GenLayer.initializeAllBiomeGenerators(seed, p_i45744_3_, p_i45744_4_);
this.genBiomes = agenlayer[0];
this.biomeIndexLayer = agenlayer[1];
}
EntitySlime.java 文件源码
项目:DecompiledMinecraft
阅读 33
收藏 0
点赞 0
评论 0
/**
* Checks if the entity's current position is a valid location to spawn this entity.
*/
public boolean getCanSpawnHere()
{
BlockPos blockpos = new BlockPos(MathHelper.floor_double(this.posX), 0, MathHelper.floor_double(this.posZ));
Chunk chunk = this.worldObj.getChunkFromBlockCoords(blockpos);
if (this.worldObj.getWorldInfo().getTerrainType() == WorldType.FLAT && this.rand.nextInt(4) != 1)
{
return false;
}
else
{
if (this.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL)
{
BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(blockpos);
if (biomegenbase == BiomeGenBase.swampland && this.posY > 50.0D && this.posY < 70.0D && this.rand.nextFloat() < 0.5F && this.rand.nextFloat() < this.worldObj.getCurrentMoonPhaseFactor() && this.worldObj.getLightFromNeighbors(new BlockPos(this)) <= this.rand.nextInt(8))
{
return super.getCanSpawnHere();
}
if (this.rand.nextInt(10) == 0 && chunk.getRandomWithSeed(987234911L).nextInt(10) == 0 && this.posY < 40.0D)
{
return super.getCanSpawnHere();
}
}
return false;
}
}
S07PacketRespawn.java 文件源码
项目:DecompiledMinecraft
阅读 18
收藏 0
点赞 0
评论 0
public S07PacketRespawn(int dimensionIDIn, EnumDifficulty difficultyIn, WorldType worldTypeIn, WorldSettings.GameType gameTypeIn)
{
this.dimensionID = dimensionIDIn;
this.difficulty = difficultyIn;
this.gameType = gameTypeIn;
this.worldType = worldTypeIn;
}
S07PacketRespawn.java 文件源码
项目:DecompiledMinecraft
阅读 19
收藏 0
点赞 0
评论 0
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.dimensionID = buf.readInt();
this.difficulty = EnumDifficulty.getDifficultyEnum(buf.readUnsignedByte());
this.gameType = WorldSettings.GameType.getByID(buf.readUnsignedByte());
this.worldType = WorldType.parseWorldType(buf.readStringFromBuffer(16));
if (this.worldType == null)
{
this.worldType = WorldType.DEFAULT;
}
}
GuiCreateWorld.java 文件源码
项目:DecompiledMinecraft
阅读 22
收藏 0
点赞 0
评论 0
private void func_146319_h()
{
this.btnGameMode.displayString = I18n.format("selectWorld.gameMode", new Object[0]) + ": " + I18n.format("selectWorld.gameMode." + this.gameMode, new Object[0]);
this.field_146323_G = I18n.format("selectWorld.gameMode." + this.gameMode + ".line1", new Object[0]);
this.field_146328_H = I18n.format("selectWorld.gameMode." + this.gameMode + ".line2", new Object[0]);
this.btnMapFeatures.displayString = I18n.format("selectWorld.mapFeatures", new Object[0]) + " ";
if (this.field_146341_s)
{
this.btnMapFeatures.displayString = this.btnMapFeatures.displayString + I18n.format("options.on", new Object[0]);
}
else
{
this.btnMapFeatures.displayString = this.btnMapFeatures.displayString + I18n.format("options.off", new Object[0]);
}
this.btnBonusItems.displayString = I18n.format("selectWorld.bonusItems", new Object[0]) + " ";
if (this.field_146338_v && !this.field_146337_w)
{
this.btnBonusItems.displayString = this.btnBonusItems.displayString + I18n.format("options.on", new Object[0]);
}
else
{
this.btnBonusItems.displayString = this.btnBonusItems.displayString + I18n.format("options.off", new Object[0]);
}
this.btnMapType.displayString = I18n.format("selectWorld.mapType", new Object[0]) + " " + I18n.format(WorldType.worldTypes[this.selectedIndex].getTranslateName(), new Object[0]);
this.btnAllowCommands.displayString = I18n.format("selectWorld.allowCommands", new Object[0]) + " ";
if (this.allowCheats && !this.field_146337_w)
{
this.btnAllowCommands.displayString = this.btnAllowCommands.displayString + I18n.format("options.on", new Object[0]);
}
else
{
this.btnAllowCommands.displayString = this.btnAllowCommands.displayString + I18n.format("options.off", new Object[0]);
}
}
WorldChunkManager.java 文件源码
项目:BaseClient
阅读 22
收藏 0
点赞 0
评论 0
public WorldChunkManager(long seed, WorldType p_i45744_3_, String p_i45744_4_)
{
this();
this.field_180301_f = p_i45744_4_;
GenLayer[] agenlayer = GenLayer.initializeAllBiomeGenerators(seed, p_i45744_3_, p_i45744_4_);
this.genBiomes = agenlayer[0];
this.biomeIndexLayer = agenlayer[1];
}
EntitySlime.java 文件源码
项目:BaseClient
阅读 32
收藏 0
点赞 0
评论 0
/**
* Checks if the entity's current position is a valid location to spawn this entity.
*/
public boolean getCanSpawnHere()
{
BlockPos blockpos = new BlockPos(MathHelper.floor_double(this.posX), 0, MathHelper.floor_double(this.posZ));
Chunk chunk = this.worldObj.getChunkFromBlockCoords(blockpos);
if (this.worldObj.getWorldInfo().getTerrainType() == WorldType.FLAT && this.rand.nextInt(4) != 1)
{
return false;
}
else
{
if (this.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL)
{
BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(blockpos);
if (biomegenbase == BiomeGenBase.swampland && this.posY > 50.0D && this.posY < 70.0D && this.rand.nextFloat() < 0.5F && this.rand.nextFloat() < this.worldObj.getCurrentMoonPhaseFactor() && this.worldObj.getLightFromNeighbors(new BlockPos(this)) <= this.rand.nextInt(8))
{
return super.getCanSpawnHere();
}
if (this.rand.nextInt(10) == 0 && chunk.getRandomWithSeed(987234911L).nextInt(10) == 0 && this.posY < 40.0D)
{
return super.getCanSpawnHere();
}
}
return false;
}
}
GuiCreateWorld.java 文件源码
项目:Backmemed
阅读 22
收藏 0
点赞 0
评论 0
/**
* Sets displayed GUI elements according to the current settings state
*/
private void updateDisplayState()
{
this.btnGameMode.displayString = I18n.format("selectWorld.gameMode", new Object[0]) + ": " + I18n.format("selectWorld.gameMode." + this.gameMode, new Object[0]);
this.gameModeDesc1 = I18n.format("selectWorld.gameMode." + this.gameMode + ".line1", new Object[0]);
this.gameModeDesc2 = I18n.format("selectWorld.gameMode." + this.gameMode + ".line2", new Object[0]);
this.btnMapFeatures.displayString = I18n.format("selectWorld.mapFeatures", new Object[0]) + " ";
if (this.generateStructuresEnabled)
{
this.btnMapFeatures.displayString = this.btnMapFeatures.displayString + I18n.format("options.on", new Object[0]);
}
else
{
this.btnMapFeatures.displayString = this.btnMapFeatures.displayString + I18n.format("options.off", new Object[0]);
}
this.btnBonusItems.displayString = I18n.format("selectWorld.bonusItems", new Object[0]) + " ";
if (this.bonusChestEnabled && !this.hardCoreMode)
{
this.btnBonusItems.displayString = this.btnBonusItems.displayString + I18n.format("options.on", new Object[0]);
}
else
{
this.btnBonusItems.displayString = this.btnBonusItems.displayString + I18n.format("options.off", new Object[0]);
}
this.btnMapType.displayString = I18n.format("selectWorld.mapType", new Object[0]) + " " + I18n.format(WorldType.WORLD_TYPES[this.selectedIndex].getTranslateName(), new Object[0]);
this.btnAllowCommands.displayString = I18n.format("selectWorld.allowCommands", new Object[0]) + " ";
if (this.allowCheats && !this.hardCoreMode)
{
this.btnAllowCommands.displayString = this.btnAllowCommands.displayString + I18n.format("options.on", new Object[0]);
}
else
{
this.btnAllowCommands.displayString = this.btnAllowCommands.displayString + I18n.format("options.off", new Object[0]);
}
}
SPacketRespawn.java 文件源码
项目:CustomWorldGen
阅读 23
收藏 0
点赞 0
评论 0
public SPacketRespawn(int dimensionIdIn, EnumDifficulty difficultyIn, WorldType worldTypeIn, GameType gameModeIn)
{
this.dimensionID = dimensionIdIn;
this.difficulty = difficultyIn;
this.gameType = gameModeIn;
this.worldType = worldTypeIn;
}
GuiCreateWorld.java 文件源码
项目:BaseClient
阅读 21
收藏 0
点赞 0
评论 0
private void func_146319_h()
{
this.btnGameMode.displayString = I18n.format("selectWorld.gameMode", new Object[0]) + ": " + I18n.format("selectWorld.gameMode." + this.gameMode, new Object[0]);
this.field_146323_G = I18n.format("selectWorld.gameMode." + this.gameMode + ".line1", new Object[0]);
this.field_146328_H = I18n.format("selectWorld.gameMode." + this.gameMode + ".line2", new Object[0]);
this.btnMapFeatures.displayString = I18n.format("selectWorld.mapFeatures", new Object[0]) + " ";
if (this.field_146341_s)
{
this.btnMapFeatures.displayString = this.btnMapFeatures.displayString + I18n.format("options.on", new Object[0]);
}
else
{
this.btnMapFeatures.displayString = this.btnMapFeatures.displayString + I18n.format("options.off", new Object[0]);
}
this.btnBonusItems.displayString = I18n.format("selectWorld.bonusItems", new Object[0]) + " ";
if (this.field_146338_v && !this.field_146337_w)
{
this.btnBonusItems.displayString = this.btnBonusItems.displayString + I18n.format("options.on", new Object[0]);
}
else
{
this.btnBonusItems.displayString = this.btnBonusItems.displayString + I18n.format("options.off", new Object[0]);
}
this.btnMapType.displayString = I18n.format("selectWorld.mapType", new Object[0]) + " " + I18n.format(WorldType.worldTypes[this.selectedIndex].getTranslateName(), new Object[0]);
this.btnAllowCommands.displayString = I18n.format("selectWorld.allowCommands", new Object[0]) + " ";
if (this.allowCheats && !this.field_146337_w)
{
this.btnAllowCommands.displayString = this.btnAllowCommands.displayString + I18n.format("options.on", new Object[0]);
}
else
{
this.btnAllowCommands.displayString = this.btnAllowCommands.displayString + I18n.format("options.off", new Object[0]);
}
}
GuiCreateWorld.java 文件源码
项目:BaseClient
阅读 22
收藏 0
点赞 0
评论 0
/**
* Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks
*/
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
this.drawCenteredString(this.fontRendererObj, I18n.format("selectWorld.create", new Object[0]), this.width / 2, 20, -1);
if (this.field_146344_y)
{
this.drawString(this.fontRendererObj, I18n.format("selectWorld.enterSeed", new Object[0]), this.width / 2 - 100, 47, -6250336);
this.drawString(this.fontRendererObj, I18n.format("selectWorld.seedInfo", new Object[0]), this.width / 2 - 100, 85, -6250336);
if (this.btnMapFeatures.visible)
{
this.drawString(this.fontRendererObj, I18n.format("selectWorld.mapFeatures.info", new Object[0]), this.width / 2 - 150, 122, -6250336);
}
if (this.btnAllowCommands.visible)
{
this.drawString(this.fontRendererObj, I18n.format("selectWorld.allowCommands.info", new Object[0]), this.width / 2 - 150, 172, -6250336);
}
this.field_146335_h.drawTextBox();
if (WorldType.worldTypes[this.selectedIndex].showWorldInfoNotice())
{
this.fontRendererObj.drawSplitString(I18n.format(WorldType.worldTypes[this.selectedIndex].func_151359_c(), new Object[0]), this.btnMapType.xPosition + 2, this.btnMapType.yPosition + 22, this.btnMapType.getButtonWidth(), 10526880);
}
}
else
{
this.drawString(this.fontRendererObj, I18n.format("selectWorld.enterName", new Object[0]), this.width / 2 - 100, 47, -6250336);
this.drawString(this.fontRendererObj, I18n.format("selectWorld.resultFolder", new Object[0]) + " " + this.field_146336_i, this.width / 2 - 100, 85, -6250336);
this.field_146333_g.drawTextBox();
this.drawString(this.fontRendererObj, this.field_146323_G, this.width / 2 - 100, 137, -6250336);
this.drawString(this.fontRendererObj, this.field_146328_H, this.width / 2 - 100, 149, -6250336);
}
super.drawScreen(mouseX, mouseY, partialTicks);
}
WorldChunkManager.java 文件源码
项目:BaseClient
阅读 25
收藏 0
点赞 0
评论 0
public WorldChunkManager(long seed, WorldType p_i45744_3_, String p_i45744_4_)
{
this();
this.field_180301_f = p_i45744_4_;
GenLayer[] agenlayer = GenLayer.initializeAllBiomeGenerators(seed, p_i45744_3_, p_i45744_4_);
this.genBiomes = agenlayer[0];
this.biomeIndexLayer = agenlayer[1];
}