mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-13 16:54:08 +00:00
Removing references to Forestry classes outside the API. Oops.
This commit is contained in:
1 parent
e9c1e5cf8c
commit
e0432846d5
2 files changed
+24
-12
No files matched your search
@@ -2,18 +2,37 @@ package magicbees.item;
|
||||
|
||||
import magicbees.block.types.HiveType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import forestry.core.items.ItemForestryBlock;
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Created by Allen on 7/29/2014.
|
||||
*/
|
||||
public class ItemMagicHive extends ItemForestryBlock
|
||||
public class ItemMagicHive extends ItemBlock
|
||||
{
|
||||
public ItemMagicHive(Block block)
|
||||
{
|
||||
super(block);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
protected Block getBlock() {
|
||||
return field_150939_a;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return this.getBlock().getIcon(1, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -21,10 +40,4 @@ public class ItemMagicHive extends ItemForestryBlock
|
||||
{
|
||||
return getBlock().getUnlocalizedName() + "." + HiveType.getHiveFromMeta(itemstack.getItemDamage()).name().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack p_77653_1_)
|
||||
{
|
||||
return ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(p_77653_1_) + ".name")).trim();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package magicbees.main.utils.net;
|
||||
|
||||
import forestry.core.proxy.Proxies;
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
@@ -69,7 +68,7 @@ public class EventBase {
|
||||
short meta = data.readShort();
|
||||
itemstack = new ItemStack(item, stackSize, meta);
|
||||
|
||||
if (item.isDamageable() || Proxies.common.needsTagCompoundSynched(item)) {
|
||||
if (item.isDamageable() || item.getShareTag()) {
|
||||
itemstack.stackTagCompound = this.readNBTTagCompound(data);
|
||||
}
|
||||
}
|
||||
@@ -85,7 +84,7 @@ public class EventBase {
|
||||
data.writeByte(itemstack.stackSize);
|
||||
data.writeShort(itemstack.getItemDamage());
|
||||
|
||||
if (itemstack.getItem().isDamageable() || Proxies.common.needsTagCompoundSynched(itemstack.getItem())) {
|
||||
if (itemstack.getItem().isDamageable() || itemstack.getItem().getShareTag()) {
|
||||
this.writeNBTTagCompound(itemstack.stackTagCompound, data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user