Changed most of the BlockString blocks to a BlockEnum in order to solve a loading issue with schematics.
This commit is contained in:
parent
3e0f3f5aa1
commit
5cb5ec4264
59 changed files with 727 additions and 843 deletions
|
@ -5,23 +5,21 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.base.BlockString;
|
||||
import WayofTime.bloodmagic.block.base.BlockEnum;
|
||||
import WayofTime.bloodmagic.client.IVariantProvider;
|
||||
|
||||
public class BlockDemonBase extends BlockString implements IVariantProvider
|
||||
public class BlockDemonBase<E extends Enum<E> & IStringSerializable> extends BlockEnum<E> implements IVariantProvider
|
||||
{
|
||||
public final String[] names;
|
||||
|
||||
public BlockDemonBase(String baseName, String[] names)
|
||||
public BlockDemonBase(String baseName, Class<E> enumClass)
|
||||
{
|
||||
super(Material.ROCK, names);
|
||||
this.names = names;
|
||||
super(Material.ROCK, enumClass);
|
||||
|
||||
setUnlocalizedName(Constants.Mod.MODID + "." + baseName + ".");
|
||||
setCreativeTab(BloodMagic.tabBloodMagic);
|
||||
|
@ -35,8 +33,8 @@ public class BlockDemonBase extends BlockString implements IVariantProvider
|
|||
public List<Pair<Integer, String>> getVariants()
|
||||
{
|
||||
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
|
||||
for (int i = 0; i < names.length; i++)
|
||||
ret.add(new ImmutablePair<Integer, String>(i, "type=" + names[i]));
|
||||
for (int i = 0; i < this.getTypes().length; i++)
|
||||
ret.add(new ImmutablePair<Integer, String>(i, "type=" + this.getTypes()[i]));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue