Search in sources :

Example 1 with TileTrackOutfitted

use of mods.railcraft.common.blocks.tracks.outfitted.TileTrackOutfitted in project Railcraft by Railcraft.

the class TileFluidLoader method setPowered.

@Override
protected void setPowered(boolean p) {
    if (isManualMode())
        p = false;
    if (p) {
        resetPipe();
        if (worldObj != null) {
            TileEntity tile = worldObj.getTileEntity(getPos().down(2));
            if (tile instanceof TileTrackOutfitted) {
                TileTrackOutfitted trackTile = (TileTrackOutfitted) tile;
                ITrackKitInstance track = trackTile.getTrackKitInstance();
                if (track instanceof ITrackKitLockdown)
                    ((ITrackKitLockdown) track).releaseCart();
            }
        }
    }
    super.setPowered(p);
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) ITrackKitInstance(mods.railcraft.api.tracks.ITrackKitInstance) ITrackKitLockdown(mods.railcraft.api.tracks.ITrackKitLockdown) TileTrackOutfitted(mods.railcraft.common.blocks.tracks.outfitted.TileTrackOutfitted)

Example 2 with TileTrackOutfitted

use of mods.railcraft.common.blocks.tracks.outfitted.TileTrackOutfitted in project Railcraft by Railcraft.

the class TrackKitBooster method onMinecartPass.

@Override
public void onMinecartPass(EntityMinecart cart) {
    TrackType trackType = ((TileTrackOutfitted) getTile()).getTrackType();
    if (TrackTypes.REINFORCED.getTrackType() == trackType)
        onMinecartPassStandard(cart, BOOST_FACTOR_REINFORCED);
    else if (trackType.isHighSpeed())
        onMinecartPassHighSpeed(cart);
    else
        onMinecartPassStandard(cart, BOOST_FACTOR);
}
Also used : TrackType(mods.railcraft.api.tracks.TrackType) TileTrackOutfitted(mods.railcraft.common.blocks.tracks.outfitted.TileTrackOutfitted)

Aggregations

TileTrackOutfitted (mods.railcraft.common.blocks.tracks.outfitted.TileTrackOutfitted)2 ITrackKitInstance (mods.railcraft.api.tracks.ITrackKitInstance)1 ITrackKitLockdown (mods.railcraft.api.tracks.ITrackKitLockdown)1 TrackType (mods.railcraft.api.tracks.TrackType)1 TileEntity (net.minecraft.tileentity.TileEntity)1