mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Fixed #655
This commit is contained in:
1 parent
34c846b475
commit
0cf7066b7e
4 files changed
+33
-9
No files matched your search
@@ -17,6 +17,7 @@ package thaumic.tinkerer.client.core.proxy;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -72,7 +73,10 @@ public class TTClientProxy extends TTCommonProxy {
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
super.preInit(event);
|
||||
MinecraftForge.EVENT_BUS.register(new FumeTool());
|
||||
if (Loader.isModLoaded("ComputerCraft")) {
|
||||
MinecraftForge.EVENT_BUS.register(new FumeTool());
|
||||
}
|
||||
|
||||
if (ConfigHandler.enableKami)
|
||||
//kamiRarity = EnumHelperClient.addRarity("KAMI", 0x6, "Kami");
|
||||
kamiRarity = EnumHelperClient.addEnum(new Class[][]{{EnumRarity.class, EnumChatFormatting.class, String.class}}, EnumRarity.class, "KAMI", EnumChatFormatting.LIGHT_PURPLE, "Kami");
|
||||
|
||||
@@ -39,6 +39,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
@@ -102,7 +103,6 @@ public class TileAnimationTablet extends TileEntity implements IInventory, IMova
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
//player = new TabletFakePlayer(this);//,Owner);
|
||||
|
||||
player.onUpdate();
|
||||
player.inventory.clearInventory(null,-1);
|
||||
ticksExisted++;
|
||||
@@ -402,7 +402,14 @@ public class TileAnimationTablet extends TileEntity implements IInventory, IMova
|
||||
public void readCustomNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
leftClick = par1NBTTagCompound.getBoolean(TAG_LEFT_CLICK);
|
||||
redstone = par1NBTTagCompound.getBoolean(TAG_REDSTONE);
|
||||
|
||||
if(par1NBTTagCompound.hasKey("isBreaking"))
|
||||
isBreaking = par1NBTTagCompound.getBoolean("isBreaking");
|
||||
if(par1NBTTagCompound.hasKey("initialDamage"))
|
||||
initialDamage = par1NBTTagCompound.getInteger("initialDamage");
|
||||
if(par1NBTTagCompound.hasKey("curblockDamage"))
|
||||
curblockDamage = par1NBTTagCompound.getInteger("curblockDamage");
|
||||
if(par1NBTTagCompound.hasKey("durabilityRemainingOnBlock"))
|
||||
durabilityRemainingOnBlock=par1NBTTagCompound.getInteger("durabilityRemainingOnBlock");
|
||||
NBTTagList var2 = par1NBTTagCompound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
|
||||
inventorySlots = new ItemStack[getSizeInventory()];
|
||||
for (int var3 = 0; var3 < var2.tagCount(); ++var3) {
|
||||
@@ -416,7 +423,10 @@ public class TileAnimationTablet extends TileEntity implements IInventory, IMova
|
||||
public void writeCustomNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
par1NBTTagCompound.setBoolean(TAG_LEFT_CLICK, leftClick);
|
||||
par1NBTTagCompound.setBoolean(TAG_REDSTONE, redstone);
|
||||
|
||||
par1NBTTagCompound.setBoolean("isBreaking",isBreaking);
|
||||
par1NBTTagCompound.setInteger("initialDamage", initialDamage);
|
||||
par1NBTTagCompound.setInteger("curblockDamage",curblockDamage);
|
||||
par1NBTTagCompound.setInteger("durabilityRemainingOnBlock",durabilityRemainingOnBlock);
|
||||
NBTTagList var2 = new NBTTagList();
|
||||
for (int var3 = 0; var3 < inventorySlots.length; ++var3) {
|
||||
if (inventorySlots[var3] != null) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package thaumic.tinkerer.common.compat;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -11,49 +11,56 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import thaumic.tinkerer.common.ThaumicTinkerer;
|
||||
import thaumic.tinkerer.common.block.BlockGas;
|
||||
import thaumic.tinkerer.common.item.ItemGasRemover;
|
||||
import thaumic.tinkerer.common.registry.TTRegistry;
|
||||
|
||||
/**
|
||||
* Created by Katrina on 04/02/2015.
|
||||
*/
|
||||
@Optional.InterfaceList({
|
||||
@Optional.Interface(iface = "dan200.computercraft.api.turtle.ITurtleUpgrade", modid = "ComputerCraft")
|
||||
})
|
||||
public class FumeTool implements ITurtleUpgrade {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon icon;
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
public int getUpgradeID() {
|
||||
return 171;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
public String getUnlocalisedAdjective() {
|
||||
return "ttcomputer.dissipator";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
public TurtleUpgradeType getType() {
|
||||
return TurtleUpgradeType.Tool;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
public ItemStack getCraftingItem() {
|
||||
return new ItemStack(ThaumicTinkerer.registry.getFirstItemFromClass(ItemGasRemover.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
public IPeripheral createPeripheral(ITurtleAccess turtle, TurtleSide side) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
public TurtleCommandResult useTool(ITurtleAccess turtle, TurtleSide side,
|
||||
TurtleVerb verb, int direction) {
|
||||
|
||||
@@ -82,17 +89,20 @@ public class FumeTool implements ITurtleUpgrade {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ITurtleAccess turtle, TurtleSide side) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
public void update(ITurtleAccess turtle, TurtleSide side) {
|
||||
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@Optional.Method(modid = "ComputerCraft")
|
||||
public void registerIcons(TextureStitchEvent evt) {
|
||||
if (evt.map.getTextureType() == 1) icon = evt.map.registerIcon("ttinkerer:gasRemover");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user