2016-09-04 20:20:10 +00:00
|
|
|
package WayofTime.bloodmagic.block;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
2017-08-15 03:53:42 +00:00
|
|
|
import com.google.common.collect.Lists;
|
2016-09-04 20:20:10 +00:00
|
|
|
import net.minecraft.block.SoundType;
|
|
|
|
import net.minecraft.block.material.Material;
|
|
|
|
import net.minecraft.util.EnumFacing;
|
2016-10-16 02:02:16 +00:00
|
|
|
import net.minecraft.util.IStringSerializable;
|
2016-09-04 20:20:10 +00:00
|
|
|
|
|
|
|
import org.apache.commons.lang3.tuple.Pair;
|
|
|
|
|
|
|
|
import WayofTime.bloodmagic.BloodMagic;
|
2016-10-16 02:02:16 +00:00
|
|
|
import WayofTime.bloodmagic.block.base.BlockEnumPillarCap;
|
2016-09-04 20:20:10 +00:00
|
|
|
|
2017-08-15 03:53:42 +00:00
|
|
|
public class BlockDemonPillarCapBase<E extends Enum<E> & IStringSerializable> extends BlockEnumPillarCap<E>
|
2016-09-04 20:20:10 +00:00
|
|
|
{
|
2016-10-16 02:02:16 +00:00
|
|
|
public BlockDemonPillarCapBase(String baseName, Material materialIn, Class<E> enumClass)
|
2016-09-04 20:20:10 +00:00
|
|
|
{
|
2016-10-16 02:02:16 +00:00
|
|
|
super(materialIn, enumClass);
|
2016-09-04 20:20:10 +00:00
|
|
|
|
2017-08-15 03:53:42 +00:00
|
|
|
setUnlocalizedName(BloodMagic.MODID + "." + baseName + ".");
|
|
|
|
setCreativeTab(BloodMagic.TAB_BM);
|
2016-09-04 20:20:10 +00:00
|
|
|
setHardness(2.0F);
|
|
|
|
setResistance(5.0F);
|
|
|
|
setSoundType(SoundType.STONE);
|
|
|
|
setHarvestLevel("pickaxe", 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public List<Pair<Integer, String>> getVariants()
|
|
|
|
{
|
2017-08-15 03:53:42 +00:00
|
|
|
List<Pair<Integer, String>> ret = Lists.newArrayList();
|
2016-09-04 22:09:04 +00:00
|
|
|
|
|
|
|
//This is done to make the ItemBlocks have the proper model
|
2016-09-04 20:20:10 +00:00
|
|
|
|
2016-09-05 14:30:59 +00:00
|
|
|
for (int i = 0; i < EnumFacing.values().length; i++)
|
2016-10-16 02:02:16 +00:00
|
|
|
for (int j = 0; j < this.getTypes().length; j++)
|
2017-08-15 03:53:42 +00:00
|
|
|
ret.add(Pair.of(i * 2 + j, "facing=" + EnumFacing.values()[i] + ",type=" + this.getTypes()[j]));
|
2016-09-04 20:20:10 +00:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|