derp
This commit is contained in:
parent
e856c1fb2a
commit
dabb9b0507
|
|
@ -4,16 +4,16 @@
|
||||||
|
|
||||||
package net.montoyo.wd.client.gui;
|
package net.montoyo.wd.client.gui;
|
||||||
|
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.montoyo.mcef.api.API;
|
import net.montoyo.mcef.api.API;
|
||||||
import net.montoyo.wd.client.ClientProxy;
|
|
||||||
import net.montoyo.wd.WebDisplays;
|
import net.montoyo.wd.WebDisplays;
|
||||||
|
import net.montoyo.wd.client.ClientProxy;
|
||||||
import net.montoyo.wd.client.gui.controls.Button;
|
import net.montoyo.wd.client.gui.controls.Button;
|
||||||
import net.montoyo.wd.client.gui.controls.TextField;
|
import net.montoyo.wd.client.gui.controls.TextField;
|
||||||
import net.montoyo.wd.client.gui.loading.FillControl;
|
import net.montoyo.wd.client.gui.loading.FillControl;
|
||||||
|
import net.montoyo.wd.net.Messages;
|
||||||
import net.montoyo.wd.net.server.SMessageRedstoneCtrl;
|
import net.montoyo.wd.net.server.SMessageRedstoneCtrl;
|
||||||
import net.montoyo.wd.utilities.BlockSide;
|
import net.montoyo.wd.utilities.BlockSide;
|
||||||
import net.montoyo.wd.utilities.Util;
|
import net.montoyo.wd.utilities.Util;
|
||||||
|
|
@ -37,10 +37,7 @@ public class GuiRedstoneCtrl extends WDScreen {
|
||||||
@FillControl
|
@FillControl
|
||||||
private Button btnOk;
|
private Button btnOk;
|
||||||
|
|
||||||
public GuiRedstoneCtrl() {
|
public GuiRedstoneCtrl(Component component, ResourceLocation d, Vector3i p, String r, String f) {
|
||||||
}
|
|
||||||
|
|
||||||
public GuiRedstoneCtrl(ResourceLocation d, Vector3i p, String r, String f) {
|
|
||||||
super(component);
|
super(component);
|
||||||
dimension = d;
|
dimension = d;
|
||||||
pos = p;
|
pos = p;
|
||||||
|
|
@ -49,8 +46,8 @@ public class GuiRedstoneCtrl extends WDScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
loadFrom(new ResourceLocation("webdisplays", "gui/redstonectrl.json"));
|
loadFrom(new ResourceLocation("webdisplays", "gui/redstonectrl.json"));
|
||||||
tfRisingEdge.setText(risingEdgeURL);
|
tfRisingEdge.setText(risingEdgeURL);
|
||||||
tfFallingEdge.setText(fallingEdgeURL);
|
tfFallingEdge.setText(fallingEdgeURL);
|
||||||
|
|
@ -63,10 +60,10 @@ public class GuiRedstoneCtrl extends WDScreen {
|
||||||
|
|
||||||
String rising = mcef.punycode(Util.addProtocol(tfRisingEdge.getText()));
|
String rising = mcef.punycode(Util.addProtocol(tfRisingEdge.getText()));
|
||||||
String falling = mcef.punycode(Util.addProtocol(tfFallingEdge.getText()));
|
String falling = mcef.punycode(Util.addProtocol(tfFallingEdge.getText()));
|
||||||
WebDisplays.NET_HANDLER.sendToServer(new SMessageRedstoneCtrl(dimension, pos, rising, falling));
|
Messages.INSTANCE.sendToServer(new SMessageRedstoneCtrl(dimension, pos, rising, falling));
|
||||||
}
|
}
|
||||||
|
|
||||||
mc.displayGuiScreen(null);
|
minecraft.setScreen(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,21 @@ package net.montoyo.wd.client.gui;
|
||||||
|
|
||||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
|
import net.minecraft.client.resources.language.I18n;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.montoyo.wd.WebDisplays;
|
import net.montoyo.wd.WebDisplays;
|
||||||
import net.montoyo.wd.client.gui.controls.*;
|
import net.montoyo.wd.client.gui.controls.*;
|
||||||
import net.montoyo.wd.client.gui.loading.FillControl;
|
import net.montoyo.wd.client.gui.loading.FillControl;
|
||||||
import net.montoyo.wd.core.ScreenRights;
|
import net.montoyo.wd.core.ScreenRights;
|
||||||
import net.montoyo.wd.entity.TileEntityScreen;
|
import net.montoyo.wd.entity.TileEntityScreen;
|
||||||
import net.montoyo.wd.item.WDItem;
|
import net.montoyo.wd.item.WDItem;
|
||||||
|
import net.montoyo.wd.net.Messages;
|
||||||
import net.montoyo.wd.net.server.SMessageScreenCtrl;
|
import net.montoyo.wd.net.server.SMessageScreenCtrl;
|
||||||
import net.montoyo.wd.utilities.*;
|
import net.montoyo.wd.utilities.*;
|
||||||
|
|
||||||
|
|
@ -115,7 +121,8 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
private CheckBox[] friendBoxes;
|
private CheckBox[] friendBoxes;
|
||||||
private CheckBox[] otherBoxes;
|
private CheckBox[] otherBoxes;
|
||||||
|
|
||||||
public GuiScreenConfig(TileEntityScreen tes, BlockSide side, NameUUIDPair[] friends, int fr, int or) {
|
public GuiScreenConfig(Component component, TileEntityScreen tes, BlockSide side, NameUUIDPair[] friends, int fr, int or) {
|
||||||
|
super(component);
|
||||||
this.tes = tes;
|
this.tes = tes;
|
||||||
this.side = side;
|
this.side = side;
|
||||||
this.friends = friends;
|
this.friends = friends;
|
||||||
|
|
@ -124,8 +131,8 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
loadFrom(new ResourceLocation("webdisplays", "gui/screencfg.json"));
|
loadFrom(new ResourceLocation("webdisplays", "gui/screencfg.json"));
|
||||||
|
|
||||||
friendBoxes = new CheckBox[] { boxFResolution, boxFUpgrades, boxFOthers, boxFFriends, boxFClick, boxFSetUrl };
|
friendBoxes = new CheckBox[] { boxFResolution, boxFUpgrades, boxFOthers, boxFFriends, boxFClick, boxFSetUrl };
|
||||||
|
|
@ -169,11 +176,11 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
updateMyRights();
|
updateMyRights();
|
||||||
updateRotationStr();
|
updateRotationStr();
|
||||||
|
|
||||||
mc.getSoundHandler().playSound(PositionedSoundRecord.getRecord(WebDisplays.INSTANCE.soundScreenCfg, 1.0f, 1.0f));
|
minecraft.getSoundManager().play(PositionedSoundRecord.getRecord(WebDisplays.INSTANCE.soundScreenCfg, 1.0f, 1.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateRotationStr() {
|
private void updateRotationStr() {
|
||||||
btnChangeRot.setLabel(I18n.format("webdisplays.gui.screencfg.rot" + rotation.getAngleAsInt()));
|
btnChangeRot.setLabel(I18n.get("webdisplays.gui.screencfg.rot" + rotation.getAngleAsInt()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addFriend(String name) {
|
private void addFriend(String name) {
|
||||||
|
|
@ -197,7 +204,7 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
throw new NumberFormatException(); //I'm lazy
|
throw new NumberFormatException(); //I'm lazy
|
||||||
|
|
||||||
if(x != scr.resolution.x || y != scr.resolution.y)
|
if(x != scr.resolution.x || y != scr.resolution.y)
|
||||||
WebDisplays.NET_HANDLER.sendToServer(SMessageScreenCtrl.vec2(tes, side, SMessageScreenCtrl.CTRL_SET_RESOLUTION, new Vector2i(x, y)));
|
Messages.INSTANCE.sendToServer(SMessageScreenCtrl.vec2(tes, side, SMessageScreenCtrl.CTRL_SET_RESOLUTION, new Vector2i(x, y)));
|
||||||
} catch(NumberFormatException ex) {
|
} catch(NumberFormatException ex) {
|
||||||
//Roll back
|
//Roll back
|
||||||
tfResX.setText("" + scr.resolution.x);
|
tfResX.setText("" + scr.resolution.x);
|
||||||
|
|
@ -215,7 +222,7 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
clickSetRes();
|
clickSetRes();
|
||||||
else if(ev.getSource() == btnChangeRot) {
|
else if(ev.getSource() == btnChangeRot) {
|
||||||
Rotation[] rots = Rotation.values();
|
Rotation[] rots = Rotation.values();
|
||||||
WebDisplays.NET_HANDLER.sendToServer(new SMessageScreenCtrl(tes, side, rots[(rotation.ordinal() + 1) % rots.length]));
|
Messages.INSTANCE.sendToServer(new SMessageScreenCtrl(tes, side, rots[(rotation.ordinal() + 1) % rots.length]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -278,7 +285,7 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
@GuiSubscribe
|
@GuiSubscribe
|
||||||
public void onRemovePlayer(List.EntryClick ev) {
|
public void onRemovePlayer(List.EntryClick ev) {
|
||||||
if(ev.getSource() == lstFriends)
|
if(ev.getSource() == lstFriends)
|
||||||
WebDisplays.NET_HANDLER.sendToServer(new SMessageScreenCtrl(tes, side, (NameUUIDPair) ev.getUserdata(), true));
|
Messages.INSTANCE.sendToServer(new SMessageScreenCtrl(tes, side, (NameUUIDPair) ev.getUserdata(), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GuiSubscribe
|
@GuiSubscribe
|
||||||
|
|
@ -309,12 +316,12 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
cbLockRatio.setChecked(false);
|
cbLockRatio.setChecked(false);
|
||||||
}
|
}
|
||||||
} else if(ev.getSource() == cbAutoVolume)
|
} else if(ev.getSource() == cbAutoVolume)
|
||||||
WebDisplays.NET_HANDLER.sendToServer(SMessageScreenCtrl.autoVol(tes, side, ev.isChecked()));
|
Messages.INSTANCE.sendToServer(SMessageScreenCtrl.autoVol(tes, side, ev.isChecked()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GuiSubscribe
|
@GuiSubscribe
|
||||||
public void onRemoveUpgrade(UpgradeGroup.ClickEvent ev) {
|
public void onRemoveUpgrade(UpgradeGroup.ClickEvent ev) {
|
||||||
WebDisplays.NET_HANDLER.sendToServer(new SMessageScreenCtrl(tes, side, ev.getMouseOverStack()));
|
Messages.INSTANCE.sendToServer(new SMessageScreenCtrl(tes, side, ev.getMouseOverStack()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFriendCheckbox(CheckBox cb) {
|
public boolean isFriendCheckbox(CheckBox cb) {
|
||||||
|
|
@ -335,7 +342,7 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
|
|
||||||
if(adding) {
|
if(adding) {
|
||||||
if(!hasFriend(pairs[0]))
|
if(!hasFriend(pairs[0]))
|
||||||
WebDisplays.NET_HANDLER.sendToServer(new SMessageScreenCtrl(tes, side, pairs[0], false));
|
Messages.INSTANCE.sendToServer(new SMessageScreenCtrl(tes, side, pairs[0], false));
|
||||||
|
|
||||||
tfFriend.setDisabled(false);
|
tfFriend.setDisabled(false);
|
||||||
tfFriend.clear();
|
tfFriend.clear();
|
||||||
|
|
@ -424,12 +431,12 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void sync() {
|
protected void sync() {
|
||||||
WebDisplays.NET_HANDLER.sendToServer(new SMessageScreenCtrl(tes, side, friendRights, otherRights));
|
Messages.INSTANCE.sendToServer(new SMessageScreenCtrl(tes, side, friendRights, otherRights));
|
||||||
Log.info("Sent sync packet");
|
Log.info("Sent sync packet");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateMyRights() {
|
public void updateMyRights() {
|
||||||
NameUUIDPair me = new NameUUIDPair(mc.player.getGameProfile());
|
NameUUIDPair me = new NameUUIDPair(minecraft.player.getGameProfile());
|
||||||
int myRights;
|
int myRights;
|
||||||
boolean clientIsOwner = false;
|
boolean clientIsOwner = false;
|
||||||
|
|
||||||
|
|
@ -483,7 +490,7 @@ public class GuiScreenConfig extends WDScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isForBlock(BlockPos bp, BlockSide side) {
|
public boolean isForBlock(BlockPos bp, BlockSide side) {
|
||||||
return bp.equals(tes.getPos()) && side == this.side;
|
return bp.equals(tes.getBlockPos()) && side == this.side;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,19 @@
|
||||||
package net.montoyo.wd.client.gui;
|
package net.montoyo.wd.client.gui;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.InteractionHand;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.montoyo.wd.WebDisplays;
|
import net.montoyo.wd.WebDisplays;
|
||||||
import net.montoyo.wd.client.ClientProxy;
|
import net.montoyo.wd.client.ClientProxy;
|
||||||
import net.montoyo.wd.client.gui.controls.Button;
|
import net.montoyo.wd.client.gui.controls.Button;
|
||||||
import net.montoyo.wd.client.gui.controls.TextField;
|
import net.montoyo.wd.client.gui.controls.TextField;
|
||||||
import net.montoyo.wd.client.gui.loading.FillControl;
|
import net.montoyo.wd.client.gui.loading.FillControl;
|
||||||
import net.montoyo.wd.entity.TileEntityScreen;
|
import net.montoyo.wd.entity.TileEntityScreen;
|
||||||
|
import net.montoyo.wd.net.Messages;
|
||||||
import net.montoyo.wd.net.server.SMessagePadCtrl;
|
import net.montoyo.wd.net.server.SMessagePadCtrl;
|
||||||
import net.montoyo.wd.net.server.SMessageScreenCtrl;
|
import net.montoyo.wd.net.server.SMessageScreenCtrl;
|
||||||
import net.montoyo.wd.utilities.BlockSide;
|
import net.montoyo.wd.utilities.BlockSide;
|
||||||
|
|
@ -48,6 +52,7 @@ public class GuiSetURL2 extends WDScreen {
|
||||||
private Button btnOk;
|
private Button btnOk;
|
||||||
|
|
||||||
public GuiSetURL2(TileEntityScreen tes, BlockSide side, String url, Vector3i rl) {
|
public GuiSetURL2(TileEntityScreen tes, BlockSide side, String url, Vector3i rl) {
|
||||||
|
super();
|
||||||
tileEntity = tes;
|
tileEntity = tes;
|
||||||
screenSide = side;
|
screenSide = side;
|
||||||
remoteLocation = rl;
|
remoteLocation = rl;
|
||||||
|
|
@ -61,8 +66,8 @@ public class GuiSetURL2 extends WDScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void init() {
|
||||||
super.initGui();
|
super.init();
|
||||||
loadFrom(new ResourceLocation("webdisplays", "gui/seturl.json"));
|
loadFrom(new ResourceLocation("webdisplays", "gui/seturl.json"));
|
||||||
tfURL.setText(screenURL);
|
tfURL.setText(screenURL);
|
||||||
}
|
}
|
||||||
|
|
@ -75,14 +80,14 @@ public class GuiSetURL2 extends WDScreen {
|
||||||
@GuiSubscribe
|
@GuiSubscribe
|
||||||
public void onButtonClicked(Button.ClickEvent ev) {
|
public void onButtonClicked(Button.ClickEvent ev) {
|
||||||
if(ev.getSource() == btnCancel)
|
if(ev.getSource() == btnCancel)
|
||||||
mc.displayGuiScreen(null);
|
minecraft.setScreen(null);
|
||||||
else if(ev.getSource() == btnOk)
|
else if(ev.getSource() == btnOk)
|
||||||
validate(tfURL.getText());
|
validate(tfURL.getText());
|
||||||
else if(ev.getSource() == btnShutDown) {
|
else if(ev.getSource() == btnShutDown) {
|
||||||
if(isPad)
|
if(isPad)
|
||||||
WebDisplays.NET_HANDLER.sendToServer(new SMessagePadCtrl(""));
|
Messages.INSTANCE.sendToServer(new SMessagePadCtrl(""));
|
||||||
|
|
||||||
mc.displayGuiScreen(null);
|
minecraft.setScreen(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -97,17 +102,17 @@ public class GuiSetURL2 extends WDScreen {
|
||||||
url = ((ClientProxy) WebDisplays.PROXY).getMCEF().punycode(url);
|
url = ((ClientProxy) WebDisplays.PROXY).getMCEF().punycode(url);
|
||||||
|
|
||||||
if(isPad) {
|
if(isPad) {
|
||||||
WebDisplays.NET_HANDLER.sendToServer(new SMessagePadCtrl(url));
|
Messages.INSTANCE.sendToServer(new SMessagePadCtrl(url));
|
||||||
ItemStack held = mc.player.getHeldItem(EnumHand.MAIN_HAND);
|
ItemStack held = minecraft.player.getItemInHand(InteractionHand.MAIN_HAND);
|
||||||
|
|
||||||
if(held.getItem() == WebDisplays.INSTANCE.itemMinePad && held.getTagCompound() != null && held.getTagCompound().hasKey("PadID")) {
|
if(held.getItem() == WebDisplays.INSTANCE.itemMinePad && held.getTag() != null && held.getTag().contains("PadID")) {
|
||||||
ClientProxy.PadData pd = ((ClientProxy) WebDisplays.PROXY).getPadByID(held.getTagCompound().getInteger("PadID"));
|
ClientProxy.PadData pd = ((ClientProxy) WebDisplays.PROXY).getPadByID(held.getTag().getInt("PadID"));
|
||||||
|
|
||||||
if(pd != null && pd.view != null)
|
if(pd != null && pd.view != null)
|
||||||
pd.view.loadURL(WebDisplays.applyBlacklist(url));
|
pd.view.loadURL(WebDisplays.applyBlacklist(url));
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
WebDisplays.NET_HANDLER.sendToServer(SMessageScreenCtrl.setURL(tileEntity, screenSide, url, remoteLocation));
|
Messages.INSTANCE.sendToServer(SMessageScreenCtrl.setURL(tileEntity, screenSide, url, remoteLocation));
|
||||||
}
|
}
|
||||||
|
|
||||||
mc.displayGuiScreen(null);
|
mc.displayGuiScreen(null);
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import net.montoyo.wd.client.gui.controls.Event;
|
||||||
import net.montoyo.wd.client.gui.loading.FillControl;
|
import net.montoyo.wd.client.gui.loading.FillControl;
|
||||||
import net.montoyo.wd.client.gui.loading.GuiLoader;
|
import net.montoyo.wd.client.gui.loading.GuiLoader;
|
||||||
import net.montoyo.wd.client.gui.loading.JsonOWrapper;
|
import net.montoyo.wd.client.gui.loading.JsonOWrapper;
|
||||||
|
import net.montoyo.wd.net.Messages;
|
||||||
import net.montoyo.wd.net.server.SMessageACQuery;
|
import net.montoyo.wd.net.server.SMessageACQuery;
|
||||||
import net.montoyo.wd.utilities.BlockSide;
|
import net.montoyo.wd.utilities.BlockSide;
|
||||||
import net.montoyo.wd.utilities.Bounds;
|
import net.montoyo.wd.utilities.Bounds;
|
||||||
|
|
@ -330,7 +331,7 @@ public abstract class WDScreen extends Screen {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void requestAutocomplete(String beginning, boolean matchExact) {
|
protected void requestAutocomplete(String beginning, boolean matchExact) {
|
||||||
WebDisplays.NET_HANDLER.sendToServer(new SMessageACQuery(beginning, matchExact));
|
Messages.INSTANCE.sendToServer(new SMessageACQuery(beginning, matchExact));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onAutocompleteResult(NameUUIDPair pairs[]) {
|
public void onAutocompleteResult(NameUUIDPair pairs[]) {
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
package net.montoyo.wd.client.gui.controls;
|
package net.montoyo.wd.client.gui.controls;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.renderer.RenderItem;
|
import net.minecraft.client.renderer.entity.ItemRenderer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.montoyo.wd.client.gui.loading.JsonOWrapper;
|
import net.montoyo.wd.client.gui.loading.JsonOWrapper;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -18,7 +18,7 @@ public class UpgradeGroup extends BasicControl {
|
||||||
private ArrayList<ItemStack> upgrades;
|
private ArrayList<ItemStack> upgrades;
|
||||||
private ItemStack overStack;
|
private ItemStack overStack;
|
||||||
private ItemStack clickStack;
|
private ItemStack clickStack;
|
||||||
private final RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
private final ItemRenderer renderItem = Minecraft.getInstance().getItemRenderer();
|
||||||
|
|
||||||
public UpgradeGroup() {
|
public UpgradeGroup() {
|
||||||
parent.requirePostDraw(this);
|
parent.requirePostDraw(this);
|
||||||
|
|
@ -33,8 +33,8 @@ public class UpgradeGroup extends BasicControl {
|
||||||
if(is == overStack && !disabled)
|
if(is == overStack && !disabled)
|
||||||
fillRect(x, y, 16, 16, 0x80FF0000);
|
fillRect(x, y, 16, 16, 0x80FF0000);
|
||||||
|
|
||||||
renderItem.renderItemAndEffectIntoGUI(mc.player, is, x, y);
|
renderItem.renderAndDecorateItem(mc.player, is, x, y, 0);
|
||||||
renderItem.renderItemOverlayIntoGUI(font, is, x, y, null);
|
renderItem.renderAndDecorateItem(is, font.lineHeight, x, y); //TODO is lineHeight right?
|
||||||
x += 18;
|
x += 18;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user