2015-08-29 14:33:25 +02:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("TileEntityBase.java") is part of the Actually Additions mod for Minecraft.
|
2015-08-29 14:33:25 +02:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2015-08-29 14:33:25 +02:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2016-05-16 22:54:42 +02:00
|
|
|
* © 2015-2016 Ellpeck
|
2015-08-29 14:33:25 +02:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.tile;
|
2014-12-12 15:40:01 +01:00
|
|
|
|
2016-07-25 02:07:16 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
2016-01-05 04:47:35 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
2016-01-17 20:46:51 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.network.PacketHandler;
|
2016-06-15 16:43:59 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.network.PacketServerToClient;
|
2016-01-05 04:47:35 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
2016-06-17 13:25:15 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
2016-06-17 14:00:52 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.compat.TeslaUtil;
|
2016-01-07 23:42:42 +01:00
|
|
|
import net.minecraft.block.state.IBlockState;
|
2016-05-06 23:23:29 +02:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2015-06-15 22:06:07 +02:00
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
|
|
import net.minecraft.network.NetworkManager;
|
2016-03-18 23:47:22 +01:00
|
|
|
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
|
2014-12-12 15:40:01 +01:00
|
|
|
import net.minecraft.tileentity.TileEntity;
|
2016-06-05 02:16:52 +02:00
|
|
|
import net.minecraft.util.EnumFacing;
|
2016-01-07 23:42:42 +01:00
|
|
|
import net.minecraft.util.ITickable;
|
2016-03-18 23:47:22 +01:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2016-07-03 21:57:33 +02:00
|
|
|
import net.minecraft.util.text.ITextComponent;
|
|
|
|
import net.minecraft.util.text.TextComponentTranslation;
|
2015-03-07 02:23:31 +01:00
|
|
|
import net.minecraft.world.World;
|
2016-06-05 02:16:52 +02:00
|
|
|
import net.minecraftforge.common.capabilities.Capability;
|
|
|
|
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
|
|
|
import net.minecraftforge.fluids.capability.IFluidHandler;
|
2016-01-17 20:46:51 +01:00
|
|
|
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
2016-01-07 18:20:59 +01:00
|
|
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
2014-12-12 15:40:01 +01:00
|
|
|
|
2016-01-07 23:42:42 +01:00
|
|
|
public abstract class TileEntityBase extends TileEntity implements ITickable{
|
2015-06-15 22:06:07 +02:00
|
|
|
|
2016-07-07 17:59:45 +02:00
|
|
|
public final String name;
|
2016-06-01 00:39:35 +02:00
|
|
|
public boolean isRedstonePowered;
|
2016-07-02 15:01:46 +02:00
|
|
|
public boolean isPulseMode;
|
2016-05-07 02:49:03 +02:00
|
|
|
protected int ticksElapsed;
|
2015-11-18 23:11:24 +01:00
|
|
|
|
2016-09-09 18:40:09 +02:00
|
|
|
protected TileEntity[] tilesAround = new TileEntity[6];
|
|
|
|
protected boolean hasCheckedHandlersAround;
|
|
|
|
|
2016-05-06 23:23:29 +02:00
|
|
|
public TileEntityBase(String name){
|
2016-07-03 21:57:33 +02:00
|
|
|
this.name = name;
|
2016-05-06 23:23:29 +02:00
|
|
|
}
|
|
|
|
|
2014-12-18 19:24:06 +01:00
|
|
|
public static void init(){
|
2015-07-01 21:32:48 +02:00
|
|
|
ModUtil.LOGGER.info("Registering TileEntities...");
|
2015-11-14 21:27:36 +01:00
|
|
|
|
2016-08-03 04:01:47 +02:00
|
|
|
//TODO Remove legacy names at some point
|
2016-07-03 21:57:33 +02:00
|
|
|
register(TileEntityCompost.class, "Compost");
|
|
|
|
register(TileEntityFeeder.class, "Feeder");
|
|
|
|
register(TileEntityGiantChest.class, "GiantChest");
|
|
|
|
register(TileEntityGiantChestMedium.class, "GiantChestMedium");
|
|
|
|
register(TileEntityGiantChestLarge.class, "GiantChestLarge");
|
|
|
|
register(TileEntityGrinder.class, "Grinder");
|
|
|
|
register(TileEntityFurnaceDouble.class, "FurnaceDouble");
|
|
|
|
register(TileEntityInputter.class, "Inputter");
|
|
|
|
register(TileEntityFishingNet.class, "FishingNet");
|
|
|
|
register(TileEntityFurnaceSolar.class, "FurnaceSolar");
|
|
|
|
register(TileEntityHeatCollector.class, "HeatCollector");
|
|
|
|
register(TileEntityItemRepairer.class, "Repairer");
|
|
|
|
register(TileEntityGreenhouseGlass.class, "GreenhouseGlass");
|
|
|
|
register(TileEntityBreaker.class, "Breaker");
|
|
|
|
register(TileEntityDropper.class, "Dropper");
|
|
|
|
register(TileEntityInputterAdvanced.class, "InputterAdvanced");
|
|
|
|
register(TileEntityPlacer.class, "Placer");
|
|
|
|
register(TileEntityGrinderDouble.class, "GrinderDouble");
|
|
|
|
register(TileEntityCanolaPress.class, "CanolaPress");
|
|
|
|
register(TileEntityFermentingBarrel.class, "FermentingBarrel");
|
|
|
|
register(TileEntityOilGenerator.class, "OilGenerator");
|
|
|
|
register(TileEntityCoalGenerator.class, "CoalGenerator");
|
|
|
|
register(TileEntityPhantomItemface.class, "PhantomItemface");
|
|
|
|
register(TileEntityPhantomLiquiface.class, "PhantomLiquiface");
|
|
|
|
register(TileEntityPhantomEnergyface.class, "PhantomEnergyface");
|
|
|
|
register(TileEntityPlayerInterface.class, "PlayerInterface");
|
|
|
|
register(TileEntityPhantomPlacer.class, "PhantomPlacer");
|
|
|
|
register(TileEntityPhantomBreaker.class, "PhantomBreaker");
|
|
|
|
register(TileEntityFluidCollector.class, "FluidCollector");
|
|
|
|
register(TileEntityFluidPlacer.class, "FluidPlacer");
|
|
|
|
register(TileEntityLavaFactoryController.class, "LavaFactoryController");
|
|
|
|
register(TileEntityCoffeeMachine.class, "CoffeeMachine");
|
|
|
|
register(TileEntityPhantomBooster.class, "PhantomBooster");
|
|
|
|
register(TileEntityEnergizer.class, "Energizer");
|
|
|
|
register(TileEntityEnervator.class, "Enervator");
|
|
|
|
register(TileEntityXPSolidifier.class, "XPSolidifier");
|
|
|
|
register(TileEntitySmileyCloud.class, "Cloud");
|
|
|
|
register(TileEntityLeafGenerator.class, "LeafGenerator");
|
|
|
|
register(TileEntityDirectionalBreaker.class, "DirectionalBreaker");
|
|
|
|
register(TileEntityRangedCollector.class, "RangedCollector");
|
|
|
|
register(TileEntityAtomicReconstructor.class, "AtomicReconstructor");
|
|
|
|
register(TileEntityMiner.class, "Miner");
|
|
|
|
register(TileEntityFireworkBox.class, "FireworkBox");
|
|
|
|
register(TileEntityPhantomRedstoneface.class, "PhantomRedstoneface");
|
|
|
|
register(TileEntityLaserRelayItem.class, "LaserRelayItem");
|
|
|
|
register(TileEntityLaserRelayEnergy.class, "LaserRelay");
|
2016-07-14 16:44:01 +02:00
|
|
|
register(TileEntityLaserRelayEnergyAdvanced.class);
|
|
|
|
register(TileEntityLaserRelayEnergyExtreme.class);
|
2016-07-03 21:57:33 +02:00
|
|
|
register(TileEntityLaserRelayItemWhitelist.class, "LaserRelayItemWhitelist");
|
|
|
|
register(TileEntityItemViewer.class, "ItemViewer");
|
|
|
|
register(TileEntityBookletStand.class, "BookletStand");
|
|
|
|
register(TileEntityDisplayStand.class, "DisplayStand");
|
|
|
|
register(TileEntityShockSuppressor.class, "ShockSuppressor");
|
2016-08-03 04:01:47 +02:00
|
|
|
register(TileEntityEmpowerer.class);
|
2016-09-01 20:41:50 +02:00
|
|
|
register(TileEntityLaserRelayFluids.class);
|
2014-12-18 19:24:06 +01:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
|
2016-07-03 21:57:33 +02:00
|
|
|
private static void register(Class<? extends TileEntityBase> tileClass, String legacyName){
|
|
|
|
try{
|
|
|
|
//This is hacky and dirty but it works so whatever
|
|
|
|
String name = ModUtil.MOD_ID+":"+tileClass.newInstance().name;
|
2016-07-14 16:44:01 +02:00
|
|
|
|
|
|
|
if(legacyName != null && !legacyName.isEmpty()){
|
|
|
|
String oldName = ModUtil.MOD_ID+":tileEntity"+legacyName;
|
|
|
|
GameRegistry.registerTileEntityWithAlternatives(tileClass, name, oldName);
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
GameRegistry.registerTileEntity(tileClass, name);
|
|
|
|
}
|
2016-07-03 21:57:33 +02:00
|
|
|
}
|
|
|
|
catch(Exception e){
|
|
|
|
ModUtil.LOGGER.fatal("Registering a TileEntity failed!", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-14 16:44:01 +02:00
|
|
|
private static void register(Class<? extends TileEntityBase> tileClass){
|
|
|
|
register(tileClass, null);
|
|
|
|
}
|
|
|
|
|
2015-10-18 15:28:06 +02:00
|
|
|
@Override
|
2016-09-01 17:08:34 +02:00
|
|
|
public final NBTTagCompound writeToNBT(NBTTagCompound compound){
|
2016-07-02 15:01:46 +02:00
|
|
|
this.writeSyncableNBT(compound, NBTType.SAVE_TILE);
|
2016-05-26 13:10:14 +02:00
|
|
|
return compound;
|
2015-10-18 15:28:06 +02:00
|
|
|
}
|
|
|
|
|
2015-10-03 10:16:18 +02:00
|
|
|
@Override
|
2016-09-01 17:08:34 +02:00
|
|
|
public final void readFromNBT(NBTTagCompound compound){
|
|
|
|
this.readSyncableNBT(compound, NBTType.SAVE_TILE);
|
2015-10-03 10:16:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-09-01 17:08:34 +02:00
|
|
|
public final SPacketUpdateTileEntity getUpdatePacket(){
|
|
|
|
NBTTagCompound compound = new NBTTagCompound();
|
|
|
|
this.writeSyncableNBT(compound, NBTType.SYNC);
|
|
|
|
return new SPacketUpdateTileEntity(this.pos, -1, compound);
|
2015-10-03 10:16:18 +02:00
|
|
|
}
|
|
|
|
|
2016-09-01 17:08:34 +02:00
|
|
|
@Override
|
|
|
|
public final void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt){
|
|
|
|
this.readSyncableNBT(pkt.getNbtCompound(), NBTType.SYNC);
|
2016-02-01 17:49:55 +01:00
|
|
|
}
|
|
|
|
|
2016-05-26 13:10:14 +02:00
|
|
|
@Override
|
2016-09-01 17:08:34 +02:00
|
|
|
public final NBTTagCompound getUpdateTag(){
|
2016-08-14 11:43:59 +02:00
|
|
|
NBTTagCompound compound = new NBTTagCompound();
|
|
|
|
this.writeSyncableNBT(compound, NBTType.SYNC);
|
|
|
|
return compound;
|
2016-02-01 17:49:55 +01:00
|
|
|
}
|
|
|
|
|
2016-06-04 00:26:33 +02:00
|
|
|
@Override
|
2016-08-14 11:43:59 +02:00
|
|
|
public final void handleUpdateTag(NBTTagCompound compound){
|
2016-09-01 17:08:34 +02:00
|
|
|
this.readSyncableNBT(compound, NBTType.SYNC);
|
2016-06-04 00:26:33 +02:00
|
|
|
}
|
|
|
|
|
2016-09-01 17:08:34 +02:00
|
|
|
public final void sendUpdate(){
|
|
|
|
if(!this.worldObj.isRemote){
|
|
|
|
NBTTagCompound compound = new NBTTagCompound();
|
|
|
|
this.writeSyncableNBT(compound, NBTType.SYNC);
|
|
|
|
|
|
|
|
NBTTagCompound data = new NBTTagCompound();
|
|
|
|
data.setTag("Data", compound);
|
|
|
|
data.setInteger("X", this.pos.getX());
|
|
|
|
data.setInteger("Y", this.pos.getY());
|
|
|
|
data.setInteger("Z", this.pos.getZ());
|
|
|
|
PacketHandler.theNetwork.sendToAllAround(new PacketServerToClient(data, PacketHandler.TILE_ENTITY_HANDLER), new NetworkRegistry.TargetPoint(this.worldObj.provider.getDimension(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), 128));
|
|
|
|
}
|
2016-07-06 21:56:15 +02:00
|
|
|
}
|
|
|
|
|
2016-07-02 15:01:46 +02:00
|
|
|
public void writeSyncableNBT(NBTTagCompound compound, NBTType type){
|
2016-09-01 20:41:50 +02:00
|
|
|
if(type != NBTType.SAVE_BLOCK){
|
|
|
|
super.writeToNBT(compound);
|
|
|
|
}
|
2016-08-14 11:43:59 +02:00
|
|
|
|
2016-07-02 15:01:46 +02:00
|
|
|
if(type == NBTType.SAVE_TILE){
|
2016-05-26 13:10:14 +02:00
|
|
|
compound.setBoolean("Redstone", this.isRedstonePowered);
|
2016-07-22 20:23:51 +02:00
|
|
|
compound.setInteger("TicksElapsed", this.ticksElapsed);
|
2016-05-26 13:10:14 +02:00
|
|
|
}
|
2016-07-02 15:01:46 +02:00
|
|
|
if(this.isRedstoneToggle() && (type != NBTType.SAVE_BLOCK || this.isPulseMode)){
|
|
|
|
compound.setBoolean("IsPulseMode", this.isPulseMode);
|
2015-12-21 22:18:33 +01:00
|
|
|
}
|
2015-12-01 19:48:09 +01:00
|
|
|
}
|
|
|
|
|
2016-07-02 15:01:46 +02:00
|
|
|
public void readSyncableNBT(NBTTagCompound compound, NBTType type){
|
2016-09-01 20:41:50 +02:00
|
|
|
if(type != NBTType.SAVE_BLOCK){
|
|
|
|
super.readFromNBT(compound);
|
|
|
|
}
|
2016-08-14 11:43:59 +02:00
|
|
|
|
2016-07-02 15:01:46 +02:00
|
|
|
if(type == NBTType.SAVE_TILE){
|
2016-05-26 13:10:14 +02:00
|
|
|
this.isRedstonePowered = compound.getBoolean("Redstone");
|
2016-07-22 20:23:51 +02:00
|
|
|
this.ticksElapsed = compound.getInteger("TicksElapsed");
|
2016-05-26 13:10:14 +02:00
|
|
|
}
|
2016-07-02 15:01:46 +02:00
|
|
|
if(this.isRedstoneToggle()){
|
|
|
|
this.isPulseMode = compound.getBoolean("IsPulseMode");
|
2015-12-21 22:18:33 +01:00
|
|
|
}
|
2015-10-21 00:22:50 +02:00
|
|
|
}
|
2015-10-18 15:31:01 +02:00
|
|
|
|
2016-02-01 17:49:55 +01:00
|
|
|
@Override
|
2016-09-01 17:08:34 +02:00
|
|
|
public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState){
|
|
|
|
return !oldState.getBlock().isAssociatedBlock(newState.getBlock());
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ITextComponent getDisplayName(){
|
|
|
|
return new TextComponentTranslation("container."+ModUtil.MOD_ID+"."+this.name+".name");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public final void update(){
|
2016-02-01 17:49:55 +01:00
|
|
|
this.updateEntity();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void updateEntity(){
|
|
|
|
this.ticksElapsed++;
|
2016-06-17 13:25:15 +02:00
|
|
|
|
|
|
|
if(!this.worldObj.isRemote){
|
2016-08-31 20:16:36 +02:00
|
|
|
if(this instanceof ISharingEnergyProvider){
|
|
|
|
ISharingEnergyProvider provider = (ISharingEnergyProvider)this;
|
|
|
|
if(provider.doesShareEnergy()){
|
2016-08-31 21:14:48 +02:00
|
|
|
int total = provider.getEnergyToSplitShare();
|
|
|
|
if(total > 0){
|
|
|
|
EnumFacing[] sides = provider.getEnergyShareSides();
|
|
|
|
|
|
|
|
int amount = total/sides.length;
|
|
|
|
if(amount <= 0){
|
|
|
|
amount = total;
|
|
|
|
}
|
2016-09-09 18:40:09 +02:00
|
|
|
|
2016-08-31 21:14:48 +02:00
|
|
|
for(EnumFacing side : sides){
|
2016-09-09 18:40:09 +02:00
|
|
|
TileEntity tile = this.tilesAround[side.ordinal()];
|
|
|
|
if(tile != null){
|
|
|
|
WorldUtil.doEnergyInteraction(this, tile, side, amount);
|
|
|
|
}
|
2016-08-31 21:14:48 +02:00
|
|
|
}
|
2016-08-31 20:16:36 +02:00
|
|
|
}
|
|
|
|
}
|
2016-06-17 13:25:15 +02:00
|
|
|
}
|
|
|
|
|
2016-08-31 20:16:36 +02:00
|
|
|
if(this instanceof ISharingFluidHandler){
|
|
|
|
ISharingFluidHandler handler = (ISharingFluidHandler)this;
|
|
|
|
if(handler.doesShareFluid()){
|
2016-08-31 21:14:48 +02:00
|
|
|
int total = handler.getFluidAmountToSplitShare();
|
|
|
|
if(total > 0){
|
|
|
|
EnumFacing[] sides = handler.getFluidShareSides();
|
|
|
|
|
|
|
|
int amount = total/sides.length;
|
|
|
|
if(amount <= 0){
|
|
|
|
amount = total;
|
|
|
|
}
|
2016-09-09 18:40:09 +02:00
|
|
|
|
2016-08-31 21:14:48 +02:00
|
|
|
for(EnumFacing side : sides){
|
2016-09-09 18:40:09 +02:00
|
|
|
TileEntity tile = this.tilesAround[side.ordinal()];
|
|
|
|
if(tile != null){
|
|
|
|
WorldUtil.doFluidInteraction(this, tile, side, amount);
|
|
|
|
}
|
2016-08-31 21:14:48 +02:00
|
|
|
}
|
2016-08-31 20:16:36 +02:00
|
|
|
}
|
|
|
|
}
|
2016-06-17 13:25:15 +02:00
|
|
|
}
|
2016-09-09 18:40:09 +02:00
|
|
|
|
|
|
|
if(!this.hasCheckedHandlersAround){
|
|
|
|
if(this.shouldSaveHandlersAround()){
|
|
|
|
this.saveAllHandlersAround();
|
|
|
|
}
|
|
|
|
|
|
|
|
this.hasCheckedHandlersAround = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void saveAllHandlersAround(){
|
|
|
|
for(EnumFacing side : EnumFacing.values()){
|
|
|
|
this.tilesAround[side.ordinal()] = this.worldObj.getTileEntity(this.pos.offset(side));
|
2016-06-17 13:25:15 +02:00
|
|
|
}
|
2016-02-01 17:49:55 +01:00
|
|
|
}
|
|
|
|
|
2016-09-09 18:40:09 +02:00
|
|
|
public boolean shouldSaveHandlersAround(){
|
|
|
|
return this instanceof ISharingEnergyProvider || this instanceof ISharingFluidHandler;
|
|
|
|
}
|
|
|
|
|
2016-05-26 13:10:14 +02:00
|
|
|
public void setRedstonePowered(boolean powered){
|
2015-12-19 10:30:39 +01:00
|
|
|
this.isRedstonePowered = powered;
|
2015-12-25 15:24:40 +01:00
|
|
|
this.markDirty();
|
2015-12-19 10:30:39 +01:00
|
|
|
}
|
|
|
|
|
2016-05-06 23:23:29 +02:00
|
|
|
public boolean canPlayerUse(EntityPlayer player){
|
|
|
|
return player.getDistanceSq(this.getPos().getX()+0.5D, this.pos.getY()+0.5D, this.pos.getZ()+0.5D) <= 64 && !this.isInvalid() && this.worldObj.getTileEntity(this.pos) == this;
|
|
|
|
}
|
|
|
|
|
2016-05-26 13:10:14 +02:00
|
|
|
protected boolean sendUpdateWithInterval(){
|
2015-12-01 19:48:09 +01:00
|
|
|
if(this.ticksElapsed%ConfigIntValues.TILE_ENTITY_UPDATE_INTERVAL.getValue() == 0){
|
2015-12-01 17:28:50 +01:00
|
|
|
this.sendUpdate();
|
2015-11-19 22:13:52 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
return false;
|
2015-11-18 23:11:24 +01:00
|
|
|
}
|
2015-10-18 15:28:06 +02:00
|
|
|
}
|
2015-12-01 17:28:50 +01:00
|
|
|
|
2016-06-05 02:16:52 +02:00
|
|
|
@Override
|
|
|
|
public boolean hasCapability(Capability<?> capability, EnumFacing facing){
|
|
|
|
return this.getCapability(capability, facing) != null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public <T> T getCapability(Capability<T> capability, EnumFacing facing){
|
|
|
|
if(capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY){
|
|
|
|
IFluidHandler tank = this.getFluidHandler(facing);
|
|
|
|
if(tank != null){
|
|
|
|
return (T)tank;
|
|
|
|
}
|
|
|
|
}
|
2016-07-25 02:07:16 +02:00
|
|
|
else if(ActuallyAdditions.teslaLoaded){
|
2016-07-24 02:54:07 +02:00
|
|
|
T cap = TeslaUtil.wrapTeslaToRF(this, capability, facing);
|
2016-06-17 14:00:52 +02:00
|
|
|
if(cap != null){
|
|
|
|
return cap;
|
|
|
|
}
|
|
|
|
}
|
2016-06-05 02:16:52 +02:00
|
|
|
return super.getCapability(capability, facing);
|
|
|
|
}
|
|
|
|
|
|
|
|
public IFluidHandler getFluidHandler(EnumFacing facing){
|
|
|
|
return null;
|
|
|
|
}
|
2016-07-02 15:01:46 +02:00
|
|
|
|
|
|
|
public boolean isRedstoneToggle(){
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void activateOnPulse(){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public enum NBTType{
|
|
|
|
SAVE_TILE,
|
|
|
|
SYNC,
|
|
|
|
SAVE_BLOCK
|
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
}
|