mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge pull request #2185 from Kirby7871/master
New OC functions for radar, launch pad and turrets.
This commit is contained in:
commit
0c0c9d02d7
@ -528,6 +528,12 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
||||
return new Object[] {false};
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getPos(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public String[] methods() {
|
||||
@ -536,7 +542,8 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
||||
"getFluid",
|
||||
"canLaunch",
|
||||
"getTier",
|
||||
"launch"
|
||||
"launch",
|
||||
"getPos"
|
||||
};
|
||||
}
|
||||
|
||||
@ -554,6 +561,8 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
||||
return getTier(context, args);
|
||||
case ("launch"):
|
||||
return launch(context, args);
|
||||
case ("getPos"):
|
||||
return getPos(context, args);
|
||||
}
|
||||
throw new NoSuchMethodException();
|
||||
}
|
||||
|
||||
@ -694,6 +694,12 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
return new Object[]{false, e.posX, e.posY, e.posZ, type};
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getPos(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public String[] methods() {
|
||||
@ -706,7 +712,8 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
"getAmount",
|
||||
"isIndexPlayer",
|
||||
"getIndexType",
|
||||
"getEntityAtIndex"
|
||||
"getEntityAtIndex",
|
||||
"getPos"
|
||||
};
|
||||
}
|
||||
|
||||
@ -732,6 +739,8 @@ public class TileEntityMachineRadarNT extends TileEntityMachineBase implements I
|
||||
return getIndexType(context, args);
|
||||
case ("getEntityAtIndex"):
|
||||
return getEntityAtIndex(context, args);
|
||||
case("getPos"):
|
||||
return getPos(context, args);
|
||||
}
|
||||
throw new NoSuchMethodException();
|
||||
}
|
||||
|
||||
@ -995,6 +995,12 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
|
||||
return new Object[] {this.aligned};
|
||||
}
|
||||
|
||||
@Callback(direct = true)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] getPos(Context context, Arguments args) {
|
||||
return new Object[] {xCoord, yCoord, zCoord};
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public boolean canConnectNode(ForgeDirection side) {
|
||||
@ -1015,7 +1021,8 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
|
||||
"getTargeting",
|
||||
"hasTarget",
|
||||
"getAngle",
|
||||
"isAligned"
|
||||
"isAligned",
|
||||
"getPos"
|
||||
};
|
||||
}
|
||||
|
||||
@ -1045,6 +1052,8 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
|
||||
return getAngle(context, args);
|
||||
case "isAligned":
|
||||
return isAligned(context, args);
|
||||
case "getPos":
|
||||
return getPos(context, args);
|
||||
}
|
||||
throw new NoSuchMethodException();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user