blob: 055172ebe4f24aaea9f38fb802e8ee508eef3d7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
package gtneioreplugin.plugin.block;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import gtneioreplugin.plugin.renderer.ItemDimensionDisplayRenderer;
public class BlockDimensionDisplay extends Block {
private final String dimension;
@SuppressWarnings("unused")
public long getDimensionRocketTier() {
return this.dimensionRocketTier;
}
private final long dimensionRocketTier;
private final IIcon[] icons = new IIcon[6];
public BlockDimensionDisplay(String dimension) {
super(Material.rock);
this.dimension = dimension;
this.dimensionRocketTier = ItemDimensionDisplayRenderer.getPrefix(dimension);
}
@Override
public IIcon getIcon(int side, int meta) {
return this.icons[MathHelper.clamp_int(side, 0, 5)];
}
@Override
public void registerBlockIcons(IIconRegister iconRegister) {
this.icons[0] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_bottom");
this.icons[1] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_top");
this.icons[2] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_back");
this.icons[3] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_front");
this.icons[4] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_left");
this.icons[5] = iconRegister.registerIcon("gtneioreplugin:" + dimension + "_right");
}
public String getDimension() {
return this.dimension;
}
}
|