Update mcp mappings to 20170611

This commit is contained in:
mezz 2017-06-10 17:59:01 -07:00
parent 864b05074e
commit 3d322ef925
48 changed files with 213 additions and 211 deletions

View File

@ -29,7 +29,7 @@ apply plugin: "net.minecraftforge.gradle.launch4j"
minecraft.version = "1.12"
minecraft {
mappings = 'snapshot_nodoc_20161220'
mappings = 'snapshot_nodoc_20170611'
workspaceDir = "projects"
versionJson = "jsons/${minecraft.version}-dev.json"
buildUserdev = true

View File

@ -116,7 +116,7 @@ public class GuiIngameForge extends GuiIngame
if (pre(ALL)) return;
fontrenderer = mc.fontRendererObj;
fontrenderer = mc.fontRenderer;
mc.entityRenderer.setupOverlayRendering();
GlStateManager.enableBlend();
@ -181,7 +181,7 @@ public class GuiIngameForge extends GuiIngame
ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(mc.player.getName());
if (scoreplayerteam != null)
{
int slot = scoreplayerteam.getChatFormat().getColorIndex();
int slot = scoreplayerteam.getColor().getColorIndex();
if (slot >= 0) objective = scoreboard.getObjectiveInDisplaySlot(3 + slot);
}
ScoreObjective scoreobjective1 = objective != null ? objective : scoreboard.getObjectiveInDisplaySlot(1);

View File

@ -82,7 +82,7 @@ public class GuiScreenEvent extends Event
}
/**
* This event fires just after initializing {@link GuiScreen#mc}, {@link GuiScreen#fontRendererObj},
* This event fires just after initializing {@link GuiScreen#mc}, {@link GuiScreen#fontRenderer},
* {@link GuiScreen#width}, and {@link GuiScreen#height}.<br/><br/>
*
* If canceled the following lines are skipped in {@link GuiScreen#setWorldAndResolution(Minecraft, int, int)}:<br/>

View File

@ -82,8 +82,8 @@ public class NotificationModUpdateScreen extends GuiScreen
GlStateManager.color(1, 1, 1, 1);
GlStateManager.pushMatrix();
int x = modButton.xPosition;
int y = modButton.yPosition;
int x = modButton.x;
int y = modButton.y;
int w = modButton.width;
int h = modButton.height;

View File

@ -63,9 +63,9 @@ public class BlockInfo
public void updateShift()
{
Vec3d offset = state.getOffset(world, blockPos);
shx = (float) offset.xCoord;
shy = (float) offset.yCoord;
shz = (float) offset.zCoord;
shx = (float) offset.x;
shy = (float) offset.y;
shz = (float) offset.z;
}
@Deprecated

View File

@ -249,7 +249,7 @@ public class BiomeDictionary
*/
public static void makeBestGuess(Biome biome)
{
if (biome.theBiomeDecorator.treesPerChunk >= 3)
if (biome.decorator.treesPerChunk >= 3)
{
if (biome.isHighHumidity() && biome.getTemperature() >= 0.9F)
{
@ -293,11 +293,11 @@ public class BiomeDictionary
BiomeDictionary.addTypes(biome, COLD);
}
if (biome.theBiomeDecorator.treesPerChunk > 0 && biome.theBiomeDecorator.treesPerChunk < 3)
if (biome.decorator.treesPerChunk > 0 && biome.decorator.treesPerChunk < 3)
{
BiomeDictionary.addTypes(biome, SPARSE);
}
else if (biome.theBiomeDecorator.treesPerChunk >= 10)
else if (biome.decorator.treesPerChunk >= 10)
{
BiomeDictionary.addTypes(biome, DENSE);
}

View File

@ -241,7 +241,7 @@ public class DimensionManager
ISaveHandler savehandler = overworld.getSaveHandler();
//WorldSettings worldSettings = new WorldSettings(overworld.getWorldInfo());
WorldServer world = (dim == 0 ? overworld : (WorldServer)(new WorldServerMulti(mcServer, savehandler, dim, overworld, mcServer.theProfiler).init()));
WorldServer world = (dim == 0 ? overworld : (WorldServer)(new WorldServerMulti(mcServer, savehandler, dim, overworld, mcServer.profiler).init()));
world.addEventListener(new ServerWorldEventHandler(mcServer, world));
MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
if (!mcServer.isSinglePlayer())

View File

@ -133,18 +133,18 @@ public class ForgeChunkManager
{
final ImmutableSetMultimap<ChunkPos, Ticket> persistentChunksFor = getPersistentChunksFor(world);
final ImmutableSet.Builder<Chunk> builder = ImmutableSet.builder();
world.theProfiler.startSection("forcedChunkLoading");
world.profiler.startSection("forcedChunkLoading");
builder.addAll(Iterators.transform(persistentChunksFor.keys().iterator(), new Function<ChunkPos, Chunk>() {
@Nullable
@Override
public Chunk apply(@Nullable ChunkPos input)
{
return input == null ? null : world.getChunkFromChunkCoords(input.chunkXPos, input.chunkZPos);
return input == null ? null : world.getChunkFromChunkCoords(input.x, input.z);
}
}));
world.theProfiler.endStartSection("regularChunkLoading");
world.profiler.endStartSection("regularChunkLoading");
builder.addAll(chunkIterator);
world.theProfiler.endSection();
world.profiler.endSection();
return builder.build().iterator();
}

View File

@ -660,7 +660,7 @@ public class ForgeHooks
@Nullable
public static ITextComponent onServerChatEvent(NetHandlerPlayServer net, String raw, ITextComponent comp)
{
ServerChatEvent event = new ServerChatEvent(net.playerEntity, raw, comp);
ServerChatEvent event = new ServerChatEvent(net.player, raw, comp);
if (MinecraftForge.EVENT_BUS.post(event))
{
return null;
@ -1023,7 +1023,7 @@ public class ForgeHooks
public static RayTraceResult rayTraceEyes(EntityLivingBase entity, double length)
{
Vec3d startPos = new Vec3d(entity.posX, entity.posY + entity.getEyeHeight(), entity.posZ);
Vec3d endPos = startPos.add(new Vec3d(entity.getLookVec().xCoord * length, entity.getLookVec().yCoord * length, entity.getLookVec().zCoord * length));
Vec3d endPos = startPos.add(new Vec3d(entity.getLookVec().x * length, entity.getLookVec().y * length, entity.getLookVec().z * length));
return entity.world.rayTraceBlocks(startPos, endPos);
}
@ -1055,7 +1055,7 @@ public class ForgeHooks
public static EnumActionResult onInteractEntityAtAction(EntityPlayer player, Entity entity, RayTraceResult ray, EnumHand hand)
{
Vec3d vec3d = new Vec3d(ray.hitVec.xCoord - entity.posX, ray.hitVec.yCoord - entity.posY, ray.hitVec.zCoord - entity.posZ);
Vec3d vec3d = new Vec3d(ray.hitVec.x - entity.posX, ray.hitVec.y - entity.posY, ray.hitVec.z - entity.posZ);
return onInteractEntityAtAction(player, entity, vec3d, hand);
}

View File

@ -44,7 +44,7 @@ public class ForgeInternalHandler
Entity entity = event.getEntity();
if (entity.getClass().equals(EntityItem.class))
{
ItemStack stack = ((EntityItem)entity).getEntityItem();
ItemStack stack = ((EntityItem)entity).getItem();
Item item = stack.getItem();
if (item.hasCustomEntity(stack))
{

View File

@ -477,9 +477,9 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC
{
for (Biome biome : ForgeRegistries.BIOMES.getValues())
{
if (biome.theBiomeDecorator instanceof DeferredBiomeDecorator)
if (biome.decorator instanceof DeferredBiomeDecorator)
{
DeferredBiomeDecorator decorator = (DeferredBiomeDecorator)biome.theBiomeDecorator;
DeferredBiomeDecorator decorator = (DeferredBiomeDecorator)biome.decorator;
decorator.fireCreateEventAndReplace(biome);
}

View File

@ -101,8 +101,8 @@ class ChunkIOProvider implements Runnable
this.provider.chunkGenerator.recreateStructures(this.chunk, this.chunkInfo.x, this.chunkInfo.z);
provider.id2ChunkMap.put(ChunkPos.asLong(this.chunkInfo.x, this.chunkInfo.z), this.chunk);
this.chunk.onChunkLoad();
this.chunk.populateChunk(provider, provider.chunkGenerator);
this.chunk.onLoad();
this.chunk.populate(provider, provider.chunkGenerator);
this.runCallbacks();
}

View File

@ -42,10 +42,10 @@ public class ChunkCoordComparator implements java.util.Comparator<ChunkPos>
}
// Subtract current position to set center point
int ax = a.chunkXPos - this.x;
int az = a.chunkZPos - this.z;
int bx = b.chunkXPos - this.x;
int bz = b.chunkZPos - this.z;
int ax = a.x - this.x;
int az = a.z - this.z;
int bx = b.x - this.x;
int bz = b.z - this.z;
int result = ((ax - bx) * (ax + bx)) + ((az - bz) * (az + bz));
if (result != 0)

View File

@ -48,7 +48,7 @@ public class PlayerDropsEvent extends LivingDropsEvent
*/
public PlayerDropsEvent(EntityPlayer entity, DamageSource source, List<EntityItem> drops, boolean recentlyHit)
{
super(entity, source, drops, ForgeHooks.getLootingLevel(entity, source.getEntity(), source), recentlyHit);
super(entity, source, drops, ForgeHooks.getLootingLevel(entity, source.getTrueSource(), source), recentlyHit);
this.entityPlayer = entity;
}

View File

@ -39,7 +39,7 @@ public class DeferredBiomeDecorator extends BiomeDecorator {
{
fireCreateEventAndReplace(biome);
// On first call to decorate, we fire and substitute ourselves, if we haven't already done so
biome.theBiomeDecorator.decorate(par1World, par2Random, biome, pos);
biome.decorator.decorate(par1World, par2Random, biome, pos);
}
public void fireCreateEventAndReplace(Biome biome)
{
@ -49,17 +49,17 @@ public class DeferredBiomeDecorator extends BiomeDecorator {
wrapped.clayPerChunk = clayPerChunk;
wrapped.deadBushPerChunk = deadBushPerChunk;
wrapped.flowersPerChunk = flowersPerChunk;
wrapped.generateLakes = generateLakes;
wrapped.generateFalls = generateFalls;
wrapped.grassPerChunk = grassPerChunk;
wrapped.mushroomsPerChunk = mushroomsPerChunk;
wrapped.reedsPerChunk = reedsPerChunk;
wrapped.sandPerChunk = sandPerChunk;
wrapped.sandPerChunk2 = sandPerChunk2;
wrapped.gravelPatchesPerChunk = gravelPatchesPerChunk;
wrapped.sandPatchesPerChunk = sandPatchesPerChunk;
wrapped.treesPerChunk = treesPerChunk;
wrapped.waterlilyPerChunk = waterlilyPerChunk;
BiomeEvent.CreateDecorator event = new BiomeEvent.CreateDecorator(biome, wrapped);
MinecraftForge.TERRAIN_GEN_BUS.post(event);
biome.theBiomeDecorator = event.getNewBiomeDecorator();
biome.decorator = event.getNewBiomeDecorator();
}
}

View File

@ -345,7 +345,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
}
@Override
public boolean isPassable(@Nonnull IBlockAccess world, @Nonnull BlockPos pos)
public boolean blocksMovement(@Nonnull IBlockAccess world, @Nonnull BlockPos pos)
{
return true;
}
@ -376,9 +376,9 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
if (densityDir > 0) return vec;
Vec3d vec_flow = this.getFlowVector(world, pos);
return vec.addVector(
vec_flow.xCoord * (quantaPerBlock * 4),
vec_flow.yCoord * (quantaPerBlock * 4),
vec_flow.zCoord * (quantaPerBlock * 4));
vec_flow.x * (quantaPerBlock * 4),
vec_flow.y * (quantaPerBlock * 4),
vec_flow.z * (quantaPerBlock * 4));
}
@Override
@ -563,7 +563,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
return -1000.0;
}
Vec3d vec = ((BlockFluidBase)state.getBlock()).getFlowVector(world, pos);
return vec.xCoord == 0.0D && vec.zCoord == 0.0D ? -1000.0D : Math.atan2(vec.zCoord, vec.xCoord) - Math.PI / 2D;
return vec.x == 0.0D && vec.z == 0.0D ? -1000.0D : Math.atan2(vec.z, vec.x) - Math.PI / 2D;
}
public final int getQuantaValueBelow(IBlockAccess world, BlockPos pos, int belowThis)

View File

@ -53,9 +53,9 @@ public class GuiAccessDenied extends GuiScreen
{
this.drawDefaultBackground();
int offset = Math.max(85 - 2 * 10, 10);
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader could not connect to this server", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "Forge Mod Loader could not connect to this server", this.width / 2, offset, 0xFFFFFF);
offset += 10;
this.drawCenteredString(this.fontRendererObj, String.format("The server %s has forbidden modded access", data.serverName), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, String.format("The server %s has forbidden modded access", data.serverName), this.width / 2, offset, 0xFFFFFF);
super.drawScreen(mouseX, mouseY, partialTicks);
}
}

View File

@ -53,9 +53,9 @@ public class GuiBackupFailed extends GuiScreen
{
this.drawDefaultBackground();
int offset = Math.max(85 - 2 * 10, 10);
this.drawCenteredString(this.fontRendererObj, String.format("There was an error saving the archive %s", zipName.getName()), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, String.format("There was an error saving the archive %s", zipName.getName()), this.width / 2, offset, 0xFFFFFF);
offset += 10;
this.drawCenteredString(this.fontRendererObj, String.format("Please fix the problem and try again"), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, String.format("Please fix the problem and try again"), this.width / 2, offset, 0xFFFFFF);
super.drawScreen(mouseX, mouseY, partialTicks);
}
}

View File

@ -34,12 +34,12 @@ public class GuiCustomModLoadingErrorScreen extends GuiErrorScreen
{
super.initGui();
this.buttonList.clear();
this.customException.initGui(this, fontRendererObj);
this.customException.initGui(this, fontRenderer);
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
this.customException.drawScreen(this, fontRendererObj, mouseX, mouseY, partialTicks);
this.customException.drawScreen(this, fontRenderer, mouseX, mouseY, partialTicks);
}
}

View File

@ -40,16 +40,16 @@ public class GuiDupesFound extends GuiErrorBase
{
this.drawDefaultBackground();
int offset = Math.max(85 - dupes.dupes.size() * 10, 10);
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
offset+=10;
this.drawCenteredString(this.fontRendererObj, "You have mod sources that are duplicate within your system", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "You have mod sources that are duplicate within your system", this.width / 2, offset, 0xFFFFFF);
offset+=10;
this.drawCenteredString(this.fontRendererObj, "Mod Id : File name", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "Mod Id : File name", this.width / 2, offset, 0xFFFFFF);
offset+=5;
for (Entry<ModContainer, File> mc : dupes.dupes.entries())
{
offset+=10;
this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", mc.getKey().getModId(), mc.getValue().getName()), this.width / 2, offset, 0xEEEEEE);
this.drawCenteredString(this.fontRenderer, String.format("%s : %s", mc.getKey().getModId(), mc.getValue().getName()), this.width / 2, offset, 0xEEEEEE);
}
super.drawScreen(mouseX, mouseY, partialTicks);
}

View File

@ -87,27 +87,27 @@ public class GuiJava8Error extends GuiErrorBase
int offset = 25;
if (!java8VersionException.getMods().isEmpty())
{
this.drawCenteredString(this.fontRendererObj, I18n.format("fml.messages.java8problem", TextFormatting.RED, TextFormatting.BOLD, TextFormatting.RESET), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.java8problem", TextFormatting.RED, TextFormatting.BOLD, TextFormatting.RESET), this.width / 2, offset, 0xFFFFFF);
}
else
{
this.drawCenteredString(this.fontRendererObj, I18n.format("fml.messages.java8recommended", TextFormatting.RED, TextFormatting.BOLD, TextFormatting.RESET), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.java8recommended", TextFormatting.RED, TextFormatting.BOLD, TextFormatting.RESET), this.width / 2, offset, 0xFFFFFF);
}
offset+=15;
this.drawCenteredString(this.fontRendererObj, I18n.format("fml.messages.javaversion", System.getProperty("java.version").split("\\.")[1], System.getProperty("java.version")), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.javaversion", System.getProperty("java.version").split("\\.")[1], System.getProperty("java.version")), this.width / 2, offset, 0xFFFFFF);
offset += 10;
if (!java8VersionException.getMods().isEmpty())
{
this.drawCenteredString(this.fontRendererObj, I18n.format("fml.messages.upgradejavaorremove", TextFormatting.RED,TextFormatting.BOLD, TextFormatting.RESET), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.upgradejavaorremove", TextFormatting.RED,TextFormatting.BOLD, TextFormatting.RESET), this.width / 2, offset, 0xFFFFFF);
offset += 15;
this.drawCenteredString(this.fontRendererObj, I18n.format("fml.messages.modslistedbelow", I18n.format("fml.messages.requirejava8")), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.modslistedbelow", I18n.format("fml.messages.requirejava8")), this.width / 2, offset, 0xFFFFFF);
offset += 10;
this.drawCenteredString(this.fontRendererObj, I18n.format("fml.messages.countbadandgood", java8VersionException.getMods().size(), Loader.instance().getActiveModList().size()), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.countbadandgood", java8VersionException.getMods().size(), Loader.instance().getActiveModList().size()), this.width / 2, offset, 0xFFFFFF);
offset += 5;
for (ModContainer mc : java8VersionException.getMods())
{
offset += 10;
this.drawCenteredString(this.fontRendererObj, String.format("%s (%s)", mc.getName(), mc.getModId()), this.width / 2, offset, 0xEEEEEE);
this.drawCenteredString(this.fontRenderer, String.format("%s (%s)", mc.getName(), mc.getModId()), this.width / 2, offset, 0xEEEEEE);
}
}
else
@ -116,19 +116,19 @@ public class GuiJava8Error extends GuiErrorBase
List<String> lines = Lists.newArrayList();
for (String line : text.split("\n"))
{
lines.addAll(this.fontRendererObj.listFormattedStringToWidth(line, this.width - this.fontRendererObj.FONT_HEIGHT * 4));
lines.addAll(this.fontRenderer.listFormattedStringToWidth(line, this.width - this.fontRenderer.FONT_HEIGHT * 4));
}
int maxWidth = 0;
for (String line : lines)
{
maxWidth = Math.max(maxWidth, this.fontRendererObj.getStringWidth(line));
maxWidth = Math.max(maxWidth, this.fontRenderer.getStringWidth(line));
}
for (String line : lines)
{
this.drawString(this.fontRendererObj, line, (this.width - maxWidth) / 2, offset, 0xFFFFFF);
offset += this.fontRendererObj.FONT_HEIGHT + 2;
this.drawString(this.fontRenderer, line, (this.width - maxWidth) / 2, offset, 0xFFFFFF);
offset += this.fontRenderer.FONT_HEIGHT + 2;
}
}
super.drawScreen(mouseX, mouseY, partialTicks);

View File

@ -198,7 +198,7 @@ public class GuiModList extends GuiScreen
{
super.mouseClicked(x, y, button);
search.mouseClicked(x, y, button);
if (button == 1 && x >= search.xPosition && x < search.xPosition + search.width && y >= search.yPosition && y < search.yPosition + search.height) {
if (button == 1 && x >= search.x && x < search.x + search.width && y >= search.y && y < search.y + search.height) {
search.setText("");
}
}
@ -307,7 +307,7 @@ public class GuiModList extends GuiScreen
public int drawLine(String line, int offset, int shifty)
{
this.fontRendererObj.drawString(line, offset, shifty, 0xd7edea);
this.fontRenderer.drawString(line, offset, shifty, 0xd7edea);
return shifty + 10;
}
@ -319,7 +319,7 @@ public class GuiModList extends GuiScreen
this.modInfo.drawScreen(mouseX, mouseY, partialTicks);
int left = ((this.width - this.listWidth - 38) / 2) + this.listWidth + 30;
this.drawCenteredString(this.fontRendererObj, "Mod List", left, 16, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "Mod List", left, 16, 0xFFFFFF);
super.drawScreen(mouseX, mouseY, partialTicks);
String text = I18n.format("fml.menu.mods.search");
@ -347,7 +347,7 @@ public class GuiModList extends GuiScreen
FontRenderer getFontRenderer()
{
return fontRendererObj;
return fontRenderer;
}
public void selectModIndex(int index)
@ -527,7 +527,7 @@ public class GuiModList extends GuiScreen
}
ITextComponent chat = ForgeHooks.newChatWithLinks(line, false);
ret.addAll(GuiUtilRenderComponents.splitText(chat, this.listWidth-8, GuiModList.this.fontRendererObj, false, true));
ret.addAll(GuiUtilRenderComponents.splitText(chat, this.listWidth-8, GuiModList.this.fontRenderer, false, true));
}
return ret;
}
@ -581,7 +581,7 @@ public class GuiModList extends GuiScreen
if (line != null)
{
GlStateManager.enableBlend();
GuiModList.this.fontRendererObj.drawStringWithShadow(line.getFormattedText(), this.left + 4, top, 0xFFFFFF);
GuiModList.this.fontRenderer.drawStringWithShadow(line.getFormattedText(), this.left + 4, top, 0xFFFFFF);
GlStateManager.disableAlpha();
GlStateManager.disableBlend();
}
@ -610,7 +610,7 @@ public class GuiModList extends GuiScreen
for (ITextComponent part : line) {
if (!(part instanceof TextComponentString))
continue;
k += GuiModList.this.fontRendererObj.getStringWidth(((TextComponentString)part).getText());
k += GuiModList.this.fontRenderer.getStringWidth(((TextComponentString)part).getText());
if (k >= x)
{
GuiModList.this.handleComponentClick(part);

View File

@ -40,10 +40,10 @@ public class GuiModsMissing extends GuiErrorBase
this.drawDefaultBackground();
int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
String modMissingDependenciesText = I18n.format("fml.messages.mod.missing.dependencies", TextFormatting.BOLD + modsMissing.getModName() + TextFormatting.RESET);
this.drawCenteredString(this.fontRendererObj, modMissingDependenciesText, this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, modMissingDependenciesText, this.width / 2, offset, 0xFFFFFF);
offset+=10;
String fixMissingDependenciesText = I18n.format("fml.messages.mod.missing.dependencies.fix", modsMissing.getModName());
this.drawCenteredString(this.fontRendererObj, fixMissingDependenciesText, this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, fixMissingDependenciesText, this.width / 2, offset, 0xFFFFFF);
offset+=5;
for (ArtifactVersion v : modsMissing.missingMods)
{
@ -54,15 +54,15 @@ public class GuiModsMissing extends GuiErrorBase
if (dav.getRange() != null)
{
String message = String.format(TextFormatting.BOLD + "%s " + TextFormatting.RESET + "%s", v.getLabel(), dav.getRange().toStringFriendly());
this.drawCenteredString(this.fontRendererObj, message, this.width / 2, offset, 0xEEEEEE);
this.drawCenteredString(this.fontRenderer, message, this.width / 2, offset, 0xEEEEEE);
continue;
}
}
this.drawCenteredString(this.fontRendererObj, String.format(TextFormatting.BOLD + "%s" + TextFormatting.RESET + " : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
this.drawCenteredString(this.fontRenderer, String.format(TextFormatting.BOLD + "%s" + TextFormatting.RESET + " : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
}
offset+=20;
String seeLogText = I18n.format("fml.messages.mod.missing.dependencies.see.log", GuiErrorBase.clientLog.getName());
this.drawCenteredString(this.fontRendererObj, seeLogText, this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, seeLogText, this.width / 2, offset, 0xFFFFFF);
super.drawScreen(mouseX, mouseY, partialTicks);
}
}

View File

@ -53,16 +53,16 @@ public class GuiModsMissingForServer extends GuiScreen
{
this.drawDefaultBackground();
int offset = Math.max(85 - modsMissing.missingMods.size() * 10, 10);
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader could not connect to this server", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "Forge Mod Loader could not connect to this server", this.width / 2, offset, 0xFFFFFF);
offset += 10;
this.drawCenteredString(this.fontRendererObj, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "The mods and versions listed below could not be found", this.width / 2, offset, 0xFFFFFF);
offset += 10;
this.drawCenteredString(this.fontRendererObj, "They are required to play on this server", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "They are required to play on this server", this.width / 2, offset, 0xFFFFFF);
offset += 5;
for (ArtifactVersion v : modsMissing.missingMods)
{
offset += 10;
this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
this.drawCenteredString(this.fontRenderer, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE);
}
super.drawScreen(mouseX, mouseY, partialTicks);
}

View File

@ -64,7 +64,7 @@ public class GuiMultipleModsErrored extends GuiErrorBase
{
this.drawDefaultBackground();
this.list.drawScreen(mouseX, mouseY, partialTicks);
this.drawCenteredString(this.fontRendererObj, I18n.format("fml.messages.mod.missing.multiple", missingModsExceptions.size() + wrongMinecraftExceptions.size()), this.width/2, 10, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.mod.missing.multiple", missingModsExceptions.size() + wrongMinecraftExceptions.size()), this.width/2, 10, 0xFFFFFF);
super.drawScreen(mouseX, mouseY, partialTicks);
}
@ -123,7 +123,7 @@ public class GuiMultipleModsErrored extends GuiErrorBase
protected void drawSlot(int slotIdx, int entryRight, int slotTop, int slotBuffer, Tessellator tess)
{
int offset = slotTop;
FontRenderer renderer = GuiMultipleModsErrored.this.fontRendererObj;
FontRenderer renderer = GuiMultipleModsErrored.this.fontRenderer;
if (!wrongMinecraftExceptions.isEmpty())
{
renderer.drawString(TextFormatting.UNDERLINE + I18n.format("fml.messages.mod.wrongminecraft", Loader.instance().getMinecraftModContainer().getVersion()), this.left, offset, 0xFFFFFF);

View File

@ -63,12 +63,12 @@ public class GuiNotification extends GuiScreen
{
if (offset >= spaceAvailable)
{
this.drawCenteredString(this.fontRendererObj, "...", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "...", this.width / 2, offset, 0xFFFFFF);
break;
}
else
{
if (!line.isEmpty()) this.drawCenteredString(this.fontRendererObj, line, this.width / 2, offset, 0xFFFFFF);
if (!line.isEmpty()) this.drawCenteredString(this.fontRenderer, line, this.width / 2, offset, 0xFFFFFF);
offset += 10;
}
}

View File

@ -53,10 +53,10 @@ public class GuiOldSaveLoadConfirm extends GuiYesNo implements GuiYesNoCallback
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
this.drawCenteredString(this.fontRendererObj, String.format("The world %s contains pre-update modding data", saveName), this.width / 2, 50, 16777215);
this.drawCenteredString(this.fontRendererObj, String.format("There may be problems updating it to this version"), this.width / 2, 70, 16777215);
this.drawCenteredString(this.fontRendererObj, String.format("FML will save a zip to %s", zip.getName()), this.width / 2, 90, 16777215);
this.drawCenteredString(this.fontRendererObj, String.format("Do you wish to continue loading?"), this.width / 2, 110, 16777215);
this.drawCenteredString(this.fontRenderer, String.format("The world %s contains pre-update modding data", saveName), this.width / 2, 50, 16777215);
this.drawCenteredString(this.fontRenderer, String.format("There may be problems updating it to this version"), this.width / 2, 70, 16777215);
this.drawCenteredString(this.fontRenderer, String.format("FML will save a zip to %s", zip.getName()), this.width / 2, 90, 16777215);
this.drawCenteredString(this.fontRenderer, String.format("Do you wish to continue loading?"), this.width / 2, 110, 16777215);
int k;
for (k = 0; k < this.buttonList.size(); ++k)

View File

@ -43,21 +43,21 @@ public class GuiSortingProblem extends GuiScreen {
{
this.drawDefaultBackground();
int offset = Math.max(85 - (failedList.getVisitedNodes().size() + 3) * 10, 10);
this.drawCenteredString(this.fontRendererObj, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "Forge Mod Loader has found a problem with your minecraft installation", this.width / 2, offset, 0xFFFFFF);
offset+=10;
this.drawCenteredString(this.fontRendererObj, "A mod sorting cycle was detected and loading cannot continue", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "A mod sorting cycle was detected and loading cannot continue", this.width / 2, offset, 0xFFFFFF);
offset+=10;
this.drawCenteredString(this.fontRendererObj, String.format("The first mod in the cycle is %s", failedList.getFirstBadNode()), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, String.format("The first mod in the cycle is %s", failedList.getFirstBadNode()), this.width / 2, offset, 0xFFFFFF);
offset+=10;
this.drawCenteredString(this.fontRendererObj, "The remainder of the cycle involves these mods", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "The remainder of the cycle involves these mods", this.width / 2, offset, 0xFFFFFF);
offset+=5;
for (ModContainer mc : failedList.getVisitedNodes())
{
offset+=10;
this.drawCenteredString(this.fontRendererObj, String.format("%s : before: %s, after: %s", mc.toString(), mc.getDependants(), mc.getDependencies()), this.width / 2, offset, 0xEEEEEE);
this.drawCenteredString(this.fontRenderer, String.format("%s : before: %s, after: %s", mc.toString(), mc.getDependants(), mc.getDependencies()), this.width / 2, offset, 0xEEEEEE);
}
offset+=20;
this.drawCenteredString(this.fontRendererObj, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF);
}
}

View File

@ -39,13 +39,13 @@ public class GuiWrongMinecraft extends GuiErrorBase
{
this.drawDefaultBackground();
int offset = 75;
this.drawCenteredString(this.fontRendererObj, I18n.format("fml.messages.mod.wrongminecraft", Loader.instance().getMinecraftModContainer().getVersion()), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.mod.wrongminecraft", Loader.instance().getMinecraftModContainer().getVersion()), this.width / 2, offset, 0xFFFFFF);
offset+=15;
this.drawCenteredString(this.fontRendererObj, I18n.format("fml.messages.mod.wrongminecraft.requirement", TextFormatting.BOLD + wrongMC.mod.getName() + TextFormatting.RESET, wrongMC.mod.getModId(), wrongMC.mod.acceptableMinecraftVersionRange().toStringFriendly()), this.width / 2, offset, 0xEEEEEE);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.mod.wrongminecraft.requirement", TextFormatting.BOLD + wrongMC.mod.getName() + TextFormatting.RESET, wrongMC.mod.getModId(), wrongMC.mod.acceptableMinecraftVersionRange().toStringFriendly()), this.width / 2, offset, 0xEEEEEE);
offset+=15;
this.drawCenteredString(this.fontRendererObj, I18n.format("fml.messages.mod.wrongminecraft.fix", wrongMC.mod.getName()),this.width/2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.mod.wrongminecraft.fix", wrongMC.mod.getName()),this.width/2, offset, 0xFFFFFF);
offset+=20;
this.drawCenteredString(this.fontRendererObj, I18n.format("fml.messages.mod.missing.dependencies.see.log", GuiErrorBase.clientLog.getName()), this.width / 2, offset, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, I18n.format("fml.messages.mod.missing.dependencies.see.log", GuiErrorBase.clientLog.getName()), this.width / 2, offset, 0xFFFFFF);
super.drawScreen(mouseX, mouseY, partialTicks);
}
}

View File

@ -52,9 +52,9 @@ public class GuiButtonExt extends GuiButton
{
if (this.visible)
{
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height;
this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height;
int k = this.getHoverState(this.hovered);
GuiUtils.drawContinuousTexturedBox(BUTTON_TEXTURES, this.xPosition, this.yPosition, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
GuiUtils.drawContinuousTexturedBox(BUTTON_TEXTURES, this.x, this.y, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
this.mouseDragged(mc, mouseX, mouseY);
int color = 14737632;
@ -72,13 +72,13 @@ public class GuiButtonExt extends GuiButton
}
String buttonText = this.displayString;
int strWidth = mc.fontRendererObj.getStringWidth(buttonText);
int ellipsisWidth = mc.fontRendererObj.getStringWidth("...");
int strWidth = mc.fontRenderer.getStringWidth(buttonText);
int ellipsisWidth = mc.fontRenderer.getStringWidth("...");
if (strWidth > width - 6 && strWidth > ellipsisWidth)
buttonText = mc.fontRendererObj.trimStringToWidth(buttonText, width - 6 - ellipsisWidth).trim() + "...";
buttonText = mc.fontRenderer.trimStringToWidth(buttonText, width - 6 - ellipsisWidth).trim() + "...";
this.drawCenteredString(mc.fontRendererObj, buttonText, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, color);
this.drawCenteredString(mc.fontRenderer, buttonText, this.x + this.width / 2, this.y + (this.height - 8) / 2, color);
}
}
}

View File

@ -38,7 +38,7 @@ public class GuiCheckBox extends GuiButton
this.isChecked = isChecked;
this.boxWidth = 11;
this.height = 11;
this.width = this.boxWidth + 2 + Minecraft.getMinecraft().fontRendererObj.getStringWidth(displayString);
this.width = this.boxWidth + 2 + Minecraft.getMinecraft().fontRenderer.getStringWidth(displayString);
}
@Override
@ -46,8 +46,8 @@ public class GuiCheckBox extends GuiButton
{
if (this.visible)
{
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.boxWidth && mouseY < this.yPosition + this.height;
GuiUtils.drawContinuousTexturedBox(BUTTON_TEXTURES, this.xPosition, this.yPosition, 0, 46, this.boxWidth, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.boxWidth && mouseY < this.y + this.height;
GuiUtils.drawContinuousTexturedBox(BUTTON_TEXTURES, this.x, this.y, 0, 46, this.boxWidth, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
this.mouseDragged(mc, mouseX, mouseY);
int color = 14737632;
@ -61,16 +61,16 @@ public class GuiCheckBox extends GuiButton
}
if (this.isChecked)
this.drawCenteredString(mc.fontRendererObj, "x", this.xPosition + this.boxWidth / 2 + 1, this.yPosition + 1, 14737632);
this.drawCenteredString(mc.fontRenderer, "x", this.x + this.boxWidth / 2 + 1, this.y + 1, 14737632);
this.drawString(mc.fontRendererObj, displayString, xPosition + this.boxWidth + 2, yPosition + 2, color);
this.drawString(mc.fontRenderer, displayString, this.x + this.boxWidth + 2, this.y + 2, color);
}
}
@Override
public boolean mousePressed(Minecraft mc, int mouseX, int mouseY)
{
if (this.enabled && this.visible && mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height)
if (this.enabled && this.visible && mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height)
{
this.isChecked = !this.isChecked;
return true;

View File

@ -273,12 +273,12 @@ public class GuiConfig extends GuiScreen
this.needsRefresh = false;
}
int undoGlyphWidth = mc.fontRendererObj.getStringWidth(UNDO_CHAR) * 2;
int resetGlyphWidth = mc.fontRendererObj.getStringWidth(RESET_CHAR) * 2;
int doneWidth = Math.max(mc.fontRendererObj.getStringWidth(I18n.format("gui.done")) + 20, 100);
int undoWidth = mc.fontRendererObj.getStringWidth(" " + I18n.format("fml.configgui.tooltip.undoChanges")) + undoGlyphWidth + 20;
int resetWidth = mc.fontRendererObj.getStringWidth(" " + I18n.format("fml.configgui.tooltip.resetToDefault")) + resetGlyphWidth + 20;
int checkWidth = mc.fontRendererObj.getStringWidth(I18n.format("fml.configgui.applyGlobally")) + 13;
int undoGlyphWidth = mc.fontRenderer.getStringWidth(UNDO_CHAR) * 2;
int resetGlyphWidth = mc.fontRenderer.getStringWidth(RESET_CHAR) * 2;
int doneWidth = Math.max(mc.fontRenderer.getStringWidth(I18n.format("gui.done")) + 20, 100);
int undoWidth = mc.fontRenderer.getStringWidth(" " + I18n.format("fml.configgui.tooltip.undoChanges")) + undoGlyphWidth + 20;
int resetWidth = mc.fontRenderer.getStringWidth(" " + I18n.format("fml.configgui.tooltip.resetToDefault")) + resetGlyphWidth + 20;
int checkWidth = mc.fontRenderer.getStringWidth(I18n.format("fml.configgui.applyGlobally")) + 13;
int buttonWidthHalf = (doneWidth + 5 + undoWidth + 5 + resetWidth + 5 + checkWidth) / 2;
this.buttonList.add(new GuiButtonExt(2000, this.width / 2 - buttonWidthHalf, this.height - 29, doneWidth, 20, I18n.format("gui.done")));
this.buttonList.add(this.btnDefaultAll = new GuiUnicodeGlyphButton(2001, this.width / 2 - buttonWidthHalf + doneWidth + 5 + undoWidth + 5,
@ -406,16 +406,16 @@ public class GuiConfig extends GuiScreen
{
this.drawDefaultBackground();
this.entryList.drawScreen(mouseX, mouseY, partialTicks);
this.drawCenteredString(this.fontRendererObj, this.title, this.width / 2, 8, 16777215);
this.drawCenteredString(this.fontRenderer, this.title, this.width / 2, 8, 16777215);
String title2 = this.titleLine2;
if (title2 != null)
{
int strWidth = mc.fontRendererObj.getStringWidth(title2);
int ellipsisWidth = mc.fontRendererObj.getStringWidth("...");
int strWidth = mc.fontRenderer.getStringWidth(title2);
int ellipsisWidth = mc.fontRenderer.getStringWidth("...");
if (strWidth > width - 6 && strWidth > ellipsisWidth)
title2 = mc.fontRendererObj.trimStringToWidth(title2, width - 6 - ellipsisWidth).trim() + "...";
this.drawCenteredString(this.fontRendererObj, title2, this.width / 2, 18, 16777215);
title2 = mc.fontRenderer.trimStringToWidth(title2, width - 6 - ellipsisWidth).trim() + "...";
this.drawCenteredString(this.fontRenderer, title2, this.width / 2, 18, 16777215);
}
this.btnUndoAll.enabled = this.entryList.areAnyEntriesEnabled(this.chkApplyGlobally.isChecked()) && this.entryList.hasChangedEntry(this.chkApplyGlobally.isChecked());
@ -432,6 +432,6 @@ public class GuiConfig extends GuiScreen
public void drawToolTip(List<String> stringList, int x, int y)
{
GuiUtils.drawHoveringText(stringList, x, y, width, height, 300, fontRendererObj);
GuiUtils.drawHoveringText(stringList, x, y, width, height, 300, fontRenderer);
}
}

View File

@ -98,9 +98,9 @@ public class GuiConfigEntries extends GuiListExtended
// protects against language keys that are not defined in the .lang file
if (!I18n.format(configElement.getLanguageKey()).equals(configElement.getLanguageKey()))
length = mc.fontRendererObj.getStringWidth(I18n.format(configElement.getLanguageKey()));
length = mc.fontRenderer.getStringWidth(I18n.format(configElement.getLanguageKey()));
else
length = mc.fontRendererObj.getStringWidth(configElement.getName());
length = mc.fontRenderer.getStringWidth(configElement.getName());
if (length > this.maxLabelTextWidth)
this.maxLabelTextWidth = length;
@ -914,8 +914,8 @@ public class GuiConfigEntries extends GuiListExtended
{
super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
this.btnValue.width = this.owningEntryList.controlWidth;
this.btnValue.xPosition = this.owningScreen.entryList.controlX;
this.btnValue.yPosition = y;
this.btnValue.x = this.owningScreen.entryList.controlX;
this.btnValue.y = y;
this.btnValue.enabled = enabled();
this.btnValue.func_191745_a(this.mc, mouseX, mouseY, partial);
}
@ -1184,7 +1184,7 @@ public class GuiConfigEntries extends GuiListExtended
{
super(owningScreen, owningEntryList, configElement);
beforeValue = configElement.get().toString();
this.textFieldValue = new GuiTextField(10, this.mc.fontRendererObj, this.owningEntryList.controlX + 1, 0, this.owningEntryList.controlWidth - 3, 16);
this.textFieldValue = new GuiTextField(10, this.mc.fontRenderer, this.owningEntryList.controlX + 1, 0, this.owningEntryList.controlWidth - 3, 16);
this.textFieldValue.setMaxStringLength(10000);
this.textFieldValue.setText(configElement.get().toString());
}
@ -1193,8 +1193,8 @@ public class GuiConfigEntries extends GuiListExtended
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
this.textFieldValue.xPosition = this.owningEntryList.controlX + 2;
this.textFieldValue.yPosition = y + 1;
this.textFieldValue.x = this.owningEntryList.controlX + 2;
this.textFieldValue.y = y + 1;
this.textFieldValue.width = this.owningEntryList.controlWidth - 4;
this.textFieldValue.setEnabled(enabled());
this.textFieldValue.drawTextBox();
@ -1328,8 +1328,8 @@ public class GuiConfigEntries extends GuiListExtended
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
this.btnSelectCategory.xPosition = listWidth / 2 - 150;
this.btnSelectCategory.yPosition = y;
this.btnSelectCategory.x = listWidth / 2 - 150;
this.btnSelectCategory.y = y;
this.btnSelectCategory.enabled = enabled();
this.btnSelectCategory.func_191745_a(this.mc, mouseX, mouseY, partial);
@ -1535,20 +1535,20 @@ public class GuiConfigEntries extends GuiListExtended
String label = (!isValidValue ? TextFormatting.RED.toString() :
(isChanged ? TextFormatting.WHITE.toString() : TextFormatting.GRAY.toString()))
+ (isChanged ? TextFormatting.ITALIC.toString() : "") + this.name;
this.mc.fontRendererObj.drawString(
this.mc.fontRenderer.drawString(
label,
this.owningScreen.entryList.labelX,
y + slotHeight / 2 - this.mc.fontRendererObj.FONT_HEIGHT / 2,
y + slotHeight / 2 - this.mc.fontRenderer.FONT_HEIGHT / 2,
16777215);
}
this.btnUndoChanges.xPosition = this.owningEntryList.scrollBarX - 44;
this.btnUndoChanges.yPosition = y;
this.btnUndoChanges.x = this.owningEntryList.scrollBarX - 44;
this.btnUndoChanges.y = y;
this.btnUndoChanges.enabled = enabled() && isChanged;
this.btnUndoChanges.func_191745_a(this.mc, mouseX, mouseY, partial);
this.btnDefault.xPosition = this.owningEntryList.scrollBarX - 22;
this.btnDefault.yPosition = y;
this.btnDefault.x = this.owningEntryList.scrollBarX - 22;
this.btnDefault.y = y;
this.btnDefault.enabled = enabled() && !isDefault();
this.btnDefault.func_191745_a(this.mc, mouseX, mouseY, partial);
@ -1635,7 +1635,7 @@ public class GuiConfigEntries extends GuiListExtended
@Override
public int getLabelWidth()
{
return this.mc.fontRendererObj.getStringWidth(this.name);
return this.mc.fontRenderer.getStringWidth(this.name);
}
@Override

View File

@ -104,11 +104,11 @@ public class GuiEditArray extends GuiScreen
{
this.entryList = new GuiEditArrayEntries(this, this.mc, this.configElement, this.beforeValues, this.currentValues);
int undoGlyphWidth = mc.fontRendererObj.getStringWidth(UNDO_CHAR) * 2;
int resetGlyphWidth = mc.fontRendererObj.getStringWidth(RESET_CHAR) * 2;
int doneWidth = Math.max(mc.fontRendererObj.getStringWidth(I18n.format("gui.done")) + 20, 100);
int undoWidth = mc.fontRendererObj.getStringWidth(" " + I18n.format("fml.configgui.tooltip.undoChanges")) + undoGlyphWidth + 20;
int resetWidth = mc.fontRendererObj.getStringWidth(" " + I18n.format("fml.configgui.tooltip.resetToDefault")) + resetGlyphWidth + 20;
int undoGlyphWidth = mc.fontRenderer.getStringWidth(UNDO_CHAR) * 2;
int resetGlyphWidth = mc.fontRenderer.getStringWidth(RESET_CHAR) * 2;
int doneWidth = Math.max(mc.fontRenderer.getStringWidth(I18n.format("gui.done")) + 20, 100);
int undoWidth = mc.fontRenderer.getStringWidth(" " + I18n.format("fml.configgui.tooltip.undoChanges")) + undoGlyphWidth + 20;
int resetWidth = mc.fontRenderer.getStringWidth(" " + I18n.format("fml.configgui.tooltip.resetToDefault")) + resetGlyphWidth + 20;
int buttonWidthHalf = (doneWidth + 5 + undoWidth + 5 + resetWidth) / 2;
this.buttonList.add(btnDone = new GuiButtonExt(2000, this.width / 2 - buttonWidthHalf, this.height - 29, doneWidth, 20, I18n.format("gui.done")));
this.buttonList.add(btnDefault = new GuiUnicodeGlyphButton(2001, this.width / 2 - buttonWidthHalf + doneWidth + 5 + undoWidth + 5,
@ -190,13 +190,13 @@ public class GuiEditArray extends GuiScreen
{
this.drawDefaultBackground();
this.entryList.drawScreen(par1, par2, par3);
this.drawCenteredString(this.fontRendererObj, this.title, this.width / 2, 8, 16777215);
this.drawCenteredString(this.fontRenderer, this.title, this.width / 2, 8, 16777215);
if (this.titleLine2 != null)
this.drawCenteredString(this.fontRendererObj, this.titleLine2, this.width / 2, 18, 16777215);
this.drawCenteredString(this.fontRenderer, this.titleLine2, this.width / 2, 18, 16777215);
if (this.titleLine3 != null)
this.drawCenteredString(this.fontRendererObj, this.titleLine3, this.width / 2, 28, 16777215);
this.drawCenteredString(this.fontRenderer, this.titleLine3, this.width / 2, 28, 16777215);
this.btnDone.enabled = this.entryList.isListSavable();
this.btnDefault.enabled = enabled && !this.entryList.isDefault();
@ -210,6 +210,6 @@ public class GuiEditArray extends GuiScreen
public void drawToolTip(List<String> stringList, int x, int y)
{
GuiUtils.drawHoveringText(stringList, x, y, width, height, 300, fontRendererObj);
GuiUtils.drawHoveringText(stringList, x, y, width, height, 300, fontRenderer);
}
}

View File

@ -435,7 +435,7 @@ public class GuiEditArrayEntries extends GuiListExtended
public StringEntry(GuiEditArray owningScreen, GuiEditArrayEntries owningEntryList, IConfigElement configElement, Object value)
{
super(owningScreen, owningEntryList, configElement);
this.textFieldValue = new GuiTextField(0, owningEntryList.getMC().fontRendererObj, owningEntryList.width / 4 + 1, 0, owningEntryList.controlWidth - 3, 16);
this.textFieldValue = new GuiTextField(0, owningEntryList.getMC().fontRenderer, owningEntryList.width / 4 + 1, 0, owningEntryList.controlWidth - 3, 16);
this.textFieldValue.setMaxStringLength(10000);
this.textFieldValue.setText(value.toString());
this.isValidated = configElement.getValidationPattern() != null;
@ -456,7 +456,7 @@ public class GuiEditArrayEntries extends GuiListExtended
if (configElement.isListLengthFixed() || slotIndex != owningEntryList.listEntries.size() - 1)
{
this.textFieldValue.setVisible(true);
this.textFieldValue.yPosition = y + 1;
this.textFieldValue.y = y + 1;
this.textFieldValue.drawTextBox();
}
else
@ -519,8 +519,8 @@ public class GuiEditArrayEntries extends GuiListExtended
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
super.func_192634_a(slotIndex, x, y, listWidth, slotHeight, mouseX, mouseY, isSelected, partial);
this.btnValue.xPosition = listWidth / 4;
this.btnValue.yPosition = y;
this.btnValue.x = listWidth / 4;
this.btnValue.y = y;
String trans = I18n.format(String.valueOf(value));
if (!trans.equals(String.valueOf(value)))
@ -596,18 +596,18 @@ public class GuiEditArrayEntries extends GuiListExtended
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
if (this.getValue() != null && this.isValidated)
owningEntryList.getMC().fontRendererObj.drawString(
owningEntryList.getMC().fontRenderer.drawString(
isValidValue ? TextFormatting.GREEN + VALID : TextFormatting.RED + INVALID,
listWidth / 4 - owningEntryList.getMC().fontRendererObj.getStringWidth(VALID) - 2,
y + slotHeight / 2 - owningEntryList.getMC().fontRendererObj.FONT_HEIGHT / 2,
listWidth / 4 - owningEntryList.getMC().fontRenderer.getStringWidth(VALID) - 2,
y + slotHeight / 2 - owningEntryList.getMC().fontRenderer.FONT_HEIGHT / 2,
16777215);
int half = listWidth / 2;
if (owningEntryList.canAddMoreEntries)
{
this.btnAddNewEntryAbove.visible = true;
this.btnAddNewEntryAbove.xPosition = half + ((half / 2) - 44);
this.btnAddNewEntryAbove.yPosition = y;
this.btnAddNewEntryAbove.x = half + ((half / 2) - 44);
this.btnAddNewEntryAbove.y = y;
this.btnAddNewEntryAbove.func_191745_a(owningEntryList.getMC(), mouseX, mouseY, partial);
}
else
@ -616,8 +616,8 @@ public class GuiEditArrayEntries extends GuiListExtended
if (!configElement.isListLengthFixed() && slotIndex != owningEntryList.listEntries.size() - 1)
{
this.btnRemoveEntry.visible = true;
this.btnRemoveEntry.xPosition = half + ((half / 2) - 22);
this.btnRemoveEntry.yPosition = y;
this.btnRemoveEntry.x = half + ((half / 2) - 22);
this.btnRemoveEntry.y = y;
this.btnRemoveEntry.func_191745_a(owningEntryList.getMC(), mouseX, mouseY, partial);
}
else

View File

@ -104,11 +104,11 @@ public class GuiSelectString extends GuiScreen
{
this.entryList = new GuiSelectStringEntries(this, this.mc, this.configElement, this.selectableValues);
int undoGlyphWidth = mc.fontRendererObj.getStringWidth(UNDO_CHAR) * 2;
int resetGlyphWidth = mc.fontRendererObj.getStringWidth(RESET_CHAR) * 2;
int doneWidth = Math.max(mc.fontRendererObj.getStringWidth(I18n.format("gui.done")) + 20, 100);
int undoWidth = mc.fontRendererObj.getStringWidth(" " + I18n.format("fml.configgui.tooltip.undoChanges")) + undoGlyphWidth + 20;
int resetWidth = mc.fontRendererObj.getStringWidth(" " + I18n.format("fml.configgui.tooltip.resetToDefault")) + resetGlyphWidth + 20;
int undoGlyphWidth = mc.fontRenderer.getStringWidth(UNDO_CHAR) * 2;
int resetGlyphWidth = mc.fontRenderer.getStringWidth(RESET_CHAR) * 2;
int doneWidth = Math.max(mc.fontRenderer.getStringWidth(I18n.format("gui.done")) + 20, 100);
int undoWidth = mc.fontRenderer.getStringWidth(" " + I18n.format("fml.configgui.tooltip.undoChanges")) + undoGlyphWidth + 20;
int resetWidth = mc.fontRenderer.getStringWidth(" " + I18n.format("fml.configgui.tooltip.resetToDefault")) + resetGlyphWidth + 20;
int buttonWidthHalf = (doneWidth + 5 + undoWidth + 5 + resetWidth) / 2;
this.buttonList.add(btnDone = new GuiButtonExt(2000, this.width / 2 - buttonWidthHalf, this.height - 29, doneWidth, 20, I18n.format("gui.done")));
this.buttonList.add(btnDefault = new GuiUnicodeGlyphButton(2001, this.width / 2 - buttonWidthHalf + doneWidth + 5 + undoWidth + 5,
@ -164,13 +164,13 @@ public class GuiSelectString extends GuiScreen
{
this.drawDefaultBackground();
this.entryList.drawScreen(par1, par2, par3);
this.drawCenteredString(this.fontRendererObj, this.title, this.width / 2, 8, 16777215);
this.drawCenteredString(this.fontRenderer, this.title, this.width / 2, 8, 16777215);
if (this.titleLine2 != null)
this.drawCenteredString(this.fontRendererObj, this.titleLine2, this.width / 2, 18, 16777215);
this.drawCenteredString(this.fontRenderer, this.titleLine2, this.width / 2, 18, 16777215);
if (this.titleLine3 != null)
this.drawCenteredString(this.fontRendererObj, this.titleLine3, this.width / 2, 28, 16777215);
this.drawCenteredString(this.fontRenderer, this.titleLine3, this.width / 2, 28, 16777215);
this.btnDone.enabled = currentValue != null;
this.btnDefault.enabled = enabled && !this.entryList.isDefault();
@ -183,6 +183,6 @@ public class GuiSelectString extends GuiScreen
public void drawToolTip(List<String> stringList, int x, int y)
{
GuiUtils.drawHoveringText(stringList, x, y, width, height, 300, fontRendererObj);
GuiUtils.drawHoveringText(stringList, x, y, width, height, 300, fontRenderer);
}
}

View File

@ -65,8 +65,8 @@ public class GuiSelectStringEntries extends GuiListExtended
for (Entry<Object, String> entry : sortedList)
{
listEntries.add(new ListEntry(this, entry));
if (mc.fontRendererObj.getStringWidth(entry.getValue()) > maxEntryWidth)
maxEntryWidth = mc.fontRendererObj.getStringWidth(entry.getValue());
if (mc.fontRenderer.getStringWidth(entry.getValue()) > maxEntryWidth)
maxEntryWidth = mc.fontRenderer.getStringWidth(entry.getValue());
if (owningScreen.currentValue.equals(entry.getKey()))
{
@ -175,7 +175,7 @@ public class GuiSelectStringEntries extends GuiListExtended
@Override
public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float partial)
{
owningList.mc.fontRendererObj.drawString(value.getValue(), x + 1, y, slotIndex == owningList.selectedIndex ? 16777215 : 14737632);
owningList.mc.fontRenderer.drawString(value.getValue(), x + 1, y, slotIndex == owningList.selectedIndex ? 16777215 : 14737632);
}
@Override

View File

@ -113,13 +113,13 @@ public class GuiSlider extends GuiButtonExt
{
if (this.dragging)
{
this.sliderValue = (par2 - (this.xPosition + 4)) / (float)(this.width - 8);
this.sliderValue = (par2 - (this.x + 4)) / (float)(this.width - 8);
updateSlider();
}
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.drawTexturedModalRect(this.xPosition + (int)(this.sliderValue * (float)(this.width - 8)), this.yPosition, 0, 66, 4, 20);
this.drawTexturedModalRect(this.xPosition + (int)(this.sliderValue * (float)(this.width - 8)) + 4, this.yPosition, 196, 66, 4, 20);
this.drawTexturedModalRect(this.x + (int)(this.sliderValue * (float)(this.width - 8)), this.y, 0, 66, 4, 20);
this.drawTexturedModalRect(this.x + (int)(this.sliderValue * (float)(this.width - 8)) + 4, this.y, 196, 66, 4, 20);
}
}
@ -132,7 +132,7 @@ public class GuiSlider extends GuiButtonExt
{
if (super.mousePressed(par1Minecraft, par2, par3))
{
this.sliderValue = (float)(par2 - (this.xPosition + 4)) / (float)(this.width - 8);
this.sliderValue = (float)(par2 - (this.x + 4)) / (float)(this.width - 8);
updateSlider();
this.dragging = true;
return true;

View File

@ -45,9 +45,9 @@ public class GuiUnicodeGlyphButton extends GuiButtonExt
{
if (this.visible)
{
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height;
this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height;
int k = this.getHoverState(this.hovered);
GuiUtils.drawContinuousTexturedBox(GuiButton.BUTTON_TEXTURES, this.xPosition, this.yPosition, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
GuiUtils.drawContinuousTexturedBox(GuiButton.BUTTON_TEXTURES, this.x, this.y, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.zLevel);
this.mouseDragged(mc, mouseX, mouseY);
int color = 14737632;
@ -65,26 +65,26 @@ public class GuiUnicodeGlyphButton extends GuiButtonExt
}
String buttonText = this.displayString;
int glyphWidth = (int) (mc.fontRendererObj.getStringWidth(glyph) * glyphScale);
int strWidth = mc.fontRendererObj.getStringWidth(buttonText);
int ellipsisWidth = mc.fontRendererObj.getStringWidth("...");
int glyphWidth = (int) (mc.fontRenderer.getStringWidth(glyph) * glyphScale);
int strWidth = mc.fontRenderer.getStringWidth(buttonText);
int ellipsisWidth = mc.fontRenderer.getStringWidth("...");
int totalWidth = strWidth + glyphWidth;
if (totalWidth > width - 6 && totalWidth > ellipsisWidth)
buttonText = mc.fontRendererObj.trimStringToWidth(buttonText, width - 6 - ellipsisWidth).trim() + "...";
buttonText = mc.fontRenderer.trimStringToWidth(buttonText, width - 6 - ellipsisWidth).trim() + "...";
strWidth = mc.fontRendererObj.getStringWidth(buttonText);
strWidth = mc.fontRenderer.getStringWidth(buttonText);
totalWidth = glyphWidth + strWidth;
GlStateManager.pushMatrix();
GlStateManager.scale(glyphScale, glyphScale, 1.0F);
this.drawCenteredString(mc.fontRendererObj, glyph,
(int) (((this.xPosition + (this.width / 2) - (strWidth / 2)) / glyphScale) - (glyphWidth / (2 * glyphScale)) + 2),
(int) (((this.yPosition + ((this.height - 8) / glyphScale) / 2) - 1) / glyphScale), color);
this.drawCenteredString(mc.fontRenderer, glyph,
(int) (((this.x + (this.width / 2) - (strWidth / 2)) / glyphScale) - (glyphWidth / (2 * glyphScale)) + 2),
(int) (((this.y + ((this.height - 8) / glyphScale) / 2) - 1) / glyphScale), color);
GlStateManager.popMatrix();
this.drawCenteredString(mc.fontRendererObj, buttonText, (int) (this.xPosition + (this.width / 2) + (glyphWidth / glyphScale)),
this.yPosition + (this.height - 8) / 2, color);
this.drawCenteredString(mc.fontRenderer, buttonText, (int) (this.x + (this.width / 2) + (glyphWidth / glyphScale)),
this.y + (this.height - 8) / 2, color);
}
}
}

View File

@ -78,10 +78,10 @@ public class HoverChecker
{
if (this.button != null)
{
this.top = button.yPosition;
this.bottom = button.yPosition + button.height;
this.left = button.xPosition;
this.right = button.xPosition + button.width;
this.top = button.y;
this.bottom = button.y + button.height;
this.left = button.x;
this.right = button.x + button.width;
canHover = canHover && button.visible;
}

View File

@ -375,7 +375,7 @@ public class FMLCommonHandler
{
for (ICrashCallable call: crashCallables)
{
category.setDetail(call.getLabel(), call);
category.addDetail(call.getLabel(), call);
}
}

View File

@ -208,7 +208,7 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet<?>> im
completeServerSideConnection(ConnectionType.MODDED);
}
// FORGE: sometimes the netqueue will tick while login is occurring, causing an NPE. We shouldn't tick until the connection is complete
if (this.playerEntity.connection != this) return;
if (this.player.connection != this) return;
super.update();
}
};

View File

@ -44,7 +44,7 @@ public class BlockPosContext extends PlayerContext
public BlockPosContext(EntityPlayer ep, ChunkPos pos)
{
this(ep, new BlockPos((pos.chunkXPos << 4) + 8, 0, (pos.chunkZPos << 4) + 8), null, null);
this(ep, new BlockPos(pos.getXStart() + 8, 0, pos.getZStart() + 8), null, null);
}
@Override

View File

@ -50,7 +50,7 @@ public class LootTablesDebug
{
// if the player shoots something with a projectile, use looting 3
DamageSource damageSource = event.getDamageSource();
if (damageSource.isProjectile() && damageSource.getEntity() instanceof EntityPlayer && damageSource.getSourceOfDamage() instanceof EntityArrow)
if (damageSource.isProjectile() && damageSource.getTrueSource() instanceof EntityPlayer && damageSource.getImmediateSource() instanceof EntityArrow)
{
event.setLootingLevel(3);
}

View File

@ -189,7 +189,7 @@ public class ModelBakeEventDebug
{
value = 0;
}
value ^= (1 << (cubeSize * ((int) (vec.xCoord * (cubeSize - .0001))) + ((int) (vec.zCoord * (cubeSize - .0001)))));
value ^= (1 << (cubeSize * ((int) (vec.x * (cubeSize - .0001))) + ((int) (vec.z * (cubeSize - .0001)))));
cte.setState(cte.getState().withProperty(property, value));
world.markBlockRangeForRenderUpdate(pos, pos);
}
@ -270,10 +270,10 @@ public class ModelBakeEventDebug
Vec3d v3 = rotate(new Vec3d(x2 - .5, y - .5, z2 - .5), side).addVector(.5, .5, .5);
Vec3d v4 = rotate(new Vec3d(x2 - .5, y - .5, z1 - .5), side).addVector(.5, .5, .5);
return new BakedQuad(Ints.concat(
vertexToInts((float) v1.xCoord, (float) v1.yCoord, (float) v1.zCoord, -1, texture, 0, 0),
vertexToInts((float) v2.xCoord, (float) v2.yCoord, (float) v2.zCoord, -1, texture, 0, 16),
vertexToInts((float) v3.xCoord, (float) v3.yCoord, (float) v3.zCoord, -1, texture, 16, 16),
vertexToInts((float) v4.xCoord, (float) v4.yCoord, (float) v4.zCoord, -1, texture, 16, 0)
vertexToInts((float) v1.x, (float) v1.y, (float) v1.z, -1, texture, 0, 0),
vertexToInts((float) v2.x, (float) v2.y, (float) v2.z, -1, texture, 0, 16),
vertexToInts((float) v3.x, (float) v3.y, (float) v3.z, -1, texture, 16, 16),
vertexToInts((float) v4.x, (float) v4.y, (float) v4.z, -1, texture, 16, 0)
), -1, side, texture, true, DefaultVertexFormats.BLOCK);
}
@ -345,42 +345,44 @@ public class ModelBakeEventDebug
}
}
@SuppressWarnings("SuspiciousNameCombination")
private static Vec3d rotate(Vec3d vec, EnumFacing side)
{
switch (side)
{
case DOWN:
return new Vec3d(vec.xCoord, -vec.yCoord, -vec.zCoord);
return new Vec3d(vec.x, -vec.y, -vec.z);
case UP:
return new Vec3d(vec.xCoord, vec.yCoord, vec.zCoord);
return new Vec3d(vec.x, vec.y, vec.z);
case NORTH:
return new Vec3d(vec.xCoord, vec.zCoord, -vec.yCoord);
return new Vec3d(vec.x, vec.z, -vec.y);
case SOUTH:
return new Vec3d(vec.xCoord, -vec.zCoord, vec.yCoord);
return new Vec3d(vec.x, -vec.z, vec.y);
case WEST:
return new Vec3d(-vec.yCoord, vec.xCoord, vec.zCoord);
return new Vec3d(-vec.y, vec.x, vec.z);
case EAST:
return new Vec3d(vec.yCoord, -vec.xCoord, vec.zCoord);
return new Vec3d(vec.y, -vec.x, vec.z);
}
throw new IllegalArgumentException("Unknown Side " + side);
}
@SuppressWarnings("SuspiciousNameCombination")
private static Vec3d revRotate(Vec3d vec, EnumFacing side)
{
switch (side)
{
case DOWN:
return new Vec3d(vec.xCoord, -vec.yCoord, -vec.zCoord);
return new Vec3d(vec.x, -vec.y, -vec.z);
case UP:
return new Vec3d(vec.xCoord, vec.yCoord, vec.zCoord);
return new Vec3d(vec.x, vec.y, vec.z);
case NORTH:
return new Vec3d(vec.xCoord, -vec.zCoord, vec.yCoord);
return new Vec3d(vec.x, -vec.z, vec.y);
case SOUTH:
return new Vec3d(vec.xCoord, vec.zCoord, -vec.yCoord);
return new Vec3d(vec.x, vec.z, -vec.y);
case WEST:
return new Vec3d(vec.yCoord, -vec.xCoord, vec.zCoord);
return new Vec3d(vec.y, -vec.x, vec.z);
case EAST:
return new Vec3d(-vec.yCoord, vec.xCoord, vec.zCoord);
return new Vec3d(-vec.y, vec.x, vec.z);
}
throw new IllegalArgumentException("Unknown Side " + side);
}

View File

@ -195,7 +195,7 @@ public class PlayerInteractEventTest
if (!evt.getWorld().isRemote
&& evt.getTarget() instanceof EntitySkeleton
&& evt.getLocalPos().yCoord > evt.getTarget().height / 2.0)
&& evt.getLocalPos().y > evt.getTarget().height / 2.0)
{
// If we right click the upper half of a skeleton it dies.
evt.getTarget().setDead();

View File

@ -240,7 +240,7 @@ public class TestCapabilityMod
{
List<EntityPlayer> players = event.world.playerEntities;
int i = 0;
for (Village village : event.world.villageCollectionObj.getVillageList())
for (Village village : event.world.villageCollection.getVillageList())
{
if (village.hasCapability(TEST_CAP, null))
{

View File

@ -44,7 +44,7 @@ public class WorldCapabilityRainTimerTest
@SubscribeEvent
public void attatchTimer(AttachCapabilitiesEvent<World> event)
{
if (!event.getObject().isRemote && !event.getObject().provider.hasNoSky())
if (!event.getObject().isRemote && !event.getObject().provider.isNether())
{
event.addCapability(new ResourceLocation(MODID, "rainTimer"), new RainTimerProvider());
}