Added different types of mimic blocks and created their recipes
This commit is contained in:
parent
ebd7b1f8da
commit
0420779e5e
|
@ -36,7 +36,8 @@ import WayofTime.bloodmagic.tile.TileMimic;
|
|||
|
||||
public class BlockMimic extends BlockStringContainer implements IVariantProvider
|
||||
{
|
||||
public static final String[] names = { "nohitbox" };
|
||||
|
||||
public static final String[] names = { "nohitbox", "solidopaque", "solidclear", "solidlight", "sentient" };
|
||||
|
||||
public BlockMimic()
|
||||
{
|
||||
|
@ -52,9 +53,36 @@ public class BlockMimic extends BlockStringContainer implements IVariantProvider
|
|||
}
|
||||
|
||||
@Nullable
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World world, BlockPos pos)
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World world, BlockPos pos)
|
||||
{
|
||||
return NULL_AABB;
|
||||
switch (this.getMetaFromState(state))
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
TileMimic tileMimic = (TileMimic) world.getTileEntity(pos);
|
||||
if (tileMimic != null && tileMimic.getStackInSlot(0) != null)
|
||||
{
|
||||
Block mimicBlock = Block.getBlockFromItem(tileMimic.getStackInSlot(0).getItem());
|
||||
if (mimicBlock == null)
|
||||
{
|
||||
return FULL_BLOCK_AABB;
|
||||
}
|
||||
IBlockState mimicState = mimicBlock.getStateFromMeta(tileMimic.metaOfReplacedBlock);
|
||||
if (mimicBlock != this)
|
||||
{
|
||||
return mimicState.getCollisionBoundingBox(world, pos);
|
||||
}
|
||||
} else
|
||||
{
|
||||
return FULL_BLOCK_AABB;
|
||||
}
|
||||
case 0:
|
||||
default:
|
||||
return NULL_AABB;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,8 +110,26 @@ public class BlockMimic extends BlockStringContainer implements IVariantProvider
|
|||
@Override
|
||||
public int getLightOpacity(IBlockState state)
|
||||
{
|
||||
//Overriden for now so that in the future I don't have to.
|
||||
return this.lightOpacity;
|
||||
switch (this.getMetaFromState(state))
|
||||
{
|
||||
case 2:
|
||||
case 4:
|
||||
return 0;
|
||||
default:
|
||||
return this.lightOpacity;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockState state)
|
||||
{
|
||||
switch (this.getMetaFromState(state))
|
||||
{
|
||||
case 3:
|
||||
return 15;
|
||||
default:
|
||||
return this.lightValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,7 +21,7 @@ public class DataProviderMimic implements IWailaDataProvider
|
|||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config)
|
||||
{
|
||||
TileMimic mimic = (TileMimic) accessor.getTileEntity();
|
||||
return mimic != null && mimic.getStackInSlot(0) != null ? mimic.getStackInSlot(0) : new ItemStack(ModBlocks.mimic);
|
||||
return mimic != null && mimic.getStackInSlot(0) != null ? mimic.getStackInSlot(0) : new ItemStack(ModBlocks.mimic, 1, mimic.getBlockMetadata());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -160,6 +160,9 @@ public class ModRecipes
|
|||
}
|
||||
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.mimic, 4, 0), "b b", " r ", "bob", 'b', new ItemStack(ModBlocks.bloodStoneBrick), 'r', new ItemStack(ModBlocks.bloodRune), 'o', OrbRegistry.getOrbStack(ModItems.orbMagician)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.mimic, 4, 1), "bsb", "srs", "bob", 'b', new ItemStack(ModBlocks.bloodStoneBrick), 'r', new ItemStack(ModBlocks.bloodRune), 's', "stone", 'o', OrbRegistry.getOrbStack(ModItems.orbMagician)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.mimic, 4, 2), "bsb", "srs", "bob", 'b', new ItemStack(ModBlocks.bloodStoneBrick), 'r', new ItemStack(ModBlocks.bloodRune), 's', "blockGlass", 'o', OrbRegistry.getOrbStack(ModItems.orbMagician)));
|
||||
GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.mimic, 2, 3), "bnb", "trt", "bob", 'b', new ItemStack(ModBlocks.bloodStoneBrick), 'r', new ItemStack(ModBlocks.bloodRune), 'n', Blocks.GLOWSTONE, 't', "torch", 'o', OrbRegistry.getOrbStack(ModItems.orbMagician)));
|
||||
}
|
||||
|
||||
public static void addAltarRecipes()
|
||||
|
|
|
@ -9,9 +9,29 @@
|
|||
"type": {
|
||||
"nohitbox": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/LargeBloodStoneBrick"
|
||||
"all": "bloodmagic:blocks/EtherealOpaqueMimic"
|
||||
}
|
||||
}
|
||||
},
|
||||
"solidopaque": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/SolidOpaqueMimic"
|
||||
}
|
||||
},
|
||||
"solidclear": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/SolidClearMimic"
|
||||
}
|
||||
},
|
||||
"solidlight": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/SolidLightMimic"
|
||||
}
|
||||
},
|
||||
"sentient": {
|
||||
"textures": {
|
||||
"all": "bloodmagic:blocks/SentientMimic"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -250,7 +250,11 @@ tile.BloodMagic.demonCrystalDESTRUCTIVE.name=Destructive Will Crystal Cluster
|
|||
tile.BloodMagic.demonCrystalVENGEFUL.name=Vengeful Will Crystal Cluster
|
||||
tile.BloodMagic.demonCrystalSTEADFAST.name=Steadfast Will Crystal Cluster
|
||||
|
||||
tile.BloodMagic.mimic.nohitbox.name=Ethereal Mimic Block
|
||||
tile.BloodMagic.mimic.nohitbox.name=Ethereal Opaque Mimic Block
|
||||
tile.BloodMagic.mimic.solidopaque.name=Opaque Mimic Block
|
||||
tile.BloodMagic.mimic.solidclear.name=Clear Ethereal Mimic Block
|
||||
tile.BloodMagic.mimic.solidlight.name=Lighted Ethereal Mimic Block
|
||||
tile.BloodMagic.mimic.sentient.name=Sentient Mimic Block
|
||||
|
||||
# Fluids
|
||||
fluid.lifeEssence=Life Essence
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 972 B |
Binary file not shown.
After Width: | Height: | Size: 901 B |
Binary file not shown.
After Width: | Height: | Size: 969 B |
Binary file not shown.
After Width: | Height: | Size: 964 B |
Binary file not shown.
After Width: | Height: | Size: 961 B |
Loading…
Reference in a new issue