Added blood lamp reagent, sigil effects, and the blood lamp array.
This commit is contained in:
parent
9839dccd04
commit
27d63d5df3
11 changed files with 70 additions and 30 deletions
|
@ -29,6 +29,7 @@ public class ItemComponent extends Item
|
|||
public static final String REAGENT_BINDING = "reagentBinding";
|
||||
public static final String REAGENT_SUPPRESSION = "reagentSuppression";
|
||||
public static final String COMPONENT_FRAME_PART = "frameParts";
|
||||
public static final String REAGENT_BLOODLIGHT = "reagentBloodLight";
|
||||
|
||||
public ItemComponent()
|
||||
{
|
||||
|
@ -55,6 +56,7 @@ public class ItemComponent extends Item
|
|||
names.add(8, REAGENT_BINDING);
|
||||
names.add(9, REAGENT_SUPPRESSION);
|
||||
names.add(10, COMPONENT_FRAME_PART);
|
||||
names.add(11, REAGENT_BLOODLIGHT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemSigilBloodLight extends ItemSigilBase
|
||||
|
@ -23,7 +24,22 @@ public class ItemSigilBloodLight extends ItemSigilBase
|
|||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
if (BindableHelper.checkAndSetItemOwner(stack, player) && ItemBindable.syphonNetwork(stack, player, getLPUsed() * 5) && !world.isRemote)
|
||||
world.spawnEntityInWorld(new EntityBloodLight(world, player));
|
||||
{
|
||||
MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
|
||||
if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
BlockPos blockPos = mop.getBlockPos().offset(mop.sideHit);
|
||||
|
||||
if (world.isAirBlock(blockPos))
|
||||
{
|
||||
world.setBlockState(blockPos, ModBlocks.bloodLight.getDefaultState());
|
||||
}
|
||||
} else
|
||||
{
|
||||
world.spawnEntityInWorld(new EntityBloodLight(world, player));
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue