Skip to content

Commit

Permalink
Change slabs use the new ISubBlocksBlock, a little more block tinkering
Browse files Browse the repository at this point in the history
  • Loading branch information
Roadhog360 committed Aug 4, 2023
1 parent a03254e commit 91eaebf
Show file tree
Hide file tree
Showing 35 changed files with 316 additions and 384 deletions.
65 changes: 32 additions & 33 deletions src/main/java/ganymedes01/etfuturum/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import ganymedes01.etfuturum.blocks.ores.BlockOreNetherGold;
import ganymedes01.etfuturum.client.sound.ModSounds;
import ganymedes01.etfuturum.configuration.configs.*;
import ganymedes01.etfuturum.core.utils.Utils;
import ganymedes01.etfuturum.tileentities.TileEntityWoodSign;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
Expand Down Expand Up @@ -101,15 +100,15 @@ public enum ModBlocks {
SCULK(ConfigBlocksItems.enableSculk && EtFuturum.TESTING, new BlockSculk()),
SCULK_CATALYST(ConfigBlocksItems.enableSculk && EtFuturum.TESTING, new BlockSculkCatalyst()),
TINTED_GLASS(ConfigBlocksItems.enableAmethyst, new BlockTintedGlass()),
STONE_WALL(ConfigBlocksItems.enableExtraVanillaWalls, new BlockNewWall("stone_wall", new Block[]{Blocks.stonebrick, Blocks.stonebrick, Blocks.sandstone, Blocks.brick_block}, new int[]{0, 1, 0, 0}, new String[]{"stone_brick_wall", "mossy_stone_brick_wall", "sandstone_wall", "brick_wall"}), ItemBlockNewWall.class),
NETHER_BRICK_WALL(ConfigBlocksItems.enableExtraVanillaWalls, new BlockNewWall("nether_brick_wall", new Block[]{Blocks.nether_brick}, new int[]{0}, null), ItemBlockNewWall.class),
STONE_WALL_2(ConfigBlocksItems.enableStones, new BlockNewWall("stone_wall_2", new Block[]{STONE.get(), STONE.get(), STONE.get()}, new int[]{1, 3, 5}, new String[]{"granite_wall", "diorite_wall", "andesite_wall"}), ItemBlockNewWall.class),
RED_SANDSTONE_WALL(ConfigBlocksItems.enableRedSandstone, new BlockNewWall("red_sandstone_wall", new Block[]{RED_SANDSTONE.get()}, new int[]{0}, null), ItemBlockNewWall.class),
PRISMARINE_WALL(ConfigBlocksItems.enablePrismarine, new BlockNewWall("prismarine_wall", new Block[]{PRISMARINE_BLOCK.get()}, new int[]{0}, null), ItemBlockNewWall.class),
RED_NETHER_BRICK_WALL(ConfigBlocksItems.enableNewNetherBricks, new BlockNewWall("red_nether_brick_wall", new Block[]{RED_NETHERBRICK.get()}, new int[]{0}, null), ItemBlockNewWall.class),
END_BRICK_WALL(ConfigBlocksItems.enableChorusFruit, new BlockNewWall("end_brick_wall", new Block[]{END_BRICKS.get()}, new int[]{0}, null), ItemBlockNewWall.class),
DEEPSLATE_WALL(ConfigBlocksItems.enableDeepslate, new BlockNewWall("deepslate_wall", new Block[]{COBBLED_DEEPSLATE.get(), POLISHED_DEEPSLATE.get()}, new int[]{0, 0}, new String[]{"cobbled_deepslate_wall", "polished_deepslate_wall"}), ItemBlockNewWall.class),
DEEPSLATE_BRICK_WALL(ConfigBlocksItems.enableDeepslate, new BlockNewWall("deepslate_brick_wall", new Block[]{DEEPSLATE_BRICKS.get(), DEEPSLATE_BRICKS.get()}, new int[]{0, 2}, new String[]{"deepslate_brick_wall", "deepslate_tile_wall"}), ItemBlockNewWall.class),
STONE_WALL(ConfigBlocksItems.enableExtraVanillaWalls, new BasicWall("stone_wall", new Block[]{Blocks.stonebrick, Blocks.stonebrick, Blocks.sandstone, Blocks.brick_block}, new int[]{0, 1, 0, 0}, new String[]{"stone_brick_wall", "mossy_stone_brick_wall", "sandstone_wall", "brick_wall"}), ItemBlockNewWall.class),
NETHER_BRICK_WALL(ConfigBlocksItems.enableExtraVanillaWalls, new BasicWall("nether_brick_wall", new Block[]{Blocks.nether_brick}, new int[]{0}, null), ItemBlockNewWall.class),
STONE_WALL_2(ConfigBlocksItems.enableStones, new BasicWall("stone_wall_2", new Block[]{STONE.get(), STONE.get(), STONE.get()}, new int[]{1, 3, 5}, new String[]{"granite_wall", "diorite_wall", "andesite_wall"}), ItemBlockNewWall.class),
RED_SANDSTONE_WALL(ConfigBlocksItems.enableRedSandstone, new BasicWall("red_sandstone_wall", new Block[]{RED_SANDSTONE.get()}, new int[]{0}, null), ItemBlockNewWall.class),
PRISMARINE_WALL(ConfigBlocksItems.enablePrismarine, new BasicWall("prismarine_wall", new Block[]{PRISMARINE_BLOCK.get()}, new int[]{0}, null), ItemBlockNewWall.class),
RED_NETHER_BRICK_WALL(ConfigBlocksItems.enableNewNetherBricks, new BasicWall("red_nether_brick_wall", new Block[]{RED_NETHERBRICK.get()}, new int[]{0}, null), ItemBlockNewWall.class),
END_BRICK_WALL(ConfigBlocksItems.enableChorusFruit, new BasicWall("end_brick_wall", new Block[]{END_BRICKS.get()}, new int[]{0}, null), ItemBlockNewWall.class),
DEEPSLATE_WALL(ConfigBlocksItems.enableDeepslate, new BasicWall("deepslate_wall", new Block[]{COBBLED_DEEPSLATE.get(), POLISHED_DEEPSLATE.get()}, new int[]{0, 0}, new String[]{"cobbled_deepslate_wall", "polished_deepslate_wall"}), ItemBlockNewWall.class),
DEEPSLATE_BRICK_WALL(ConfigBlocksItems.enableDeepslate, new BasicWall("deepslate_brick_wall", new Block[]{DEEPSLATE_BRICKS.get(), DEEPSLATE_BRICKS.get()}, new int[]{0, 2}, new String[]{"deepslate_brick_wall", "deepslate_tile_wall"}), ItemBlockNewWall.class),
DEEPSLATE_COAL_ORE(ConfigBlocksItems.enableDeepslate && ConfigBlocksItems.enableDeepslateOres, new BlockDeepslateOre(Blocks.coal_ore)),
DEEPSLATE_IRON_ORE(ConfigBlocksItems.enableDeepslate && ConfigBlocksItems.enableDeepslateOres, new BlockDeepslateOre(Blocks.iron_ore)),
DEEPSLATE_GOLD_ORE(ConfigBlocksItems.enableDeepslate && ConfigBlocksItems.enableDeepslateOres, new BlockDeepslateOre(Blocks.gold_ore)),
Expand All @@ -129,8 +128,8 @@ public enum ModBlocks {
END_GATEWAY(EtFuturum.TESTING, new BlockEndGateway()),
OBSERVER(ConfigMixins.enableObservers, new BlockObserver()),
TARGET(ConfigBlocksItems.enableTarget, new BlockTarget()),
RED_SANDSTONE_STAIRS(ConfigBlocksItems.enableRedSandstone, new BasicStairs(RED_SANDSTONE.get(), 0).setBlockName(Utils.getUnlocalisedName("red_sandstone_stairs"))),
PURPUR_STAIRS(ConfigBlocksItems.enableChorusFruit, new BasicStairs(PURPUR_BLOCK.get(), 0).setBlockName(Utils.getUnlocalisedName("purpur_stairs"))),
RED_SANDSTONE_STAIRS(ConfigBlocksItems.enableRedSandstone, new BasicStairs(RED_SANDSTONE.get(), 0)),
PURPUR_STAIRS(ConfigBlocksItems.enableChorusFruit, new BasicStairs(PURPUR_BLOCK.get(), 0).setBlockName("purpur")),
RED_SANDSTONE_SLAB(ConfigBlocksItems.enableRedSandstone, new BlockRedSandstoneSlab(false), ItemBlockGenericSlab.class),
DOUBLE_RED_SANDSTONE_SLAB(ConfigBlocksItems.enableRedSandstone, new BlockRedSandstoneSlab(true), ItemBlockGenericSlab.class),
PURPUR_SLAB(ConfigBlocksItems.enableChorusFruit, new BlockPurpurSlab(false), ItemBlockGenericSlab.class),
Expand All @@ -139,23 +138,23 @@ public enum ModBlocks {
DOUBLE_STONE_SLAB(ConfigBlocksItems.enableExtraVanillaSlabs, new BlockStoneSlab1(true), ItemBlockGenericSlab.class),
STONE_SLAB_2(ConfigBlocksItems.enableStones, new BlockStoneSlab2(false), ItemBlockGenericSlab.class),
DOUBLE_STONE_SLAB_2(ConfigBlocksItems.enableStones, new BlockStoneSlab2(true), ItemBlockGenericSlab.class),
PRISMARINE_STAIRS(ConfigBlocksItems.enablePrismarine, new BasicStairs(PRISMARINE_BLOCK.get(), 0).setBlockName(Utils.getUnlocalisedName("prismarine_stairs"))),
PRISMARINE_STAIRS_BRICK(ConfigBlocksItems.enablePrismarine, new BasicStairs(PRISMARINE_BLOCK.get(), 1).setBlockName(Utils.getUnlocalisedName("prismarine_stairs_brick"))),
PRISMARINE_STAIRS_DARK(ConfigBlocksItems.enablePrismarine, new BasicStairs(PRISMARINE_BLOCK.get(), 2).setBlockName(Utils.getUnlocalisedName("prismarine_stairs_dark"))),
SMOOTH_SANDSTONE_STAIRS(ConfigBlocksItems.enableSmoothSandstone, new BasicStairs(SMOOTH_SANDSTONE.get(), 0).setBlockName(Utils.getUnlocalisedName("smooth_sandstone_stairs"))),
SMOOTH_RED_SANDSTONE_STAIRS(ConfigBlocksItems.enableRedSandstone, new BasicStairs(SMOOTH_RED_SANDSTONE.get(), 0).setBlockName(Utils.getUnlocalisedName("smooth_red_sandstone_stairs"))),
SMOOTH_QUARTZ_STAIRS(ConfigBlocksItems.enableSmoothQuartz, new BasicStairs(SMOOTH_QUARTZ.get(), 0).setBlockName(Utils.getUnlocalisedName("smooth_quartz_stairs"))),
RED_NETHERBRICK_STAIRS(ConfigBlocksItems.enableNewNetherBricks, new BasicStairs(RED_NETHERBRICK.get(), 0).setBlockName(Utils.getUnlocalisedName("red_nether_brick_stairs"))),
GRANITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 1).setBlockName(Utils.getUnlocalisedName("granite_stairs"))),
POLISHED_GRANITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 2).setBlockName(Utils.getUnlocalisedName("polished_granite_stairs"))),
DIORITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 3).setBlockName(Utils.getUnlocalisedName("diorite_stairs"))),
POLISHED_DIORITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 4).setBlockName(Utils.getUnlocalisedName("polished_diorite_stairs"))),
ANDESITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 5).setBlockName(Utils.getUnlocalisedName("andesite_stairs"))),
POLISHED_ANDESITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 6).setBlockName(Utils.getUnlocalisedName("polished_andesite_stairs"))),
MOSSY_STONE_BRICK_STAIRS(ConfigBlocksItems.enableExtraVanillaStairs, new BasicStairs(Blocks.stonebrick, 1).setBlockName(Utils.getUnlocalisedName("mossy_stone_brick_stairs"))),
MOSSY_COBBLESTONE_STAIRS(ConfigBlocksItems.enableExtraVanillaStairs, new BasicStairs(Blocks.mossy_cobblestone, 0).setBlockName(Utils.getUnlocalisedName("mossy_cobblestone_stairs"))),
STONE_STAIRS(ConfigBlocksItems.enableExtraVanillaStairs, new BasicStairs(Blocks.stone, 0).setBlockName(Utils.getUnlocalisedName("stone_stairs"))),
END_BRICK_STAIRS(ConfigBlocksItems.enableChorusFruit, new BasicStairs(END_BRICKS.get(), 0).setBlockName(Utils.getUnlocalisedName("end_brick_stairs"))),
PRISMARINE_STAIRS(ConfigBlocksItems.enablePrismarine, new BasicStairs(PRISMARINE_BLOCK.get(), 0).setBlockName("prismarine")),
PRISMARINE_STAIRS_BRICK(ConfigBlocksItems.enablePrismarine, new BasicStairs(PRISMARINE_BLOCK.get(), 1).setBlockName("prismarine_brick")),
PRISMARINE_STAIRS_DARK(ConfigBlocksItems.enablePrismarine, new BasicStairs(PRISMARINE_BLOCK.get(), 2).setBlockName("dark_prismarine")),
SMOOTH_SANDSTONE_STAIRS(ConfigBlocksItems.enableSmoothSandstone, new BasicStairs(SMOOTH_SANDSTONE.get(), 0)),
SMOOTH_RED_SANDSTONE_STAIRS(ConfigBlocksItems.enableRedSandstone, new BasicStairs(SMOOTH_RED_SANDSTONE.get(), 0)),
SMOOTH_QUARTZ_STAIRS(ConfigBlocksItems.enableSmoothQuartz, new BasicStairs(SMOOTH_QUARTZ.get(), 0)),
RED_NETHERBRICK_STAIRS(ConfigBlocksItems.enableNewNetherBricks, new BasicStairs(RED_NETHERBRICK.get(), 0).setBlockName("red_nether_brick")),
GRANITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 1).setBlockName("granite")),
POLISHED_GRANITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 2).setBlockName("polished_granite")),
DIORITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 3).setBlockName("diorite")),
POLISHED_DIORITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 4).setBlockName("polished_diorite")),
ANDESITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 5).setBlockName("andesite")),
POLISHED_ANDESITE_STAIRS(ConfigBlocksItems.enableStones, new BasicStairs(STONE.get(), 6).setBlockName("polished_andesite")),
MOSSY_STONE_BRICK_STAIRS(ConfigBlocksItems.enableExtraVanillaStairs, new BasicStairs(Blocks.stonebrick, 1).setBlockName("mossy_stone_brick")),
MOSSY_COBBLESTONE_STAIRS(ConfigBlocksItems.enableExtraVanillaStairs, new BasicStairs(Blocks.mossy_cobblestone, 0).setBlockName("mossy_cobblestone")),
STONE_STAIRS(ConfigBlocksItems.enableExtraVanillaStairs, new BasicStairs(Blocks.stone, 0)),
END_BRICK_STAIRS(ConfigBlocksItems.enableChorusFruit, new BasicStairs(END_BRICKS.get(), 0)),
SMOOTH_SANDSTONE_SLAB(ConfigBlocksItems.enableSmoothSandstone, new BlockSmoothSandstoneSlab(0, false), ItemBlockGenericSlab.class),
DOUBLE_SMOOTH_SANDSTONE_SLAB(ConfigBlocksItems.enableSmoothSandstone, new BlockSmoothSandstoneSlab(0, true), ItemBlockGenericSlab.class),
SMOOTH_RED_SANDSTONE_SLAB(ConfigBlocksItems.enableRedSandstone, new BlockSmoothSandstoneSlab(1, false), ItemBlockGenericSlab.class),
Expand Down Expand Up @@ -183,10 +182,10 @@ public enum ModBlocks {
WAXED_EXPOSED_CUT_COPPER_STAIRS(ConfigBlocksItems.enableCopper, new BlockCutCopperStairs(13)),
WAXED_WEATHERED_CUT_COPPER_STAIRS(ConfigBlocksItems.enableCopper, new BlockCutCopperStairs(14)),
WAXED_OXIDIZED_CUT_COPPER_STAIRS(ConfigBlocksItems.enableCopper, new BlockCutCopperStairs(15)),
COBBLED_DEEPSLATE_STAIRS(ConfigBlocksItems.enableDeepslate, new BasicStairs(COBBLED_DEEPSLATE.get(), 0).setBlockName(Utils.getUnlocalisedName("cobbled_deepslate_stairs"))),
POLISHED_DEEPSLATE_STAIRS(ConfigBlocksItems.enableDeepslate, new BasicStairs(POLISHED_DEEPSLATE.get(), 0).setBlockName(Utils.getUnlocalisedName("polished_deepslate_stairs"))),
DEEPSLATE_BRICK_STAIRS(ConfigBlocksItems.enableDeepslate, new BasicStairs(DEEPSLATE_BRICKS.get(), 0).setBlockName(Utils.getUnlocalisedName("deepslate_brick_stairs"))),
DEEPSLATE_TILE_STAIRS(ConfigBlocksItems.enableDeepslate, new BasicStairs(DEEPSLATE_BRICKS.get(), 2).setBlockName(Utils.getUnlocalisedName("deepslate_tile_stairs")).setStepSound(ModSounds.soundDeepslateTiles)),
COBBLED_DEEPSLATE_STAIRS(ConfigBlocksItems.enableDeepslate, new BasicStairs(COBBLED_DEEPSLATE.get(), 0)),
POLISHED_DEEPSLATE_STAIRS(ConfigBlocksItems.enableDeepslate, new BasicStairs(POLISHED_DEEPSLATE.get(), 0)),
DEEPSLATE_BRICK_STAIRS(ConfigBlocksItems.enableDeepslate, new BasicStairs(DEEPSLATE_BRICKS.get(), 0)),
DEEPSLATE_TILE_STAIRS(ConfigBlocksItems.enableDeepslate, new BasicStairs(DEEPSLATE_BRICKS.get(), 2).setBlockName("deepslate_tile").setStepSound(ModSounds.soundDeepslateTiles)),
IRON_TRAPDOOR(ConfigBlocksItems.enableIronTrapdoor, new BlockIronTrapdoor()),
MAGMA(ConfigBlocksItems.enableMagmaBlock, new BlockMagma()),
BARREL(ConfigBlocksItems.enableBarrel, new BlockBarrel()),
Expand Down
116 changes: 116 additions & 0 deletions src/main/java/ganymedes01/etfuturum/blocks/BasicSlab.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
package ganymedes01.etfuturum.blocks;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockSlab;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;

import java.util.List;
import java.util.Random;

public class BasicSlab extends BlockSlab implements ISubBlocksBlock {

@SideOnly(Side.CLIENT)
private IIcon[] icons;
public final String[] types;
private BasicSlab doubleSlab;
/**
* Used to know the previous slab registered, so the slab knows what the double slab version is without passing it as a constructor argument every time
* We store the previous slab we registered, so it can be passed to the double slab that registers after it.
*/
private static BasicSlab previousSlab;

public BasicSlab(boolean isDouble, Material material, String... names) {
super(isDouble, material);
if (names.length > 8) {
throw new IllegalArgumentException("Slabs can't have more than 8 subtypes! Tried to register a slab with " + names.length);
}
types = names;
useNeighborBrightness = !isDouble;
opaque = isDouble;
if (isDouble) {
doubleSlab = this;
previousSlab.doubleSlab = this;
previousSlab = null;
} else {
previousSlab = this;
}
}

public BasicSlab getDoubleSlab() {
return doubleSlab;
}

@Override
public IIcon[] getIcons() {
return icons;
}

protected void setIcons(IIcon[] icons) {
this.icons = icons;
}

@Override
public String[] getTypes() {
return types;
}

@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
setIcons(new IIcon[getTypes().length]);
for (int i = 0; i < getIcons().length; i++) {
getIcons()[i] = "".equals(getTypes()[i]) ? reg.registerIcon(getTextureName()) : reg.registerIcon(getTypes()[i]);
}
blockIcon = getIcons()[0];
}

@Override
public String getNameFor(ItemStack stack) {
return func_150002_b(stack.getItemDamage());
}

@Override
public String func_150002_b(int meta) {
String type = getTypes()[Math.max(0, (meta % 8) % getTypes().length)];
type = ("".equals(type) ? getUnlocalizedName().replace("tile.", "").replace("etfuturum.", "") : type);
if (type.toLowerCase().endsWith("bricks") || type.toLowerCase().endsWith("tiles")) {
type = type.substring(0, type.length() - 1);
}
return type + "_slab";
}

@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings({"unchecked", "rawtypes"})
public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_) {
if (!field_150004_a) {
for (int i = 0; i < types.length; i++) {
p_149666_3_.add(new ItemStack(p_149666_1_, 1, i));
}
}
}

@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
return icons[(meta % 8) % icons.length];
}

@Override
@SideOnly(Side.CLIENT)
public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) {
return Item.getItemFromBlock(this);
}

@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
return Item.getItemFromBlock(this);
}
}
11 changes: 11 additions & 0 deletions src/main/java/ganymedes01/etfuturum/blocks/BasicStairs.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ganymedes01.etfuturum.blocks;

import ganymedes01.etfuturum.EtFuturum;
import ganymedes01.etfuturum.core.utils.Utils;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStairs;

Expand All @@ -13,5 +14,15 @@ public BasicStairs(Block p_i45428_1_, int p_i45428_2_) {
useNeighborBrightness = true;
meta = p_i45428_2_;
setCreativeTab(EtFuturum.creativeTabBlocks);
String name = p_i45428_1_.getUnlocalizedName().replace("tile.", "").replace("etfuturum.", "");
if (name.toLowerCase().endsWith("bricks") || name.toLowerCase().endsWith("tiles")) {
name = name.substring(0, name.length() - 1);
}
setBlockName(name);
}

@Override
public Block setBlockName(String p_149663_1_) {
return super.setBlockName(Utils.getUnlocalisedName(p_149663_1_) + "_stairs");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@

import java.util.List;

public class BasicVariantsBlock extends Block implements ISubBlocksBlock {
public class BasicSubtypesBlock extends Block implements ISubBlocksBlock {
@SideOnly(Side.CLIENT)
private IIcon[] icons;
private final String[] types;

private final int startMeta;

public BasicVariantsBlock(Material material, String... types) {
public BasicSubtypesBlock(Material material, String... types) {
this(material, 0, types);
}

public BasicVariantsBlock(Material material, int startMeta, String... types) {
public BasicSubtypesBlock(Material material, int startMeta, String... types) {
super(material);
this.types = types;
this.startMeta = startMeta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@

import java.util.List;

public class BasicVariantsSand extends BlockFalling implements ISubBlocksBlock {
public class BasicSubtypesSand extends BlockFalling implements ISubBlocksBlock {
@SideOnly(Side.CLIENT)
private IIcon[] icons;
private final String[] types;

private final int startMeta;

public BasicVariantsSand(Material material, String... types) {
public BasicSubtypesSand(Material material, String... types) {
this(material, 0, types);
}

public BasicVariantsSand(Material material, int startMeta, String... types) {
public BasicSubtypesSand(Material material, int startMeta, String... types) {
super(material);
this.types = types;
this.startMeta = startMeta;
Expand Down
Loading

0 comments on commit 91eaebf

Please sign in to comment.