mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Readded waila, and added OC in
This commit is contained in:
1 parent
89174ec73e
commit
196cc2f9cd
16 files changed
+407
-186
No files matched your search
+98
@@ -0,0 +1,98 @@
|
||||
package vazkii.tinkerer.common.block.tile.peripheral.OpenComputers;
|
||||
|
||||
import li.cil.oc.api.network.Arguments;
|
||||
import li.cil.oc.api.network.Callback;
|
||||
import li.cil.oc.api.network.Context;
|
||||
import li.cil.oc.api.network.ManagedEnvironment;
|
||||
import li.cil.oc.api.prefab.DriverTileEntity;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.items.equipment.ItemElementalPickaxe;
|
||||
import thaumcraft.common.tiles.TileArcaneBore;
|
||||
|
||||
/**
|
||||
* Created by Katrina on 22/04/14.
|
||||
*/
|
||||
public class DriverArcaneBore extends DriverTileEntity {
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return TileArcaneBore.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedEnvironment createEnvironment(World world, int x, int y, int z) {
|
||||
return new Enviroment((TileArcaneBore)world.getTileEntity(x,y,z));
|
||||
}
|
||||
|
||||
public static final class Enviroment extends ManagedTileEntityEnvironment<TileArcaneBore>
|
||||
{
|
||||
|
||||
public Enviroment(TileArcaneBore tileEntity) {
|
||||
super(tileEntity,"arcanebore");
|
||||
}
|
||||
|
||||
|
||||
@Callback(doc="function():boolean -- does the bore have a pickaxe")
|
||||
public Object[] hasPickaxe(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.hasPickaxe };
|
||||
}
|
||||
@Callback(doc="function():boolean -- does the bore have a focus")
|
||||
public Object[] hasFocus(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.hasFocus };
|
||||
}
|
||||
|
||||
@Callback(doc="function():boolean -- is the pickaxe near broken?")
|
||||
public Object[] isPickaxeBroken(final Context context,final Arguments arguments)
|
||||
{
|
||||
ItemStack pickaxe = tileEntity.getStackInSlot(1);
|
||||
boolean nearBroken = pickaxe != null && pickaxe.getItemDamage() + 1 == pickaxe.getMaxDamage();
|
||||
return new Object[] { nearBroken };
|
||||
}
|
||||
|
||||
@Callback(doc="function():boolean -- Is the bore working?")
|
||||
public Object[] isWorking(final Context context,final Arguments arguments)
|
||||
{
|
||||
ItemStack pickaxe = tileEntity.getStackInSlot(1);
|
||||
boolean nearBroken = pickaxe != null && pickaxe.getItemDamage() + 1 == pickaxe.getMaxDamage();
|
||||
return new Object[] { this.tileEntity.gettingPower() && this.tileEntity.hasFocus && this.tileEntity.hasPickaxe && pickaxe.isItemStackDamageable() && !nearBroken };
|
||||
}
|
||||
|
||||
@Callback(doc="function():number -- Gets bore's radius")
|
||||
public Object[] getRadius(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { 1 + (tileEntity.area + tileEntity.maxRadius) * 2 };
|
||||
}
|
||||
|
||||
@Callback(doc="function():number -- Gets bore's speed")
|
||||
public Object[] getSpeed(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { tileEntity.speed };
|
||||
}
|
||||
|
||||
@Callback(doc="function():boolean -- Will the bore get native clusters?")
|
||||
public Object[] hasNativeClusters(final Context context,final Arguments arguments)
|
||||
{
|
||||
ItemStack pickaxe = tileEntity.getStackInSlot(1);
|
||||
return new Object[] { pickaxe != null && pickaxe.getItem() instanceof ItemElementalPickaxe};
|
||||
}
|
||||
|
||||
@Callback(doc="function():number -- What level fortune on pick")
|
||||
public Object[] getFortune(final Context context,final Arguments arguments)
|
||||
{
|
||||
ItemStack pickaxe = tileEntity.getStackInSlot(1);
|
||||
return new Object[] { EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, pickaxe) };
|
||||
}
|
||||
|
||||
@Callback(doc="function():boolean -- Does the pick have silk touch?")
|
||||
public Object[] hasSilkTouch(final Context context,final Arguments arguments)
|
||||
{
|
||||
ItemStack pickaxe = tileEntity.getStackInSlot(1);
|
||||
return new Object[] { EnchantmentHelper.getEnchantmentLevel(Enchantment.silkTouch.effectId, pickaxe)>0 };
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package vazkii.tinkerer.common.block.tile.peripheral.OpenComputers;
|
||||
|
||||
import li.cil.oc.api.network.Arguments;
|
||||
import li.cil.oc.api.network.Callback;
|
||||
import li.cil.oc.api.network.Context;
|
||||
import li.cil.oc.api.network.ManagedEnvironment;
|
||||
import li.cil.oc.api.prefab.DriverTileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.tiles.TileJarBrain;
|
||||
|
||||
/**
|
||||
* Created by Katrina on 22/04/14.
|
||||
*/
|
||||
public class DriverBrainInAJar extends DriverTileEntity {
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return TileJarBrain.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedEnvironment createEnvironment(World world, int x, int y, int z) {
|
||||
return new Enviroment((TileJarBrain)world.getTileEntity(x,y,z));
|
||||
}
|
||||
public static final class Enviroment extends ManagedTileEntityEnvironment<TileJarBrain>
|
||||
{
|
||||
|
||||
public Enviroment(TileJarBrain tileEntity) {
|
||||
super(tileEntity,"brainjar");
|
||||
}
|
||||
|
||||
|
||||
@Callback(doc="function():number -- returns the amount of XP in this jar")
|
||||
public Object[] getXP(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.xp };
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package vazkii.tinkerer.common.block.tile.peripheral.OpenComputers;
|
||||
|
||||
import li.cil.oc.api.network.Arguments;
|
||||
import li.cil.oc.api.network.Callback;
|
||||
import li.cil.oc.api.network.Context;
|
||||
import li.cil.oc.api.network.ManagedEnvironment;
|
||||
import li.cil.oc.api.prefab.DriverTileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.tiles.TileDeconstructionTable;
|
||||
|
||||
/**
|
||||
* Created by Katrina on 22/04/14.
|
||||
*/
|
||||
public class DriverDeconstructor extends DriverTileEntity {
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return TileDeconstructionTable.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedEnvironment createEnvironment(World world, int x, int y, int z) {
|
||||
return new Enviroment((TileDeconstructionTable)world.getTileEntity(x,y,z));
|
||||
}
|
||||
public static final class Enviroment extends ManagedTileEntityEnvironment<TileDeconstructionTable>
|
||||
{
|
||||
|
||||
public Enviroment(TileDeconstructionTable tileEntity) {
|
||||
super(tileEntity,"deconstructiontable");
|
||||
}
|
||||
|
||||
|
||||
@Callback(doc="function():boolean -- returns if the table has an aspect waiting")
|
||||
public Object[] hasAspect(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.aspect!=null };
|
||||
}
|
||||
|
||||
@Callback(doc="function():boolean -- returns if the table has an item in the slot")
|
||||
public Object[] hasItem(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.getStackInSlot(0)!=null};
|
||||
}
|
||||
|
||||
@Callback(doc="function():string -- returns aspect in the deconstructor")
|
||||
public Object[] getAspect(final Context context,final Arguments arguments)
|
||||
{
|
||||
return this.tileEntity.aspect!=null?new Object[] {tileEntity.aspect.getTag() }:null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
package vazkii.tinkerer.common.block.tile.peripheral.OpenComputers;
|
||||
|
||||
import li.cil.oc.api.network.Arguments;
|
||||
import li.cil.oc.api.network.Callback;
|
||||
import li.cil.oc.api.network.Context;
|
||||
import li.cil.oc.api.network.ManagedEnvironment;
|
||||
import li.cil.oc.api.prefab.DriverTileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import thaumcraft.api.aspects.IEssentiaTransport;
|
||||
|
||||
/**
|
||||
* Created by Katrina on 22/04/14.
|
||||
*/
|
||||
public class DriverEssentiaTransport extends DriverTileEntity {
|
||||
@Override
|
||||
public Class<?> getTileEntityClass() {
|
||||
return IEssentiaTransport.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManagedEnvironment createEnvironment(World world, int x, int y, int z) {
|
||||
return new Enviroment((IEssentiaTransport)world.getTileEntity(x,y,z));
|
||||
}
|
||||
|
||||
|
||||
public static final class Enviroment extends ManagedTileEntityEnvironment<IEssentiaTransport>
|
||||
{
|
||||
|
||||
public Enviroment(IEssentiaTransport tileEntity) {
|
||||
super(tileEntity,"essentiaTransport");
|
||||
}
|
||||
|
||||
|
||||
@Callback(doc="function(direction:number):boolean -- returns is the pipe connectable from this direction")
|
||||
public Object[] isConnectable(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.isConnectable(ForgeDirection.getOrientation(arguments.checkInteger(0))) };
|
||||
}
|
||||
|
||||
@Callback(doc="function(direction:number):boolean -- can pipe input from direction")
|
||||
public Object[] canInputFrom(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.canInputFrom(ForgeDirection.getOrientation(arguments.checkInteger(0))) };
|
||||
}
|
||||
|
||||
@Callback(doc="function(direction:number):boolean -- can pipe output to direction")
|
||||
public Object[] canOutputTo(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.canOutputTo(ForgeDirection.getOrientation(arguments.checkInteger(0))) };
|
||||
}
|
||||
|
||||
@Callback(doc="function(direction:number):string -- returns which aspect suction")
|
||||
public Object[] getSuctionType(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.getSuctionType(ForgeDirection.getOrientation(arguments.checkInteger(0))).getTag() };
|
||||
}
|
||||
|
||||
@Callback(doc="function(direction:number):number -- returnd amount of suction")
|
||||
public Object[] getSuctionAmount(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.getSuctionAmount(ForgeDirection.getOrientation(arguments.checkInteger(0))) };
|
||||
}
|
||||
|
||||
@Callback(doc="function(direction:number):string -- returns which essentia in pipe")
|
||||
public Object[] getEssentiaType(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.getEssentiaType(ForgeDirection.getOrientation(arguments.checkInteger(0))).getTag() };
|
||||
}
|
||||
|
||||
@Callback(doc="function(direction:number):number -- returnd amount of essentia")
|
||||
public Object[] getEssentiaAmount(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.getEssentiaAmount(ForgeDirection.getOrientation(arguments.checkInteger(0))) };
|
||||
}
|
||||
|
||||
@Callback(doc="function():number -- returns minimum suction")
|
||||
public Object[] getMinimumSuction(final Context context,final Arguments arguments)
|
||||
{
|
||||
return new Object[] { this.tileEntity.getMinimumSuction() };
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
-25
@@ -11,21 +11,21 @@
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [Dec 11, 2013, 10:03:09 PM (GMT)]
|
||||
*//*
|
||||
*/
|
||||
|
||||
package vazkii.tinkerer.common.block.tile.peripheral;
|
||||
|
||||
import dan200.computercraft.api.lua.ILuaContext;
|
||||
import dan200.computercraft.api.peripheral.IComputerAccess;
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import thaumcraft.common.items.equipment.ItemElementalPickaxe;
|
||||
import thaumcraft.common.tiles.TileArcaneBore;
|
||||
import IComputerAccess;
|
||||
import IHostedPeripheral;
|
||||
import ILuaContext;
|
||||
|
||||
public class PeripheralArcaneBore implements IHostedPeripheral {
|
||||
|
||||
public class PeripheralArcaneBore implements IPeripheral {
|
||||
|
||||
TileArcaneBore bore;
|
||||
|
||||
@@ -63,11 +63,6 @@ public class PeripheralArcaneBore implements IHostedPeripheral {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttachToSide(int side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attach(IComputerAccess computer) {
|
||||
// NO-OP
|
||||
@@ -78,20 +73,10 @@ public class PeripheralArcaneBore implements IHostedPeripheral {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
// NO-OP
|
||||
}
|
||||
@Override
|
||||
public boolean equals(IPeripheral other) {
|
||||
return this.equals((Object)other);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
+12
-23
@@ -11,17 +11,17 @@
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [Dec 11, 2013, 9:41:49 PM (GMT)]
|
||||
*//*
|
||||
*/
|
||||
|
||||
package vazkii.tinkerer.common.block.tile.peripheral;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import dan200.computercraft.api.lua.ILuaContext;
|
||||
import dan200.computercraft.api.peripheral.IComputerAccess;
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import thaumcraft.common.tiles.TileSensor;
|
||||
import IComputerAccess;
|
||||
import IHostedPeripheral;
|
||||
import ILuaContext;
|
||||
|
||||
public class PeripheralArcaneEar implements IHostedPeripheral {
|
||||
|
||||
public class PeripheralArcaneEar implements IPeripheral {
|
||||
|
||||
TileSensor ear;
|
||||
|
||||
@@ -50,10 +50,7 @@ public class PeripheralArcaneEar implements IHostedPeripheral {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttachToSide(int side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void attach(IComputerAccess computer) {
|
||||
@@ -65,20 +62,12 @@ public class PeripheralArcaneEar implements IHostedPeripheral {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
// NO-OP
|
||||
}
|
||||
@Override
|
||||
public boolean equals(IPeripheral other) {
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||
// NO-OP
|
||||
}
|
||||
return this.equals((Object)other);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
+11
-25
@@ -11,17 +11,17 @@
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [Dec 11, 2013, 9:36:45 PM (GMT)]
|
||||
*//*
|
||||
*/
|
||||
|
||||
package vazkii.tinkerer.common.block.tile.peripheral;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import dan200.computercraft.api.lua.ILuaContext;
|
||||
import dan200.computercraft.api.peripheral.IComputerAccess;
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import thaumcraft.common.tiles.TileJarBrain;
|
||||
import IComputerAccess;
|
||||
import IHostedPeripheral;
|
||||
import ILuaContext;
|
||||
|
||||
public class PeripheralBrainInAJar implements IHostedPeripheral {
|
||||
|
||||
public class PeripheralBrainInAJar implements IPeripheral {
|
||||
|
||||
TileJarBrain jar;
|
||||
|
||||
@@ -44,11 +44,6 @@ public class PeripheralBrainInAJar implements IHostedPeripheral {
|
||||
return new Object[] { jar.xp };
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttachToSide(int side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attach(IComputerAccess computer) {
|
||||
// NO-OP
|
||||
@@ -59,20 +54,11 @@ public class PeripheralBrainInAJar implements IHostedPeripheral {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
// NO-OP
|
||||
}
|
||||
@Override
|
||||
public boolean equals(IPeripheral other) {
|
||||
return this.equals((Object)other);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
+11
-25
@@ -11,17 +11,17 @@
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [13 Sep 2013, 01:10:52 (GMT)]
|
||||
*//*
|
||||
*/
|
||||
|
||||
package vazkii.tinkerer.common.block.tile.peripheral;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import dan200.computercraft.api.lua.ILuaContext;
|
||||
import dan200.computercraft.api.peripheral.IComputerAccess;
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import thaumcraft.common.tiles.TileDeconstructionTable;
|
||||
import IComputerAccess;
|
||||
import IHostedPeripheral;
|
||||
import ILuaContext;
|
||||
|
||||
public class PeripheralDeconstructor implements IHostedPeripheral {
|
||||
|
||||
public class PeripheralDeconstructor implements IPeripheral {
|
||||
|
||||
TileDeconstructionTable deconstructor;
|
||||
|
||||
@@ -50,10 +50,6 @@ public class PeripheralDeconstructor implements IHostedPeripheral {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttachToSide(int side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attach(IComputerAccess computer) {
|
||||
@@ -65,20 +61,10 @@ public class PeripheralDeconstructor implements IHostedPeripheral {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
// NO-OP
|
||||
}
|
||||
@Override
|
||||
public boolean equals(IPeripheral other) {
|
||||
return this.equals((Object)other);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
+23
-43
@@ -1,49 +1,29 @@
|
||||
/*
|
||||
|
||||
package vazkii.tinkerer.common.block.tile.peripheral;
|
||||
|
||||
import IComputerAccess;
|
||||
import IHostedPeripheral;
|
||||
import ILuaContext;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.passive.EntityCow;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
import dan200.computercraft.api.lua.ILuaContext;
|
||||
import dan200.computercraft.api.peripheral.IComputerAccess;
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import thaumcraft.api.aspects.IEssentiaTransport;
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* Created by Katrina on 03/03/14.
|
||||
*//*
|
||||
*/
|
||||
|
||||
public class PeripheralEssentiaTransport implements IHostedPeripheral {
|
||||
public class PeripheralEssentiaTransport implements IPeripheral {
|
||||
|
||||
IEssentiaTransport pipe;
|
||||
public PeripheralEssentiaTransport(IEssentiaTransport input)
|
||||
{
|
||||
pipe=input;
|
||||
|
||||
public PeripheralEssentiaTransport(IEssentiaTransport input) {
|
||||
pipe = input;
|
||||
}
|
||||
|
||||
public static int GetDirection(Object obj) {
|
||||
Double num = (Double) obj;
|
||||
return (int) num.intValue();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
|
||||
public static int GetDirection(Object obj) {
|
||||
Double num = (Double) obj;
|
||||
return (int) num.intValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,8 +38,7 @@ public static int GetDirection(Object obj) {
|
||||
|
||||
@Override
|
||||
public Object[] callMethod(IComputerAccess computer, ILuaContext context, int method, Object[] arguments) throws Exception {
|
||||
switch(method)
|
||||
{
|
||||
switch (method) {
|
||||
case 0:
|
||||
return new Object[]{pipe.isConnectable(ForgeDirection.getOrientation(GetDirection(arguments[0])))};
|
||||
case 1:
|
||||
@@ -80,10 +59,7 @@ public static int GetDirection(Object obj) {
|
||||
return new Object[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttachToSide(int side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@@ -95,5 +71,9 @@ public static int GetDirection(Object obj) {
|
||||
public void detach(IComputerAccess computer) {
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean equals(IPeripheral other) {
|
||||
return this.equals((Object)other);
|
||||
}
|
||||
}
|
||||
@@ -11,24 +11,25 @@
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [13 Sep 2013, 00:56:19 (GMT)]
|
||||
*//*
|
||||
*/
|
||||
|
||||
package vazkii.tinkerer.common.block.tile.peripheral;
|
||||
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import dan200.computercraft.api.peripheral.IPeripheralProvider;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.aspects.IAspectContainer;
|
||||
import thaumcraft.api.aspects.IEssentiaTransport;
|
||||
import thaumcraft.common.tiles.*;
|
||||
import vazkii.tinkerer.common.block.tile.transvector.TileTransvectorInterface;
|
||||
import IHostedPeripheral;
|
||||
import IPeripheralHandler;
|
||||
import thaumcraft.common.tiles.TileArcaneBore;
|
||||
import thaumcraft.common.tiles.TileDeconstructionTable;
|
||||
import thaumcraft.common.tiles.TileJarBrain;
|
||||
import thaumcraft.common.tiles.TileSensor;
|
||||
|
||||
public final class PeripheralHandler implements IPeripheralHandler {
|
||||
|
||||
@Override
|
||||
public IHostedPeripheral getPeripheral(TileEntity tile) {
|
||||
if(tile instanceof TileTransvectorInterface)
|
||||
return new PeripheralTransvectorInterface((TileTransvectorInterface) tile);
|
||||
public final class PeripheralHandler implements IPeripheralProvider {
|
||||
|
||||
public IPeripheral getPeripheral(TileEntity tile) {
|
||||
|
||||
if(tile instanceof IAspectContainer)
|
||||
return new PeripheralAspectContainer((IAspectContainer) tile);
|
||||
@@ -50,5 +51,12 @@ public final class PeripheralHandler implements IPeripheralHandler {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPeripheral getPeripheral(World world, int x, int y, int z, int side) {
|
||||
TileEntity te=world.getTileEntity(x,y,z);
|
||||
if(te!=null)
|
||||
return getPeripheral(te);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
/*
|
||||
|
||||
package vazkii.tinkerer.common.compat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import vazkii.tinkerer.common.block.tile.TileMagnet;
|
||||
import vazkii.tinkerer.common.block.tile.TileMobMagnet;
|
||||
import vazkii.tinkerer.common.item.ItemSoulMould;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import java.util.List;
|
||||
|
||||
public class MagnetProvider implements IWailaDataProvider {
|
||||
|
||||
@@ -83,4 +82,3 @@ public class MagnetProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
@@ -0,0 +1,12 @@
|
||||
package vazkii.tinkerer.common.compat;
|
||||
|
||||
/**
|
||||
* Created by Katrina on 22/04/14.
|
||||
*/
|
||||
public class OCCompat {
|
||||
public static void InitOC()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +1,25 @@
|
||||
/*
|
||||
|
||||
package vazkii.tinkerer.common.compat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import vazkii.tinkerer.common.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.common.block.ModBlocks;
|
||||
import vazkii.tinkerer.common.block.tile.TileRepairer;
|
||||
import vazkii.tinkerer.common.block.tile.kami.TileWarpGate;
|
||||
import vazkii.tinkerer.common.block.tile.tablet.TileAnimationTablet;
|
||||
import vazkii.tinkerer.common.block.tile.transvector.TileTransvectorInterface;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import vazkii.tinkerer.common.block.BlockAnimationTablet;
|
||||
import vazkii.tinkerer.common.block.BlockMagnet;
|
||||
import vazkii.tinkerer.common.block.BlockRepairer;
|
||||
import vazkii.tinkerer.common.block.ModBlocks;
|
||||
import vazkii.tinkerer.common.block.kami.BlockWarpGate;
|
||||
import vazkii.tinkerer.common.block.tile.TileRepairer;
|
||||
import vazkii.tinkerer.common.block.tile.kami.TileWarpGate;
|
||||
import vazkii.tinkerer.common.block.tile.tablet.TileAnimationTablet;
|
||||
import vazkii.tinkerer.common.block.tile.transvector.TileTransvectorInterface;
|
||||
import vazkii.tinkerer.common.block.transvector.BlockTransvectorInterface;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TTinkererProvider implements IWailaDataProvider {
|
||||
|
||||
@@ -118,11 +120,12 @@ public class TTinkererProvider implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
public static void callbackRegister(IWailaRegistrar registrar) {
|
||||
registrar.registerBodyProvider(new TTinkererProvider(),ModBlocks.animationTablet.blockID);
|
||||
registrar.registerBodyProvider(new TTinkererProvider(),ModBlocks.interfase.blockID);
|
||||
registrar.registerBodyProvider(new TTinkererProvider(),ModBlocks.repairer.blockID);
|
||||
registrar.registerBodyProvider(new TTinkererProvider(),ModBlocks.warpGate.blockID);
|
||||
registrar.registerBodyProvider(new MagnetProvider(), ModBlocks.magnet.blockID);
|
||||
registrar.registerBodyProvider(new TTinkererProvider(),BlockAnimationTablet.class);
|
||||
registrar.registerBodyProvider(new TTinkererProvider(),BlockTransvectorInterface.class);
|
||||
registrar.registerBodyProvider(new TTinkererProvider(), BlockRepairer.class);
|
||||
registrar.registerBodyProvider(new TTinkererProvider(), BlockWarpGate.class);
|
||||
registrar.registerBodyProvider(new MagnetProvider(), BlockMagnet.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}*/
|
||||
@@ -27,8 +27,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import vazkii.tinkerer.common.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.common.block.ModBlocks;
|
||||
import vazkii.tinkerer.common.block.tile.peripheral.OpenComputers.DriverArcaneEar;
|
||||
import vazkii.tinkerer.common.block.tile.peripheral.OpenComputers.DriverIAspectContainer;
|
||||
import vazkii.tinkerer.common.block.tile.peripheral.OpenComputers.*;
|
||||
import vazkii.tinkerer.common.core.handler.ConfigHandler;
|
||||
import vazkii.tinkerer.common.core.handler.kami.DimensionalShardDropHandler;
|
||||
import vazkii.tinkerer.common.core.handler.kami.KamiArmorHandler;
|
||||
@@ -120,6 +119,10 @@ public class TTCommonProxy {
|
||||
{
|
||||
Driver.add(new DriverIAspectContainer());
|
||||
Driver.add(new DriverArcaneEar());
|
||||
Driver.add(new DriverBrainInAJar());
|
||||
Driver.add(new DriverDeconstructor());
|
||||
Driver.add(new DriverEssentiaTransport());
|
||||
Driver.add(new DriverArcaneBore());
|
||||
|
||||
}
|
||||
public boolean isClient() {
|
||||
|
||||
Reference in new issue
Block a user