mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
yay
ough 3
This commit is contained in:
parent
3a0523462c
commit
b127041ffe
@ -16,6 +16,7 @@ import com.hbm.tileentity.machine.albion.TileEntityPASource.Particle;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -31,7 +32,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityPADetector extends TileEntityCooledBase implements IGUIProvider, IParticleUser, SimpleComponent, CompatHandler.OCComponent {
|
||||
public class TileEntityPADetector extends TileEntityCooledBase implements IGUIProvider, IParticleUser, SimpleComponent, CompatHandler.OCComponent, IRORValueProvider {
|
||||
|
||||
public static final long usage = 100_000;
|
||||
|
||||
@ -186,6 +187,20 @@ public class TileEntityPADetector extends TileEntityCooledBase implements IGUIPr
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFunctionInfo() {
|
||||
return new String[] {
|
||||
PREFIX_VALUE + "pfmcold",
|
||||
PREFIX_VALUE + "pfm",
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public String provideRORValue(String name) {
|
||||
if((PREFIX_VALUE + "pfmcold").equals(name)) return "" + coolantTanks[0].getFill();
|
||||
if((PREFIX_VALUE + "pfm").equals(name)) return "" + coolantTanks[1].getFill();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockPos getExitPos(Particle particle) {
|
||||
return null;
|
||||
|
||||
@ -16,6 +16,7 @@ import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||
import api.hbm.redstoneoverradio.IRORInteractive;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -35,7 +36,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProvider, IControlReceiver, IParticleUser, OCComponent, SimpleComponent, IRORInteractive {
|
||||
public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProvider, IControlReceiver, IParticleUser, OCComponent, SimpleComponent, IRORInteractive, IRORValueProvider {
|
||||
|
||||
public int dirLower;
|
||||
public int dirUpper;
|
||||
@ -392,9 +393,18 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
|
||||
public String[] getFunctionInfo() {
|
||||
return new String[] {
|
||||
PREFIX_FUNCTION + "setthreshold" + NAME_SEPARATOR + "threshold",
|
||||
PREFIX_VALUE + "pfmcold",
|
||||
PREFIX_VALUE + "pfm"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String provideRORValue(String name) {
|
||||
if((PREFIX_VALUE + "pfmcold").equals(name)) return "" + coolantTanks[0].getFill();
|
||||
if((PREFIX_VALUE + "pfm").equals(name)) return "" + coolantTanks[1].getFill();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String runRORFunction(String name, String[] params) {
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -27,7 +28,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityPAQuadrupole extends TileEntityCooledBase implements IGUIProvider, IParticleUser, SimpleComponent, CompatHandler.OCComponent {
|
||||
public class TileEntityPAQuadrupole extends TileEntityCooledBase implements IGUIProvider, IParticleUser, SimpleComponent, CompatHandler.OCComponent, IRORValueProvider {
|
||||
|
||||
public static final long usage = 100_000;
|
||||
public static final int focusGain = 100;
|
||||
@ -137,6 +138,20 @@ public class TileEntityPAQuadrupole extends TileEntityCooledBase implements IGUI
|
||||
return new GUIPAQuadrupole(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFunctionInfo() {
|
||||
return new String[] {
|
||||
PREFIX_VALUE + "pfmcold",
|
||||
PREFIX_VALUE + "pfm",
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public String provideRORValue(String name) {
|
||||
if((PREFIX_VALUE + "pfmcold").equals(name)) return "" + coolantTanks[0].getFill();
|
||||
if((PREFIX_VALUE + "pfm").equals(name)) return "" + coolantTanks[1].getFill();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public String getComponentName() {
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.tileentity.machine.albion.TileEntityPASource.Particle;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -24,7 +25,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityPARFC extends TileEntityCooledBase implements IGUIProvider, IParticleUser, SimpleComponent, CompatHandler.OCComponent {
|
||||
public class TileEntityPARFC extends TileEntityCooledBase implements IGUIProvider, IParticleUser, SimpleComponent, CompatHandler.OCComponent, IRORValueProvider {
|
||||
|
||||
public static final long usage = 250_000;
|
||||
public static final int momentumGain = 100;
|
||||
@ -129,6 +130,20 @@ public class TileEntityPARFC extends TileEntityCooledBase implements IGUIProvide
|
||||
return new GUIPARFC(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFunctionInfo() {
|
||||
return new String[] {
|
||||
PREFIX_VALUE + "pfmcold",
|
||||
PREFIX_VALUE + "pfm",
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public String provideRORValue(String name) {
|
||||
if((PREFIX_VALUE + "pfmcold").equals(name)) return "" + coolantTanks[0].getFill();
|
||||
if((PREFIX_VALUE + "pfm").equals(name)) return "" + coolantTanks[1].getFill();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public String getComponentName() {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.tileentity.machine.albion;
|
||||
|
||||
import api.hbm.redstoneoverradio.IRORInteractive;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
@ -12,6 +13,8 @@ import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
import api.hbm.redstoneoverradio.IRORValueProvider;
|
||||
import api.hbm.redstoneoverradio.IRORInteractive;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -32,7 +35,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public class TileEntityPASource extends TileEntityCooledBase implements IGUIProvider, IConditionalInvAccess, IControlReceiver, SimpleComponent, CompatHandler.OCComponent {
|
||||
public class TileEntityPASource extends TileEntityCooledBase implements IGUIProvider, IConditionalInvAccess, IControlReceiver, SimpleComponent, CompatHandler.OCComponent, IRORValueProvider, IRORInteractive {
|
||||
|
||||
public static final long usage = 100_000;
|
||||
public Particle particle;
|
||||
@ -448,4 +451,38 @@ public class TileEntityPASource extends TileEntityCooledBase implements IGUIProv
|
||||
if(this.defocus < 0) this.defocus = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getFunctionInfo() {
|
||||
return new String[] {
|
||||
PREFIX_VALUE + "status",
|
||||
PREFIX_VALUE + "momentum",
|
||||
PREFIX_VALUE + "defocus",
|
||||
PREFIX_VALUE + "pfmcold",
|
||||
PREFIX_VALUE + "pfm",
|
||||
PREFIX_FUNCTION + "cancel"
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public String provideRORValue(String name) {
|
||||
if((PREFIX_VALUE + "status").equals(name)) return "" + this.state;
|
||||
if((PREFIX_VALUE + "momentum").equals(name)) return "" + this.lastSpeed;
|
||||
if((PREFIX_VALUE + "defocus").equals(name)) {
|
||||
return this.particle != null ? "" + this.particle.defocus : "0";
|
||||
}
|
||||
if((PREFIX_VALUE + "pfmcold").equals(name)) return "" + coolantTanks[0].getFill();
|
||||
if((PREFIX_VALUE + "pfm").equals(name)) return "" + coolantTanks[1].getFill();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String runRORFunction(String name, String[] params) {
|
||||
|
||||
if ((PREFIX_FUNCTION + "cancel").equals(name)) {
|
||||
particle = null;
|
||||
state = PAState.IDLE;
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user