mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
Format cleanup
This commit is contained in:
1 parent
c6ef343106
commit
fdcb651ef4
130 files changed
+4066
-3266
No files matched your search
@@ -18,27 +18,27 @@ final class BehaviorDispenseArmorCopy extends BehaviorDefaultDispenseItem
|
||||
/**
|
||||
* Dispense the specified stack, play the dispense sound and spawn particles.
|
||||
*/
|
||||
protected ItemStack dispenseStack(IBlockSource par1IBlockSource, ItemStack par2ItemStack)
|
||||
protected ItemStack dispenseStack (IBlockSource par1IBlockSource, ItemStack par2ItemStack)
|
||||
{
|
||||
EnumFacing enumfacing = BlockDispenser.getFacing(par1IBlockSource.getBlockMetadata());
|
||||
int i = par1IBlockSource.getXInt() + enumfacing.getFrontOffsetX();
|
||||
int j = par1IBlockSource.getYInt() + enumfacing.getFrontOffsetY();
|
||||
int k = par1IBlockSource.getZInt() + enumfacing.getFrontOffsetZ();
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)i, (double)j, (double)k, (double)(i + 1), (double)(j + 1), (double)(k + 1));
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) i, (double) j, (double) k, (double) (i + 1), (double) (j + 1), (double) (k + 1));
|
||||
List list = par1IBlockSource.getWorld().selectEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb, new EntitySelectorArmoredMob(par2ItemStack));
|
||||
|
||||
if (list.size() > 0)
|
||||
{
|
||||
EntityLivingBase entitylivingbase = (EntityLivingBase)list.get(0);
|
||||
EntityLivingBase entitylivingbase = (EntityLivingBase) list.get(0);
|
||||
int l = entitylivingbase instanceof EntityPlayer ? 1 : 0;
|
||||
int i1 = EntityLiving.getArmorPosition(par2ItemStack);
|
||||
ItemStack itemstack1 = par2ItemStack.copy();
|
||||
itemstack1.stackSize = 1;
|
||||
entitylivingbase.setCurrentItemOrArmor(i1, itemstack1); //BUGFIX Forge: Vanilla bug fix associated with fixed setCurrentItemOrArmor indexs for players.
|
||||
entitylivingbase.setCurrentItemOrArmor(i1, itemstack1); //BUGFIX Forge: Vanilla bug fix associated with fixed setCurrentItemOrArmor indexs for players.
|
||||
|
||||
if (entitylivingbase instanceof EntityLiving)
|
||||
{
|
||||
((EntityLiving)entitylivingbase).setEquipmentDropChance(i1, 2.0F);
|
||||
((EntityLiving) entitylivingbase).setEquipmentDropChance(i1, 2.0F);
|
||||
}
|
||||
|
||||
--par2ItemStack.stackSize;
|
||||
|
||||
Reference in new issue
Block a user