mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-27 15:33:03 +00:00
Fix armor rendering, start armor abilities
This commit is contained in:
1 parent
541a91432c
commit
c13c8f8050
13 files changed
+803
-75
No files matched your search
@@ -15,6 +15,8 @@ import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.IAttributeInstance;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@@ -25,7 +27,7 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.armor.items.TravelGear;
|
||||
import tconstruct.armor.model.BeltModel;
|
||||
import tconstruct.armor.model.BootBump;
|
||||
import tconstruct.armor.model.HiddenPlayerModel;
|
||||
@@ -41,13 +43,16 @@ import tconstruct.client.tabs.InventoryTabVanilla;
|
||||
import tconstruct.client.tabs.TabRegistry;
|
||||
import tconstruct.common.TProxyCommon;
|
||||
import tconstruct.library.accessory.IAccessoryModel;
|
||||
import tconstruct.library.modifier.IModifyable;
|
||||
import tconstruct.util.player.TPlayerStats;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
|
||||
public class ArmorProxyClient extends ArmorProxyCommon
|
||||
{
|
||||
@@ -56,23 +61,24 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
public static HiddenPlayerModel glove = new HiddenPlayerModel(0.25F, 4);
|
||||
public static HiddenPlayerModel vest = new HiddenPlayerModel(0.25f, 1);
|
||||
public static BeltModel belt = new BeltModel();
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize()
|
||||
public void initialize ()
|
||||
{
|
||||
registerGuiHandler();
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
FMLCommonHandler.instance().bus().register(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void registerGuiHandler()
|
||||
protected void registerGuiHandler ()
|
||||
{
|
||||
super.registerGuiHandler();
|
||||
TProxyCommon.registerClientGuiHandler(inventoryGui, this);
|
||||
TProxyCommon.registerClientGuiHandler(armorGuiID, this);
|
||||
TProxyCommon.registerClientGuiHandler(knapsackGuiID, this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
|
||||
{
|
||||
@@ -101,7 +107,7 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
FMLCommonHandler.instance().bus().register(new ArmorTickHandler());
|
||||
new ArmorTickHandler();
|
||||
}
|
||||
|
||||
|
||||
/* Keybindings */
|
||||
public static TControls controlInstance;
|
||||
|
||||
@@ -131,7 +137,6 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
settings.keyBindings = allKeys;
|
||||
settings.loadOptions();
|
||||
}
|
||||
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
@@ -292,7 +297,8 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
}
|
||||
|
||||
double zLevel = 0;
|
||||
|
||||
|
||||
/* Armor rendering */
|
||||
@SubscribeEvent
|
||||
public void adjustArmor (RenderPlayerEvent.SetArmorModel event)
|
||||
{
|
||||
@@ -315,14 +321,14 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
ArmorProxyClient.glove.isSneak = event.renderer.modelBipedMain.isSneak;
|
||||
ArmorProxyClient.glove.heldItemLeft = event.renderer.modelBipedMain.heldItemLeft;
|
||||
ArmorProxyClient.glove.heldItemRight = event.renderer.modelBipedMain.heldItemRight;
|
||||
|
||||
|
||||
ArmorProxyClient.belt.onGround = event.renderer.modelBipedMain.onGround;
|
||||
ArmorProxyClient.belt.isRiding = event.renderer.modelBipedMain.isRiding;
|
||||
ArmorProxyClient.belt.isChild = event.renderer.modelBipedMain.isChild;
|
||||
ArmorProxyClient.belt.isSneak = event.renderer.modelBipedMain.isSneak;
|
||||
|
||||
|
||||
renderArmorExtras(event);
|
||||
|
||||
|
||||
break;
|
||||
case 3:
|
||||
ArmorProxyClient.bootbump.onGround = event.renderer.modelBipedMain.onGround;
|
||||
@@ -332,8 +338,8 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void renderArmorExtras(RenderPlayerEvent.SetArmorModel event)
|
||||
|
||||
void renderArmorExtras (RenderPlayerEvent.SetArmorModel event)
|
||||
{
|
||||
float partialTick = event.partialRenderTick;
|
||||
|
||||
@@ -375,7 +381,7 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
float bodyRotation = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * partialTick;
|
||||
float limbSwing = player.prevLimbSwingAmount + (player.limbSwingAmount - player.prevLimbSwingAmount) * partialTick;
|
||||
float limbSwingMod = player.limbSwing - player.limbSwingAmount * (1.0F - partialTick);
|
||||
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.getPersistentID());
|
||||
TPlayerStats stats = TPlayerStats.get(player);
|
||||
if (stats.armor.inventory[1] != null)
|
||||
{
|
||||
Item item = stats.armor.inventory[1].getItem();
|
||||
@@ -402,7 +408,7 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private float interpolateRotation (float par1, float par2, float par3)
|
||||
{
|
||||
float f3;
|
||||
@@ -419,9 +425,110 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
|
||||
return par1 + par3 * f3;
|
||||
}
|
||||
|
||||
|
||||
protected float handleRotationFloat (EntityLivingBase par1EntityLivingBase, float par2)
|
||||
{
|
||||
return (float) par1EntityLivingBase.ticksExisted + par2;
|
||||
}
|
||||
|
||||
/* Abilities */
|
||||
|
||||
ItemStack prevFeet;
|
||||
double prevMotionY;
|
||||
boolean morphed;
|
||||
float prevMouseSensitivity;
|
||||
boolean sprint;
|
||||
|
||||
@EventHandler
|
||||
public void playerTick (TickEvent.PlayerTickEvent event)
|
||||
{
|
||||
System.out.println("Client Tick!");
|
||||
EntityPlayer player = event.player;
|
||||
TPlayerStats stats = TPlayerStats.get(player);
|
||||
if (mc.thePlayer.onGround)
|
||||
{
|
||||
controlInstance.landOnGround();
|
||||
}
|
||||
if (stats.climbWalls && player.isCollidedHorizontally && !player.isSneaking())
|
||||
{
|
||||
player.motionY = 0.1176D;
|
||||
player.fallDistance = 0.0f;
|
||||
}
|
||||
|
||||
//Feet changes
|
||||
ItemStack feet = player.getCurrentArmor(0);
|
||||
if (feet != null)
|
||||
{
|
||||
if (feet.getItem() instanceof TravelGear && player.stepHeight < 1.0f)
|
||||
{
|
||||
player.stepHeight += 0.6f;
|
||||
}
|
||||
if (feet.getItem() instanceof IModifyable && !player.isSneaking())
|
||||
{
|
||||
NBTTagCompound tag = feet.getTagCompound().getCompoundTag(((IModifyable) feet.getItem()).getBaseTagName());
|
||||
int sole = tag.getInteger("Slimy Soles");
|
||||
if (sole > 0)
|
||||
{
|
||||
if (!player.isSneaking() && player.onGround && prevMotionY < -0.4)
|
||||
player.motionY = -prevMotionY * (Math.min(0.99, sole * 0.2));
|
||||
}
|
||||
}
|
||||
prevMotionY = player.motionY;
|
||||
}
|
||||
if (feet != prevFeet)
|
||||
{
|
||||
if (prevFeet != null && prevFeet.getItem() instanceof TravelGear)
|
||||
player.stepHeight -= 0.6f;
|
||||
if (feet != null && feet.getItem() instanceof TravelGear)
|
||||
player.stepHeight += 0.6f;
|
||||
prevFeet = feet;
|
||||
}
|
||||
|
||||
//Legs or wing changes
|
||||
/*ItemStack legs = player.getCurrentArmor(1);
|
||||
if (legs != null && legs.getItem() instanceof IModifyable)
|
||||
{
|
||||
NBTTagCompound tag = legs.getTagCompound().getCompoundTag(((IModifyable) legs.getItem()).getBaseTagName());
|
||||
if (player.isSprinting())
|
||||
{
|
||||
if (!sprint)
|
||||
{
|
||||
sprint = true;
|
||||
int sprintboost = tag.getInteger("Sprint Assist");
|
||||
if (player.isSprinting() && sprintboost > 0)
|
||||
{
|
||||
prevMouseSensitivity = gs.mouseSensitivity;
|
||||
gs.mouseSensitivity *= 1 - (0.15 * sprintboost);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sprint)
|
||||
{
|
||||
sprint = false;
|
||||
gs.mouseSensitivity = prevMouseSensitivity;
|
||||
}
|
||||
}*/
|
||||
if (!player.isPlayerSleeping() && !morphed)
|
||||
{
|
||||
ItemStack chest = player.getCurrentArmor(2);
|
||||
if (chest == null || !(chest.getItem() instanceof IModifyable))
|
||||
{
|
||||
PlayerAbilityHelper.setEntitySize(player, 0.6F, 1.8F);
|
||||
}
|
||||
else
|
||||
{
|
||||
NBTTagCompound tag = chest.getTagCompound().getCompoundTag(((IModifyable) chest.getItem()).getBaseTagName());
|
||||
int dodge = tag.getInteger("Perfect Dodge");
|
||||
if (dodge > 0)
|
||||
{
|
||||
PlayerAbilityHelper.setEntitySize(player, Math.max(0.15F, 0.6F - (dodge * 0.09f)), 1.8F - (dodge * 0.04f));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EntityPlayer getPlayer ()
|
||||
{
|
||||
return mc.thePlayer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package tconstruct.armor;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.*;
|
||||
import net.minecraft.potion.*;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.util.player.TPlayerStats;
|
||||
|
||||
public class PlayerAbilityHelper
|
||||
{
|
||||
|
||||
public static void toggleGoggles (EntityPlayer player)
|
||||
{
|
||||
TPlayerStats stats = TPlayerStats.get(player);
|
||||
stats.activeGoggles = !stats.activeGoggles;
|
||||
if (!stats.activeGoggles)
|
||||
{
|
||||
player.removePotionEffect(Potion.nightVision.id);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 15 * 20, 0, true));
|
||||
}
|
||||
}
|
||||
|
||||
public static void swapBelt (EntityPlayer player, TPlayerStats stats)
|
||||
{
|
||||
NBTTagList slots = new NBTTagList();
|
||||
InventoryPlayer hotbar = player.inventory;
|
||||
|
||||
NBTTagCompound itemTag;
|
||||
|
||||
for (int i = 0; i < 9; ++i)
|
||||
{
|
||||
if (hotbar.mainInventory[i] != null)
|
||||
{
|
||||
itemTag = new NBTTagCompound();
|
||||
itemTag.setByte("Slot", (byte) i);
|
||||
hotbar.mainInventory[i].writeToNBT(itemTag);
|
||||
slots.appendTag(itemTag);
|
||||
}
|
||||
hotbar.mainInventory[i] = null;
|
||||
}
|
||||
|
||||
ItemStack belt = stats.armor.inventory[3];
|
||||
NBTTagList replaceSlots = belt.getTagCompound().getTagList("Inventory", 10);
|
||||
for (int i = 0; i < replaceSlots.tagCount(); ++i)
|
||||
{
|
||||
NBTTagCompound nbttagcompound = replaceSlots.getCompoundTagAt(i);
|
||||
int j = nbttagcompound.getByte("Slot") & 255;
|
||||
ItemStack itemstack = ItemStack.loadItemStackFromNBT(nbttagcompound);
|
||||
|
||||
if (itemstack != null)
|
||||
{
|
||||
if (j >= 0 && j < hotbar.mainInventory.length)
|
||||
{
|
||||
hotbar.mainInventory[j] = itemstack;
|
||||
}
|
||||
}
|
||||
}
|
||||
belt.getTagCompound().setTag("Inventory", slots);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void setEntitySize(Entity entity, float width, float height)
|
||||
{
|
||||
float f2;
|
||||
|
||||
if (width != entity.width || height != entity.height)
|
||||
{
|
||||
f2 = entity.width;
|
||||
entity.width = width;
|
||||
entity.height = height;
|
||||
entity.boundingBox.maxX = entity.boundingBox.minX + (double)entity.width;
|
||||
entity.boundingBox.maxZ = entity.boundingBox.minZ + (double)entity.width;
|
||||
entity.boundingBox.maxY = entity.boundingBox.minY + (double)entity.height;
|
||||
|
||||
if (entity.width > f2 && !entity.worldObj.isRemote)
|
||||
{
|
||||
entity.moveEntity((double)(f2 - entity.width), 0.0D, (double)(f2 - entity.width));
|
||||
}
|
||||
}
|
||||
|
||||
f2 = width % 2.0F;
|
||||
|
||||
if ((double)f2 < 0.375D)
|
||||
{
|
||||
entity.myEntitySize = Entity.EnumEntitySize.SIZE_1;
|
||||
}
|
||||
else if ((double)f2 < 0.75D)
|
||||
{
|
||||
entity.myEntitySize = Entity.EnumEntitySize.SIZE_2;
|
||||
}
|
||||
else if ((double)f2 < 1.0D)
|
||||
{
|
||||
entity.myEntitySize = Entity.EnumEntitySize.SIZE_3;
|
||||
}
|
||||
else if ((double)f2 < 1.375D)
|
||||
{
|
||||
entity.myEntitySize = Entity.EnumEntitySize.SIZE_4;
|
||||
}
|
||||
else if ((double)f2 < 1.75D)
|
||||
{
|
||||
entity.myEntitySize = Entity.EnumEntitySize.SIZE_5;
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.myEntitySize = Entity.EnumEntitySize.SIZE_6;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ import tconstruct.library.crafting.LiquidCasting;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
import tconstruct.world.items.GoldenHead;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
@@ -40,7 +41,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(id = "Tinkers' Armor", description = "Modifyable armors, such as the traveller's gear.")
|
||||
@Pulse(id = "Tinkers' Armory", description = "Modifyable armors, such as the traveller's gear.")
|
||||
public class TinkerArmor
|
||||
{
|
||||
@PulseProxy(clientSide = "tconstruct.armor.ArmorProxyClient", serverSide = "tconstruct.armor.ArmorProxyCommon")
|
||||
@@ -73,15 +74,14 @@ public class TinkerArmor
|
||||
public static TravelGear travelBoots;
|
||||
public static AccessoryCore travelGlove;
|
||||
public static AccessoryCore travelBelt;
|
||||
|
||||
public TinkerArmor()
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(new TinkerArmorEvents());
|
||||
}
|
||||
|
||||
|
||||
@Handler
|
||||
public void preInit (FMLPreInitializationEvent event)
|
||||
{
|
||||
TinkerArmorEvents events = new TinkerArmorEvents();
|
||||
MinecraftForge.EVENT_BUS.register(events);
|
||||
FMLCommonHandler.instance().bus().register(events);
|
||||
|
||||
TinkerArmor.dryingRack = new DryingRack().setBlockName("Armor.DryingRack");
|
||||
GameRegistry.registerBlock(TinkerArmor.dryingRack, "Armor.DryingRack");
|
||||
GameRegistry.registerTileEntity(DryingRackLogic.class, "Armor.DryingRack");
|
||||
|
||||
@@ -3,23 +3,22 @@ package tconstruct.armor;
|
||||
import net.minecraft.entity.boss.EntityDragon;
|
||||
import net.minecraft.entity.boss.IBossDisplayData;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.util.ItemHelper;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
import tconstruct.armor.items.TravelWings;
|
||||
import tconstruct.library.modifier.IModifyable;
|
||||
import tconstruct.util.player.TPlayerStats;
|
||||
import tconstruct.world.entity.BlueSlime;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
|
||||
public class TinkerArmorEvents
|
||||
{
|
||||
@@ -56,4 +55,87 @@ public class TinkerArmorEvents
|
||||
event.drops.add(entityitem);
|
||||
}
|
||||
}
|
||||
|
||||
//Abilities
|
||||
boolean morphed;
|
||||
boolean morphLoaded = Loader.isModLoaded("Morph");
|
||||
|
||||
@EventHandler
|
||||
public void playerTick (TickEvent.PlayerTickEvent event)
|
||||
{
|
||||
System.out.println("Server Tick!");
|
||||
EntityPlayer player = event.player;
|
||||
TPlayerStats stats = TPlayerStats.get(player);
|
||||
if (stats.climbWalls)
|
||||
{
|
||||
double motionX = player.posX - player.lastTickPosX;
|
||||
double motionZ = player.posZ - player.lastTickPosZ;
|
||||
double motionY = player.posY - player.lastTickPosY - 0.762;
|
||||
if (motionY > 0.0D && (motionX == 0D || motionZ == 0D))
|
||||
{
|
||||
player.fallDistance = 0.0F;
|
||||
}
|
||||
}
|
||||
//TODO: Proper minimap support
|
||||
/*ItemStack stack = player.inventory.getStackInSlot(8);
|
||||
if (stack != null && stack.getItem() instanceof ItemMap)
|
||||
{
|
||||
stack.getItem().onUpdate(stack, player.worldObj, player, 8, true);
|
||||
}*/
|
||||
if (!player.isPlayerSleeping())
|
||||
{
|
||||
ItemStack chest = player.getCurrentArmor(2);
|
||||
if (chest == null || !(chest.getItem() instanceof IModifyable))
|
||||
{
|
||||
if (!morphLoaded || !morphed)
|
||||
PlayerAbilityHelper.setEntitySize(player, 0.6F, 1.8F);
|
||||
}
|
||||
else
|
||||
{
|
||||
NBTTagCompound tag = chest.getTagCompound().getCompoundTag(((IModifyable) chest.getItem()).getBaseTagName());
|
||||
int dodge = tag.getInteger("Perfect Dodge");
|
||||
if (dodge > 0)
|
||||
{
|
||||
if (!morphLoaded || !morphed)
|
||||
PlayerAbilityHelper.setEntitySize(player, Math.max(0.15F, 0.6F - (dodge * 0.09f)), 1.8F - (dodge * 0.04f));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Abilities */
|
||||
@EventHandler
|
||||
public void armorMineSpeed (net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed event)
|
||||
{
|
||||
TPlayerStats stats = TPlayerStats.get(event.entityPlayer);
|
||||
float modifier = 1f + stats.mineSpeed / 1000f;
|
||||
float base = stats.mineSpeed / 250f;
|
||||
event.newSpeed = (event.newSpeed + base) * modifier;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void jumpHeight (LivingJumpEvent event)
|
||||
{
|
||||
ItemStack stack = event.entityLiving.getEquipmentInSlot(2);
|
||||
if (stack != null && stack.getItem() instanceof TravelWings)
|
||||
{
|
||||
event.entityLiving.motionY += 0.2;
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void slimefall (LivingFallEvent event)
|
||||
{
|
||||
ItemStack boots = event.entityLiving.getEquipmentInSlot(1);
|
||||
if (boots != null && boots.getItem() instanceof IModifyable)
|
||||
{
|
||||
NBTTagCompound tag = boots.getTagCompound().getCompoundTag(((IModifyable) boots.getItem()).getBaseTagName());
|
||||
int sole = tag.getInteger("Slimy Soles");
|
||||
if (sole > 0)
|
||||
{
|
||||
event.distance /= (1 + sole);
|
||||
event.entityLiving.fallDistance /= (1 + sole);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user