blob: bac23893c11e1285cf9fa032d8a1d9e441a72c56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package com.detrav.utils;
import net.minecraft.block.Block;
import net.minecraft.world.chunk.Chunk;
import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_Ores;
import com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_SmallOres;
public class BartWorksHelper {
public static boolean isOre(Block tBlock) {
return tBlock instanceof BW_MetaGenerated_Ores;
}
public static boolean isSmallOre(Block tBlock) {
return tBlock instanceof BW_MetaGenerated_SmallOres;
}
public static short getMetaFromBlock(Chunk c, int x, int y, int z, Block tBlock) {
return (short) (tBlock.getDamageValue(c.worldObj, c.xPosition * 16 + x, y, c.zPosition * 16 + z) * -1);
}
}
|