Skip to content

Commit d657d9b

Browse files
committedMar 13, 2016
Updated OpenComputers dependency.
1 parent 515dcfa commit d657d9b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+160
-94
lines changed
 

Diff for: ‎build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ enderio.version=1.7.10-2.3.0.424_beta
1111
forestry.version=4.2.0.47
1212
gregtech.version=5.07.07
1313
ic2.version=2.2.643-experimental
14-
oc.version=MC1.7.10-1.6.0.846-dev
14+
oc.version=MC1.7.10-1.6.0.1-beta.1
1515
qmunitylib.version=0.1.109
1616
tis3d.version=MC1.7.10-0.8.2.61
1717
waila.version=1.5.10_1.7.10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package pl.asie.computronics.integration;
2+
3+
import li.cil.oc.api.driver.SidedBlock;
4+
import net.minecraft.tileentity.TileEntity;
5+
import net.minecraft.world.World;
6+
import net.minecraftforge.common.util.ForgeDirection;
7+
8+
/**
9+
* Because {@link li.cil.oc.api.prefab.DriverTileEntity} uses a deprecated interface.
10+
* @author Sangar, Vexatos
11+
*/
12+
public abstract class DriverTileEntity implements SidedBlock {
13+
14+
public abstract Class<?> getTileEntityClass();
15+
16+
@Override
17+
public boolean worksWith(final World world, final int x, final int y, final int z, ForgeDirection side) {
18+
final Class<?> filter = getTileEntityClass();
19+
if(filter == null) {
20+
// This can happen if filter classes are deduced by reflection and
21+
// the class in question is not present.
22+
return false;
23+
}
24+
final TileEntity tileEntity = world.getTileEntity(x, y, z);
25+
return tileEntity != null && filter.isAssignableFrom(tileEntity.getClass());
26+
}
27+
}

0 commit comments

Comments
 (0)
Please sign in to comment.