Java Code Examples for net.minecraft.inventory.EntityEquipmentSlot#OFFHAND
The following examples show how to use
net.minecraft.inventory.EntityEquipmentSlot#OFFHAND .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CraftEntityEquipment.java From Kettle with GNU General Public License v3.0 | 5 votes |
private void setDropChance(EntityEquipmentSlot slot, float chance) { if (slot == EntityEquipmentSlot.MAINHAND || slot == EntityEquipmentSlot.OFFHAND) { ((EntityLiving) entity.getHandle()).inventoryHandsDropChances[slot.getIndex()] = chance - 0.1F; } else { ((EntityLiving) entity.getHandle()).inventoryArmorDropChances[slot.getIndex()] = chance - 0.1F; } }
Example 2
Source File: CraftEntityEquipment.java From Kettle with GNU General Public License v3.0 | 5 votes |
private float getDropChance(EntityEquipmentSlot slot) { if (slot == EntityEquipmentSlot.MAINHAND || slot == EntityEquipmentSlot.OFFHAND) { return ((EntityLiving) entity.getHandle()).inventoryHandsDropChances[slot.getIndex()] + 0.1F; } else { return ((EntityLiving) entity.getHandle()).inventoryArmorDropChances[slot.getIndex()] + 0.1F; } }
Example 3
Source File: EnchantmentDrain.java From TofuCraftReload with MIT License | 4 votes |
protected EnchantmentDrain() { super(Enchantment.Rarity.COMMON, EnchantmentLoader.typeDiamondTofu, new EntityEquipmentSlot[]{ EntityEquipmentSlot.MAINHAND,EntityEquipmentSlot.OFFHAND }); }
Example 4
Source File: EnchantmentBatch.java From TofuCraftReload with MIT License | 4 votes |
public EnchantmentBatch(){ super(Enchantment.Rarity.COMMON, EnchantmentLoader.typeDiamondTofu, new EntityEquipmentSlot[]{ EntityEquipmentSlot.MAINHAND,EntityEquipmentSlot.OFFHAND }); }
Example 5
Source File: EnchantmentWitherWeapon.java From EnderZoo with Creative Commons Zero v1.0 Universal | 4 votes |
public EnchantmentWitherWeapon() { super(Config.enchantmentWitherWeaponRarity, EnumEnchantmentType.WEAPON, new EntityEquipmentSlot[] {EntityEquipmentSlot.MAINHAND, EntityEquipmentSlot.OFFHAND}); setName(NAME); setRegistryName(NAME); }