Fix remaining errors in v1.11
This commit is contained in:
@@ -101,9 +101,9 @@ public class CraftingKeys {
|
||||
public void onKeyInput(InputEvent.KeyInputEvent event) {
|
||||
if (KeyBindings.openGuiBinding.isPressed()) {
|
||||
Logger.info("onKeyInput(e)", "Open Crafting Keys Config Gui.");
|
||||
Util.client.thePlayer.openGui(instance, GuiConfig.GuiID, Util.client.theWorld,
|
||||
((int) Util.client.thePlayer.posX), (int) Util.client.thePlayer.posY,
|
||||
(int) Util.client.thePlayer.posZ);
|
||||
Util.client.player.openGui(instance, GuiConfig.GuiID, Util.client.world,
|
||||
((int) Util.client.player.posX), (int) Util.client.player.posY,
|
||||
(int) Util.client.player.posZ);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -142,11 +142,11 @@ public class GuiConfig extends GuiScreen {
|
||||
public void actionPerformed(GuiButton button) {
|
||||
if (button.id == buttonAbortID) {
|
||||
Logger.info("actionPerformed(b)", "Closing Crafting Keys GUI now!");
|
||||
mc.thePlayer.closeScreen();
|
||||
mc.player.closeScreen();
|
||||
} else if (button.id == buttonSaveID) {
|
||||
save();
|
||||
Logger.info("actionPerformed(b)", "Saving & closing Crafting Keys GUI now!");
|
||||
mc.thePlayer.closeScreen();
|
||||
mc.player.closeScreen();
|
||||
} else if (button.id >= 0 && button.id <= 11) {
|
||||
if (selectedButtonID == -1) {
|
||||
selectedButtonID = button.id;
|
||||
|
||||
@@ -161,7 +161,7 @@ public abstract class ContainerManager {
|
||||
void handleNumKey(Slot currentHoveredSlot) {
|
||||
|
||||
// hotbar-slots are always the last 9 slots of the currently opened inventory
|
||||
int hotbarStartIndex = Util.client.thePlayer.openContainer.getInventory().size() - 9 - 1;
|
||||
int hotbarStartIndex = Util.client.player.openContainer.getInventory().size() - 9 - 1;
|
||||
|
||||
if (Util.client.currentScreen instanceof GuiInventory) {
|
||||
hotbarStartIndex -= 1;
|
||||
@@ -505,7 +505,7 @@ public abstract class ContainerManager {
|
||||
int rightClickData = (rightClick) ? 1 : 0;
|
||||
|
||||
CraftingKeys.proxy.sendSlotClick(Util.client.playerController, container.windowId, index,
|
||||
rightClickData, 0, Util.client.thePlayer);
|
||||
rightClickData, 0, Util.client.player);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@ public class InputUtil {
|
||||
// Constants from Minecraft Source Code
|
||||
x -= (guiContainer.width - 176) / 2;
|
||||
y -= (guiContainer.height - 166) / 2;
|
||||
return x >= slot.xDisplayPosition - 1 && x < slot.xDisplayPosition + 16 + 1
|
||||
&& y >= slot.yDisplayPosition - 1 && y < slot.yDisplayPosition + 16 + 1;
|
||||
return x >= slot.xPos - 1 && x < slot.xPos + 16 + 1
|
||||
&& y >= slot.yPos - 1 && y < slot.yPos + 16 + 1;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class Util {
|
||||
* @return A item stack
|
||||
*/
|
||||
public static ItemStack getHeldStack() {
|
||||
return client.thePlayer.inventory.getItemStack();
|
||||
return client.player.inventory.getItemStack();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,10 +50,10 @@ public class Util {
|
||||
* @return True, if this is the first tick
|
||||
*/
|
||||
public static boolean isFirstInWorldTick() {
|
||||
if (firstInWorldTick && client.theWorld != null) {
|
||||
if (firstInWorldTick && client.world != null) {
|
||||
firstInWorldTick = false;
|
||||
return true;
|
||||
} else if (client.theWorld == null) {
|
||||
} else if (client.world == null) {
|
||||
firstInWorldTick = true;
|
||||
}
|
||||
return false;
|
||||
@@ -65,7 +65,8 @@ public class Util {
|
||||
* @param lang_key key from lang-file
|
||||
*/
|
||||
public static void printMessage(String lang_key) {
|
||||
client.thePlayer.addChatMessage(new TextComponentTranslation(lang_key));
|
||||
String translated = (new TextComponentTranslation(lang_key)).getUnformattedComponentText();
|
||||
client.player.sendChatMessage(translated);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user