mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-28 07:35:51 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
67757e72c9
commit
d8da552c36
86 files changed
+1026
-943
No files matched your search
@@ -1,8 +1,5 @@
|
||||
package net.p455w0rd.wirelesscraftingterminal.common.utils;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -12,6 +9,10 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.p455w0rd.wirelesscraftingterminal.api.IWirelessCraftingTerminalItem;
|
||||
import net.p455w0rd.wirelesscraftingterminal.items.ItemMagnet;
|
||||
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class RandomUtils {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -80,8 +81,7 @@ public class RandomUtils {
|
||||
|
||||
public static ItemStack getMagnet(InventoryPlayer playerInv) {
|
||||
// Is player holding a Magnet Card?
|
||||
if (playerInv.player.getHeldItem() != null
|
||||
&& playerInv.player.getHeldItem().getItem() instanceof ItemMagnet) {
|
||||
if (playerInv.player.getHeldItem() != null && playerInv.player.getHeldItem().getItem() instanceof ItemMagnet) {
|
||||
return playerInv.player.getHeldItem();
|
||||
}
|
||||
// if not true, try to return first magnet card from first
|
||||
@@ -129,9 +129,7 @@ public class RandomUtils {
|
||||
}
|
||||
|
||||
public static boolean isMagnetInstalled(InventoryPlayer ip) {
|
||||
NBTTagCompound magnetNBTForm = RandomUtils.getWirelessTerm(ip)
|
||||
.getTagCompound()
|
||||
.getTagList("MagnetSlot", 10)
|
||||
NBTTagCompound magnetNBTForm = RandomUtils.getWirelessTerm(ip).getTagCompound().getTagList("MagnetSlot", 10)
|
||||
.getCompoundTagAt(0);
|
||||
if (magnetNBTForm != null) {
|
||||
ItemStack magnetItem = ItemStack.loadItemStackFromNBT(magnetNBTForm);
|
||||
|
||||
Reference in new issue
Block a user