mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-26 06:42:55 +00:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5960bad61 | ||
|
|
e96a8452b9 | ||
|
|
eeeb37fce7 | ||
|
|
44f648549f | ||
|
|
c6b3a66707 | ||
|
|
edb7622056 | ||
|
|
49646337b3 |
No files matched your search
+4
-4
@@ -1,11 +1,11 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-754-GTNH:dev")
|
||||
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-731-GTNH-pre:dev")
|
||||
|
||||
implementation("com.github.GTNewHorizons:Baubles-Expanded:2.2.4-GTNH:dev")
|
||||
implementation("com.github.GTNewHorizons:Baubles-Expanded:2.2.2-GTNH:dev")
|
||||
compileOnly("curse.maven:cofh-core-69162:2388751")
|
||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.40-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.26-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:MouseTweaks:2.4.20-GTNH:dev") { transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.10.8:dev") { transitive = false }
|
||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.10.3:dev") { transitive = false }
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class GuiMagnet extends GuiContainer {
|
||||
public boolean ignoreNBT = false;
|
||||
public boolean ignoreMeta = false;
|
||||
public boolean useOreDict = false;
|
||||
private final ItemStack magnetItem;
|
||||
private ItemStack magnetItem;
|
||||
private WCTGuiCheckBox ignoreNBTBox;
|
||||
private WCTGuiCheckBox ignoreMetaBox;
|
||||
private WCTGuiCheckBox useOreDictBox;
|
||||
|
||||
+5
-3
@@ -50,6 +50,7 @@ public class GuiWirelessCraftingTerminal extends GuiMEMonitorable implements IMT
|
||||
|
||||
private int currentMouseX = 0;
|
||||
private int currentMouseY = 0;
|
||||
private final int lowerTextureOffset = 0;
|
||||
|
||||
public GuiWirelessCraftingTerminal(final InventoryPlayer inventoryPlayer, ICraftingTerminal host) {
|
||||
super(inventoryPlayer, host, new ContainerWirelessCraftingTerminal(inventoryPlayer, host));
|
||||
@@ -184,11 +185,11 @@ public class GuiWirelessCraftingTerminal extends GuiMEMonitorable implements IMT
|
||||
// draw player inv
|
||||
this.drawTexturedModalRect(
|
||||
offsetX,
|
||||
offsetY + 16 + this.rows * 18,
|
||||
offsetY + 16 + this.rows * 18 + this.lowerTextureOffset,
|
||||
0,
|
||||
106 - 18 - 18,
|
||||
x_width,
|
||||
99 + this.getReservedSpace());
|
||||
99 + this.getReservedSpace() - this.lowerTextureOffset);
|
||||
|
||||
// draw view cells background
|
||||
this.drawTexturedModalRect(offsetX + x_width, offsetY, x_width, 0, 32, 104);
|
||||
@@ -262,7 +263,8 @@ public class GuiWirelessCraftingTerminal extends GuiMEMonitorable implements IMT
|
||||
@Override
|
||||
@Optional.Method(modid = "MouseTweaks")
|
||||
public Object getModSelectedSlot(Object modContainer, int slotCount) {
|
||||
return getSlot(currentMouseX, currentMouseY);
|
||||
Slot s = getSlot(currentMouseX, currentMouseY);
|
||||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package net.p455w0rd.wirelesscraftingterminal.common;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTermHandler;
|
||||
@@ -17,7 +16,6 @@ import appeng.api.AEApi;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.ContainerOpenContext;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import it.unimi.dsi.fastutil.ints.IntObjectPair;
|
||||
|
||||
public class WCTGuiHandler implements IGuiHandler {
|
||||
|
||||
@@ -35,8 +33,14 @@ public class WCTGuiHandler implements IGuiHandler {
|
||||
return null;
|
||||
}
|
||||
|
||||
final IntObjectPair<ItemStack> termItem = RandomUtils.getWirelessTermWithSlot(player.inventory);
|
||||
final WTCGuiObject term = new WTCGuiObject(wh, termItem.second(), player, world, x, y, z, termItem.firstInt());
|
||||
final WTCGuiObject term = new WTCGuiObject(
|
||||
wh,
|
||||
RandomUtils.getWirelessTerm(player.inventory),
|
||||
player,
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z);
|
||||
|
||||
return switch (guiId) {
|
||||
case Reference.GUI_WCT -> updateGui(
|
||||
@@ -56,16 +60,14 @@ public class WCTGuiHandler implements IGuiHandler {
|
||||
final IWirelessCraftingTermHandler wh = (IWirelessCraftingTermHandler) AEApi.instance().registries().wireless()
|
||||
.getWirelessTerminalHandler(RandomUtils.getWirelessTerm(player.inventory));
|
||||
if (wh != null && guiId == Reference.GUI_WCT) {
|
||||
final IntObjectPair<ItemStack> termItem = RandomUtils.getWirelessTermWithSlot(player.inventory);
|
||||
final WTCGuiObject obj = new WTCGuiObject(
|
||||
wh,
|
||||
termItem.second(),
|
||||
RandomUtils.getWirelessTerm(player.inventory),
|
||||
player,
|
||||
world,
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
termItem.firstInt());
|
||||
z);
|
||||
return new GuiWirelessCraftingTerminal(player.inventory, obj);
|
||||
}
|
||||
if (guiId == Reference.GUI_MAGNET) {
|
||||
|
||||
+2
-2
@@ -292,12 +292,12 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEMonitorable
|
||||
}
|
||||
|
||||
public static WTCGuiObject getGuiObject(final ItemStack it, final EntityPlayer player, final World w, final int x,
|
||||
final int y, final int z, final int slotIndex) {
|
||||
final int y, final int z) {
|
||||
if (it != null) {
|
||||
final IWirelessCraftingTermHandler wh = (IWirelessCraftingTermHandler) AEApi.instance().registries()
|
||||
.wireless().getWirelessTerminalHandler(it);
|
||||
if (wh != null) {
|
||||
return new WTCGuiObject(wh, it, player, w, x, y, z, slotIndex);
|
||||
return new WTCGuiObject(wh, it, player, w, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@ import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import it.unimi.dsi.fastutil.ints.IntObjectImmutablePair;
|
||||
import it.unimi.dsi.fastutil.ints.IntObjectPair;
|
||||
|
||||
public class RandomUtils {
|
||||
|
||||
@@ -88,48 +86,6 @@ public class RandomUtils {
|
||||
return wirelessTerm;
|
||||
}
|
||||
|
||||
public static IntObjectPair<ItemStack> getWirelessTermWithSlot(InventoryPlayer playerInv) {
|
||||
if (playerInv.player.getHeldItem() != null
|
||||
&& playerInv.player.getHeldItem().getItem() instanceof IWirelessCraftingTerminalItem) {
|
||||
return new IntObjectImmutablePair<>(playerInv.player.inventory.currentItem, playerInv.player.getHeldItem());
|
||||
}
|
||||
IntObjectPair<ItemStack> wirelessTerm = null;
|
||||
|
||||
int invSize = playerInv.getSizeInventory();
|
||||
if (invSize <= 0) {
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i < invSize; ++i) {
|
||||
ItemStack item = playerInv.getStackInSlot(i);
|
||||
if (item == null) {
|
||||
continue;
|
||||
}
|
||||
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
||||
wirelessTerm = new IntObjectImmutablePair<>(i, item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isBaublesLoaded) {
|
||||
IInventory handler = BaublesApi.getBaubles(playerInv.player);
|
||||
if (handler != null) {
|
||||
invSize = handler.getSizeInventory();
|
||||
for (int i = 0; i < invSize; ++i) {
|
||||
ItemStack item = handler.getStackInSlot(i);
|
||||
if (item == null) {
|
||||
continue;
|
||||
}
|
||||
if (item.getItem() instanceof IWirelessCraftingTerminalItem) {
|
||||
wirelessTerm = new IntObjectImmutablePair<>(i + playerInv.getSizeInventory(), item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return wirelessTerm;
|
||||
}
|
||||
|
||||
public static ItemStack getMagnet(InventoryPlayer playerInv) {
|
||||
// Is player holding a Magnet Card?
|
||||
if (playerInv.player.getHeldItem() != null && playerInv.player.getHeldItem().getItem() instanceof ItemMagnet) {
|
||||
|
||||
+2
-5
@@ -43,7 +43,6 @@ import appeng.util.item.AEItemStack;
|
||||
import appeng.util.prioitylist.IPartitionList;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import it.unimi.dsi.fastutil.ints.IntObjectPair;
|
||||
|
||||
public class PacketNEIRecipe extends WCTPacket {
|
||||
|
||||
@@ -94,15 +93,13 @@ public class PacketNEIRecipe extends WCTPacket {
|
||||
IGridNode node = cct.getNetworkNode();
|
||||
|
||||
if (node == null) {
|
||||
IntObjectPair<ItemStack> termItem = RandomUtils.getWirelessTermWithSlot(player.inventory);
|
||||
WTCGuiObject obj = ContainerWirelessCraftingTerminal.getGuiObject(
|
||||
termItem.second(),
|
||||
RandomUtils.getWirelessTerm(player.inventory),
|
||||
player,
|
||||
player.worldObj,
|
||||
(int) player.posX,
|
||||
(int) player.posY,
|
||||
(int) player.posZ,
|
||||
termItem.firstInt());
|
||||
(int) player.posZ);
|
||||
node = obj.getActionableNode(true);
|
||||
}
|
||||
if (node != null) {
|
||||
|
||||
@@ -11,12 +11,8 @@ import appeng.items.contents.WirelessCraftingTerminalGuiObject;
|
||||
|
||||
public class WTCGuiObject extends WirelessCraftingTerminalGuiObject implements WCTIActionHost {
|
||||
|
||||
private final int slotIndex;
|
||||
|
||||
public WTCGuiObject(IWirelessTermHandler wh, ItemStack is, EntityPlayer ep, World w, int x, int y, int z,
|
||||
final int slotIndex) {
|
||||
public WTCGuiObject(IWirelessTermHandler wh, ItemStack is, EntityPlayer ep, World w, int x, int y, int z) {
|
||||
super(wh, is, ep, w, x, y, z);
|
||||
this.slotIndex = slotIndex;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -28,9 +24,4 @@ public class WTCGuiObject extends WirelessCraftingTerminalGuiObject implements W
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventorySlot() {
|
||||
return this.slotIndex;
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -3,6 +3,7 @@ package net.p455w0rd.wirelesscraftingterminal.implementation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.p455w0rd.wirelesscraftingterminal.api.IWCTInteractionHelper;
|
||||
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTermHandler;
|
||||
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
|
||||
@@ -18,7 +19,8 @@ public class WCTInteractionHelper implements IWCTInteractionHelper {
|
||||
|
||||
@Override
|
||||
public void openWirelessCraftingTerminalGui(final EntityPlayer player) {
|
||||
if (player == null || player instanceof EntityPlayerMP
|
||||
if ((player == null) || (player instanceof FakePlayer)
|
||||
|| (player instanceof EntityPlayerMP)
|
||||
|| FMLCommonHandler.instance().getSide() == Side.SERVER) {
|
||||
return;
|
||||
}
|
||||
|
||||
+43
-31
@@ -14,7 +14,7 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTerminalItem;
|
||||
import net.p455w0rd.wirelesscraftingterminal.common.WCTGuiHandler;
|
||||
import net.p455w0rd.wirelesscraftingterminal.api.WCTApi;
|
||||
import net.p455w0rd.wirelesscraftingterminal.common.utils.RandomUtils;
|
||||
import net.p455w0rd.wirelesscraftingterminal.handlers.LocaleHandler;
|
||||
import net.p455w0rd.wirelesscraftingterminal.integration.EnderIO;
|
||||
@@ -25,6 +25,7 @@ import org.lwjgl.input.Keyboard;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.config.PowerUnits;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.SortDir;
|
||||
@@ -39,6 +40,7 @@ import appeng.util.IConfigManagerHost;
|
||||
import appeng.util.Platform;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.expanded.IBaubleExpanded;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -47,13 +49,14 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||
implements IWirelessCraftingTerminalItem, IWirelessTermHandler, IBaubleExpanded {
|
||||
|
||||
public static final String LINK_KEY_STRING = "key";
|
||||
public static double GLOBAL_POWER_MULTIPLIER = PowerMultiplier.CONFIG.multiplier;
|
||||
private static final String POWER_NBT_KEY = "internalCurrentPower";
|
||||
private static final String BOOSTER_SLOT_NBT = "BoosterSlot";
|
||||
private static final String MAGNET_SLOT_NBT = "MagnetSlot";
|
||||
private EntityPlayer entityPlayer;
|
||||
|
||||
public ItemWirelessCraftingTerminal() {
|
||||
super(Reference.WCT_MAX_POWER, Optional.absent());
|
||||
super(Reference.WCT_MAX_POWER, Optional.<String>absent());
|
||||
setUnlocalizedName("wirelessCraftingTerminal");
|
||||
setTextureName(Reference.MODID + ":wirelessCraftingTerminal");
|
||||
setMaxStackSize(1);
|
||||
@@ -146,16 +149,16 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||
|
||||
@Override
|
||||
public void onUpdate(final ItemStack is, final World w, final Entity e, int i, boolean f) {
|
||||
if (!(e instanceof EntityPlayer p)) {
|
||||
if (!(e instanceof EntityPlayer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
EntityPlayer p = (EntityPlayer) e;
|
||||
if (entityPlayer == null) {
|
||||
entityPlayer = p;
|
||||
}
|
||||
|
||||
ItemStack wirelessTerminal = null;
|
||||
InventoryPlayer inv = p.inventory;
|
||||
ItemStack wirelessTerminal = RandomUtils.getWirelessTerm(inv);
|
||||
wirelessTerminal = RandomUtils.getWirelessTerm(inv);
|
||||
if (wirelessTerminal == null || !(wirelessTerminal.getItem() instanceof IWirelessCraftingTerminalItem)) {
|
||||
return;
|
||||
}
|
||||
@@ -164,16 +167,10 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(final ItemStack itemStack, final World world, final EntityPlayer player) {
|
||||
if (!world.isRemote) {
|
||||
WCTGuiHandler.launchGui(
|
||||
Reference.GUI_WCT,
|
||||
player,
|
||||
player.worldObj,
|
||||
(int) player.posX,
|
||||
(int) player.posY,
|
||||
(int) player.posZ);
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
||||
// Open the gui
|
||||
WCTApi.instance().interact().openWirelessCraftingTerminalGui(player);
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@@ -219,6 +216,11 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||
return getAECurrentPower(is) >= amt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasInfinityPower(ItemStack is) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasInfinityRange(ItemStack is) {
|
||||
return this.checkForBooster(is);
|
||||
@@ -229,7 +231,9 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||
final ConfigManager out = new ConfigManager(new IConfigManagerHost() {
|
||||
|
||||
@Override
|
||||
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {
|
||||
public void updateSetting(final IConfigManager manager,
|
||||
@SuppressWarnings("rawtypes") final Enum settingName,
|
||||
@SuppressWarnings("rawtypes") final Enum newValue) {
|
||||
final NBTTagCompound data = Platform.openNbtData(target);
|
||||
manager.writeToNBT(data);
|
||||
}
|
||||
@@ -243,39 +247,44 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||
return out;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getCheckedSubItems(Item item, CreativeTabs creativeTab, List itemList) {
|
||||
itemList.add(new ItemStack(item));
|
||||
List itemList2 = itemList;
|
||||
itemList2.add(new ItemStack(item));
|
||||
ItemStack is = new ItemStack(item);
|
||||
injectAEPower(is, Reference.WCT_MAX_POWER);
|
||||
itemList.add(is);
|
||||
itemList2.add(is);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showDurabilityBar(ItemStack is) {
|
||||
double aeCurrPower = getAECurrentPower(is);
|
||||
double aeMaxPower = getAEMaxPower(is);
|
||||
return (int) aeCurrPower < (int) aeMaxPower;
|
||||
if ((int) aeCurrPower >= (int) aeMaxPower) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addCheckedInformation(ItemStack is, EntityPlayer player, List list, boolean displayMore) {
|
||||
String shift = LocaleHandler.PressShift.getLocal()
|
||||
.replace("Shift", color("yellow") + color("bold") + color("italics") + "Shift" + color("gray"));
|
||||
String shift = LocaleHandler.PressShift.getLocal().replace(
|
||||
"Shift",
|
||||
color("yellow") + "" + color("bold") + "" + color("italics") + "Shift" + color("gray"));
|
||||
final NBTTagCompound tag = ensureTagCompound(is);
|
||||
|
||||
String encKey = tag.getString("key");
|
||||
String pctTxtColor = color("white");
|
||||
String pctTxtColor = color("white") + "";
|
||||
double aeCurrPower = getAECurrentPower(is);
|
||||
double aeCurrPowerPct = (int) Math.floor(aeCurrPower / Reference.WCT_MAX_POWER * 1e4) / 1e2;
|
||||
if ((int) aeCurrPowerPct >= 75) {
|
||||
pctTxtColor = color("green");
|
||||
pctTxtColor = color("green") + "";
|
||||
}
|
||||
if ((int) aeCurrPowerPct <= 5) {
|
||||
pctTxtColor = color("red");
|
||||
pctTxtColor = color("red") + "";
|
||||
}
|
||||
list.add(color("aqua") + "==============================");
|
||||
list.add(
|
||||
@@ -291,10 +300,10 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||
linked = color("blue") + StatCollector.translateToLocal("gui.appliedenergistics2.Linked");
|
||||
}
|
||||
list.add(LocaleHandler.LinkStatus.getLocal() + ": " + linked);
|
||||
String boosterStatus = (checkForBooster(is) ? color("green") + LocaleHandler.Installed.getLocal()
|
||||
: color("red") + LocaleHandler.NotInstalled.getLocal());
|
||||
String magnetStatus = (isMagnetInstalled(is) ? color("green") + LocaleHandler.Installed.getLocal()
|
||||
: color("red") + LocaleHandler.NotInstalled.getLocal());
|
||||
String boosterStatus = (checkForBooster(is) ? color("green") + "" + LocaleHandler.Installed.getLocal()
|
||||
: color("red") + "" + LocaleHandler.NotInstalled.getLocal());
|
||||
String magnetStatus = (isMagnetInstalled(is) ? color("green") + "" + LocaleHandler.Installed.getLocal()
|
||||
: color("red") + "" + LocaleHandler.NotInstalled.getLocal());
|
||||
if (Reference.WCT_BOOSTER_ENABLED) {
|
||||
list.add(getItemName("infinityBoosterCard") + ": " + boosterStatus);
|
||||
}
|
||||
@@ -356,7 +365,10 @@ public class ItemWirelessCraftingTerminal extends AERootPoweredItem
|
||||
}
|
||||
|
||||
private NBTTagCompound ensureTagCompound(ItemStack is) {
|
||||
return RandomUtils.getTag(is);
|
||||
if (!is.hasTagCompound()) {
|
||||
is.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
return is.getTagCompound();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,7 +45,6 @@ import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import it.unimi.dsi.fastutil.ints.IntObjectPair;
|
||||
|
||||
public class CommonProxy {
|
||||
|
||||
@@ -205,8 +204,7 @@ public class CommonProxy {
|
||||
}
|
||||
}
|
||||
if (RandomUtils.getWirelessTerm(playerInv) != null) {
|
||||
IntObjectPair<ItemStack> termItemPair = RandomUtils.getWirelessTermWithSlot(playerInv);
|
||||
ItemStack WCTStack = termItemPair.second();
|
||||
ItemStack WCTStack = RandomUtils.getWirelessTerm(playerInv);
|
||||
if (RandomUtils.isMagnetInstalled(playerInv)) {
|
||||
ItemStack magnetStack = RandomUtils.getMagnet(playerInv);
|
||||
if (magnetStack.getItem() instanceof ItemMagnet) {
|
||||
@@ -218,8 +216,7 @@ public class CommonProxy {
|
||||
world,
|
||||
(int) player.posX,
|
||||
(int) player.posY,
|
||||
(int) player.posZ,
|
||||
termItemPair.firstInt());
|
||||
(int) player.posZ);
|
||||
magnet.civ = magnet.obj;
|
||||
magnet.powerSrc = magnet.civ;
|
||||
magnet.monitor = magnet.civ.getItemInventory();
|
||||
|
||||
Reference in new issue
Block a user