Finished adding the standard blocks and localized them - pillars are next
This commit is contained in:
parent
d52240813e
commit
1286efbca7
|
@ -293,7 +293,10 @@ public class Constants
|
|||
MIMIC("BlockMimic"),
|
||||
ALCHEMY_TABLE("BlockAlchemyTable"),
|
||||
DEMON_BRICK_1("BlockDemonBricks1"),
|
||||
DEMON_BRICK_2("BlockDemonBricks2");
|
||||
DEMON_BRICK_2("BlockDemonBricks2"),
|
||||
DEMON_BLOCK_EXTRA("BlockDemonExtra"),
|
||||
DEMON_PILLAR_1("BlockPillar1"),
|
||||
DEMON_LIGHT("BlockDemonLight");
|
||||
|
||||
@Getter
|
||||
private final String regName;
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
package WayofTime.bloodmagic.block;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.block.base.BlockString;
|
||||
import WayofTime.bloodmagic.client.IVariantProvider;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockDemonLight extends BlockString implements IVariantProvider
|
||||
{
|
||||
public static final String[] names = { "raw", "corrosive", "destructive", "vengeful", "steadfast" };
|
||||
|
||||
public BlockDemonLight()
|
||||
{
|
||||
super(Material.ROCK, names);
|
||||
|
||||
setUnlocalizedName(Constants.Mod.MODID + ".demonlight.");
|
||||
setCreativeTab(BloodMagic.tabBloodMagic);
|
||||
setHardness(2.0F);
|
||||
setResistance(5.0F);
|
||||
setSoundType(SoundType.STONE);
|
||||
setHarvestLevel("pickaxe", 2);
|
||||
setLightLevel(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
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]));
|
||||
return ret;
|
||||
}
|
||||
}
|
|
@ -35,21 +35,15 @@ public class BlockDemonPillar extends BlockStringPillar implements IVariantProvi
|
|||
public List<Pair<Integer, String>> getVariants()
|
||||
{
|
||||
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
|
||||
// for (int i = 0; i < 3; i++)
|
||||
// {
|
||||
// ret.add(new ImmutablePair<Integer, String>(i, "axis=" + EnumFacing.Axis.values()[i]));
|
||||
// }
|
||||
//
|
||||
// for (int i = 0; i < names.length; i++)
|
||||
// {
|
||||
// ret.add(new ImmutablePair<Integer, String>(i + 3, "type=" + names[i]));
|
||||
// }
|
||||
|
||||
//This is done to make the ItemBlocks have the proper model
|
||||
EnumFacing.Axis[] axis = new EnumFacing.Axis[] { EnumFacing.Axis.Y, EnumFacing.Axis.X, EnumFacing.Axis.Z };
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
for (int j = 0; j < names.length; j++)
|
||||
{
|
||||
ret.add(new ImmutablePair<Integer, String>(j * 3 + i, "axis=" + EnumFacing.Axis.values()[i] + ",type=" + names[j]));
|
||||
ret.add(new ImmutablePair<Integer, String>(i * 4 + j, "axis=" + axis[i] + ",type=" + names[j]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,11 +6,9 @@ import net.minecraft.block.properties.IProperty;
|
|||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -29,16 +27,6 @@ public class BlockStringPillar extends BlockString
|
|||
this(material, values, "type");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
// System.out.println(state);
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given metadata into a BlockState for this Block
|
||||
*/
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
|
@ -60,8 +48,6 @@ public class BlockStringPillar extends BlockString
|
|||
break;
|
||||
}
|
||||
|
||||
// System.out.println(iblockstate);
|
||||
|
||||
return iblockstate;
|
||||
}
|
||||
|
||||
|
@ -70,18 +56,16 @@ public class BlockStringPillar extends BlockString
|
|||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
int i = 0;
|
||||
i = i | this.getValues().indexOf(String.valueOf(state.getValue(this.getStringProp())));
|
||||
i = this.getValues().indexOf(String.valueOf(state.getValue(this.getStringProp())));
|
||||
|
||||
switch ((EnumFacing.Axis) state.getValue(BlockRotatedPillar.AXIS))
|
||||
{
|
||||
case X:
|
||||
i |= 4;
|
||||
i = i + 4;
|
||||
break;
|
||||
case Z:
|
||||
i |= 8;
|
||||
i = i + 8;
|
||||
break;
|
||||
// case NONE:
|
||||
// i |= 12;
|
||||
}
|
||||
|
||||
return i;
|
||||
|
@ -90,8 +74,8 @@ public class BlockStringPillar extends BlockString
|
|||
@Override
|
||||
public boolean rotateBlock(net.minecraft.world.World world, BlockPos pos, EnumFacing axis)
|
||||
{
|
||||
net.minecraft.block.state.IBlockState state = world.getBlockState(pos);
|
||||
for (net.minecraft.block.properties.IProperty<?> prop : state.getProperties().keySet())
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
for (IProperty<?> prop : state.getProperties().keySet())
|
||||
{
|
||||
if (prop == BlockRotatedPillar.AXIS)
|
||||
{
|
||||
|
@ -153,4 +137,10 @@ public class BlockStringPillar extends BlockString
|
|||
{
|
||||
return super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer).withProperty(BlockRotatedPillar.AXIS, facing.getAxis());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(IBlockState state)
|
||||
{
|
||||
return this.getValues().indexOf(String.valueOf(state.getValue(this.getStringProp())));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
package WayofTime.bloodmagic.item.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.block.BlockDemonLight;
|
||||
|
||||
public class ItemBlockDemonLight extends ItemBlock
|
||||
{
|
||||
public ItemBlockDemonLight(Block block)
|
||||
{
|
||||
super(block);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack)
|
||||
{
|
||||
return super.getUnlocalizedName(stack) + BlockDemonLight.names[stack.getItemDamage()];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
}
|
|
@ -25,6 +25,6 @@ public class ItemBlockDemonPillarBase extends ItemBlock
|
|||
@Override
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta;
|
||||
return meta % BlockDemonPillar.names.length;
|
||||
}
|
||||
}
|
|
@ -23,6 +23,7 @@ import WayofTime.bloodmagic.block.BlockDemonBase;
|
|||
import WayofTime.bloodmagic.block.BlockDemonCrucible;
|
||||
import WayofTime.bloodmagic.block.BlockDemonCrystal;
|
||||
import WayofTime.bloodmagic.block.BlockDemonCrystallizer;
|
||||
import WayofTime.bloodmagic.block.BlockDemonLight;
|
||||
import WayofTime.bloodmagic.block.BlockDemonPillar;
|
||||
import WayofTime.bloodmagic.block.BlockDemonPylon;
|
||||
import WayofTime.bloodmagic.block.BlockDimensionalPortal;
|
||||
|
@ -48,6 +49,7 @@ import WayofTime.bloodmagic.item.block.ItemBlockBloodTank;
|
|||
import WayofTime.bloodmagic.item.block.ItemBlockCrystal;
|
||||
import WayofTime.bloodmagic.item.block.ItemBlockDemonBase;
|
||||
import WayofTime.bloodmagic.item.block.ItemBlockDemonCrystal;
|
||||
import WayofTime.bloodmagic.item.block.ItemBlockDemonLight;
|
||||
import WayofTime.bloodmagic.item.block.ItemBlockDemonPillarBase;
|
||||
import WayofTime.bloodmagic.item.block.ItemBlockMimic;
|
||||
import WayofTime.bloodmagic.item.block.ItemBlockPath;
|
||||
|
@ -120,8 +122,11 @@ public class ModBlocks
|
|||
|
||||
public static Block demonBrick1;
|
||||
public static Block demonBrick2;
|
||||
public static Block demonExtras;
|
||||
public static Block demonPillar1;
|
||||
|
||||
public static Block demonLight;
|
||||
|
||||
public static void init()
|
||||
{
|
||||
FluidRegistry.registerFluid(BlockLifeEssence.getLifeEssence());
|
||||
|
@ -161,9 +166,13 @@ public class ModBlocks
|
|||
|
||||
demonBrick1 = registerBlock(new ItemBlockDemonBase(new BlockDemonBase("bricks1", new String[] { "brick1_raw", "brick1_corrosive", "brick1_destructive", "brick1_vengeful", "brick1_steadfast", "brick2_raw", "brick2_corrosive", "brick2_destructive", "brick2_vengeful", "brick2_steadfast", "brick3_raw", "brick3_corrosive", "brick3_destructive", "brick3_vengeful", "brick3_steadfast" })), Constants.BloodMagicBlock.DEMON_BRICK_1.getRegName());
|
||||
demonBrick2 = registerBlock(new ItemBlockDemonBase(new BlockDemonBase("bricks2", new String[] { "smallbrick_raw", "smallbrick_corrosive", "smallbrick_destructive", "smallbrick_vengeful", "smallbrick_steadfast", "tile_raw", "tile_corrosive", "tile_destructive", "tile_vengeful", "tile_steadfast", "tilespecial_raw", "tilespecial_corrosive", "tilespecial_destructive", "tilespecial_vengeful", "tilespecial_steadfast" })), Constants.BloodMagicBlock.DEMON_BRICK_2.getRegName());
|
||||
demonExtras = registerBlock(new ItemBlockDemonBase(new BlockDemonBase("extras", new String[] { "stone_raw", "stone_corrosive", "stone_destructive", "stone_vengeful", "stone_steadfast", "polished_raw", "polished_corrosive", "polished_destructive", "polished_vengeful", "polished_steadfast", "metal_raw", "metal_corrosive", "metal_destructive", "metal_vengeful", "metal_steadfast" })), Constants.BloodMagicBlock.DEMON_BLOCK_EXTRA.getRegName());
|
||||
|
||||
demonPillar1 = registerBlock(new ItemBlockDemonPillarBase(new BlockDemonPillar("pillar1", Material.ROCK)), "BlockPillar1");
|
||||
// testSpellBlock = registerBlock(new BlockTestSpellBlock());
|
||||
|
||||
demonLight = registerBlock(new ItemBlockDemonLight(new BlockDemonLight()), Constants.BloodMagicBlock.DEMON_LIGHT.getRegName());
|
||||
|
||||
BloodMagicAPI.addToTeleposerBlacklist(inputRoutingNode);
|
||||
BloodMagicAPI.addToTranspositionBlacklist(inputRoutingNode);
|
||||
BloodMagicAPI.addToTeleposerBlacklist(outputRoutingNode);
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"textures": { },
|
||||
"model": "cube_all",
|
||||
"uvlock": true
|
||||
},
|
||||
"variants": {
|
||||
"type": {
|
||||
"stone_raw": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_stone"
|
||||
}
|
||||
},
|
||||
"stone_corrosive": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_stone_c"
|
||||
}
|
||||
},
|
||||
"stone_destructive": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_stone_d"
|
||||
}
|
||||
},
|
||||
"stone_vengeful": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_stone_v"
|
||||
}
|
||||
},
|
||||
"stone_steadfast": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_stone_s"
|
||||
}
|
||||
},
|
||||
"polished_raw": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_polished"
|
||||
}
|
||||
},
|
||||
"polished_corrosive": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_polished_c"
|
||||
}
|
||||
},
|
||||
"polished_destructive": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_polished_d"
|
||||
}
|
||||
},
|
||||
"polished_vengeful": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_polished_v"
|
||||
}
|
||||
},
|
||||
"polished_steadfast": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_polished_s"
|
||||
}
|
||||
},
|
||||
"metal_raw": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_metal"
|
||||
}
|
||||
},
|
||||
"metal_corrosive": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_metal_c"
|
||||
}
|
||||
},
|
||||
"metal_destructive": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_metal_d"
|
||||
}
|
||||
},
|
||||
"metal_vengeful": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_metal_v"
|
||||
}
|
||||
},
|
||||
"metal_steadfast": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_metal_s"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"textures": { },
|
||||
"model": "cube_all",
|
||||
"uvlock": true
|
||||
},
|
||||
"variants": {
|
||||
"type": {
|
||||
"raw": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_eye"
|
||||
}
|
||||
},
|
||||
"corrosive": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_eye_c"
|
||||
}
|
||||
},
|
||||
"destructive": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_eye_d"
|
||||
}
|
||||
},
|
||||
"vengeful": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_eye_v"
|
||||
}
|
||||
},
|
||||
"steadfast": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/dungeon/dungeon_eye_s"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -256,6 +256,68 @@ tile.BloodMagic.mimic.solidclear.name=Clear Mimic Block
|
|||
tile.BloodMagic.mimic.solidlight.name=Lighted Mimic Block
|
||||
tile.BloodMagic.mimic.sentient.name=Sentient Mimic Block
|
||||
|
||||
tile.BloodMagic.bricks1.brick1_raw.name=Long Raw Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick1_corrosive.name=Long Corrosive Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick1_destructive.name=Long Destructive Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick1_vengeful.name=Long Vengeful Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick1_steadfast.name=Long Steadfast Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick2_raw.name=Uneven Raw Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick2_corrosive.name=Uneven Corrosive Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick2_destructive.name=Uneven Destructive Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick2_vengeful.name=Uneven Vengeful Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick2_steadfast.name=Uneven Steadfast Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick3_raw.name=Raw Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick3_corrosive.name=Corrosive Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick3_destructive.name=Destructive Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick3_vengeful.name=Vengeful Stone Bricks
|
||||
tile.BloodMagic.bricks1.brick3_steadfast.name=Steadfast Stone Bricks
|
||||
|
||||
tile.BloodMagic.bricks2.smallbrick_raw.name=Small Raw Stone Bricks
|
||||
tile.BloodMagic.bricks2.smallbrick_corrosive.name=Small Corrosive Stone Bricks
|
||||
tile.BloodMagic.bricks2.smallbrick_destructive.name=Small Destructive Stone Bricks
|
||||
tile.BloodMagic.bricks2.smallbrick_vengeful.name=Small Vengeful Stone Bricks
|
||||
tile.BloodMagic.bricks2.smallbrick_steadfast.name=Small Steadfast Stone Bricks
|
||||
tile.BloodMagic.bricks2.tile_raw.name=Small Raw Stone Tiles
|
||||
tile.BloodMagic.bricks2.tile_corrosive.name=Corrosive Stone Tiles
|
||||
tile.BloodMagic.bricks2.tile_destructive.name=Destructive Stone Tiles
|
||||
tile.BloodMagic.bricks2.tile_vengeful.name=Vengeful Stone Tiles
|
||||
tile.BloodMagic.bricks2.tile_steadfast.name=Steadfast Stone Tiles
|
||||
tile.BloodMagic.bricks2.tilespecial_raw.name=Accented Raw Stone Tiles
|
||||
tile.BloodMagic.bricks2.tilespecial_corrosive.name=Accented Corrosive Stone Tiles
|
||||
tile.BloodMagic.bricks2.tilespecial_destructive.name=Accented Destructive Stone Tiles
|
||||
tile.BloodMagic.bricks2.tilespecial_vengeful.name=Accented Vengeful Stone Tiles
|
||||
tile.BloodMagic.bricks2.tilespecial_steadfast.name=Accented Steadfast Stone Tiles
|
||||
|
||||
tile.BloodMagic.demonlight.raw.name=Raw Demon Eye
|
||||
tile.BloodMagic.demonlight.corrosive.name=Corrosive Demon Eye
|
||||
tile.BloodMagic.demonlight.destructive.name=Destructive Demon Eye
|
||||
tile.BloodMagic.demonlight.vengeful.name=Vengeful Demon Eye
|
||||
tile.BloodMagic.demonlight.steadfast.name=Steadfast Demon Eye
|
||||
|
||||
tile.BloodMagic.extras.stone_raw.name=Raw Stone
|
||||
tile.BloodMagic.extras.stone_corrosive.name=Corrosive Stone
|
||||
tile.BloodMagic.extras.stone_destructive.name=Destructive Stone
|
||||
tile.BloodMagic.extras.stone_vengeful.name=Vengeful Stone
|
||||
tile.BloodMagic.extras.stone_steadfast.name=Steadfast Stone
|
||||
|
||||
tile.BloodMagic.extras.polished_raw.name=Polished Raw Stone
|
||||
tile.BloodMagic.extras.polished_corrosive.name=Polished Corrosive Stone
|
||||
tile.BloodMagic.extras.polished_destructive.name=Polished Destructive Stone
|
||||
tile.BloodMagic.extras.polished_vengeful.name=Polished Vengeful Stone
|
||||
tile.BloodMagic.extras.polished_steadfast.name=Polished Steadfast Stone
|
||||
|
||||
tile.BloodMagic.extras.metal_raw.name=Raw Demon Alloy
|
||||
tile.BloodMagic.extras.metal_corrosive.name=Corrosive Demon Alloy
|
||||
tile.BloodMagic.extras.metal_destructive.name=Destructive Demon Alloy
|
||||
tile.BloodMagic.extras.metal_vengeful.name=Vengeful Demon Alloy
|
||||
tile.BloodMagic.extras.metal_steadfast.name=Steadfast Demon Alloy
|
||||
|
||||
tile.BloodMagic.pillar1.raw.name=Raw Stone Pillar
|
||||
tile.BloodMagic.pillar1.corrosive.name=Corrosive Stone Pillar
|
||||
tile.BloodMagic.pillar1.destructive.name=Destructive Stone Pillar
|
||||
tile.BloodMagic.pillar1.vengeful.name=Vengeful Stone Pillar
|
||||
tile.BloodMagic.pillar2.steadfast.name=Steadfast Stone Pillar
|
||||
|
||||
# Fluids
|
||||
fluid.lifeEssence=Life Essence
|
||||
|
||||
|
|
Loading…
Reference in a new issue