Port attack event
This commit is contained in:
parent
f940f5c04f
commit
d127a2996a
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
138244
javascript/classes.js
138244
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -80,7 +80,7 @@ public class ModManager {
|
||||||
public static SmoothCamera smoothCamera;
|
public static SmoothCamera smoothCamera;
|
||||||
public FPSB fpsb = new FPSB();
|
public FPSB fpsb = new FPSB();
|
||||||
public static FakeArray fakeArray;
|
public static FakeArray fakeArray;
|
||||||
public static Animations animations;
|
public static Animations animations = new Animations();
|
||||||
public MinimalViewBobbing minimalViewBobbing = new MinimalViewBobbing();
|
public MinimalViewBobbing minimalViewBobbing = new MinimalViewBobbing();
|
||||||
public static Watermark watermark;
|
public static Watermark watermark;
|
||||||
public static NoSwingDelay noSwingDelay;
|
public static NoSwingDelay noSwingDelay;
|
||||||
|
@ -130,7 +130,7 @@ public class ModManager {
|
||||||
register(clearChat = new ClearChat());
|
register(clearChat = new ClearChat());
|
||||||
register(tooltips = new Tooltips());
|
register(tooltips = new Tooltips());
|
||||||
register(smoothCamera = new SmoothCamera());
|
register(smoothCamera = new SmoothCamera());
|
||||||
register(animations = new Animations());
|
register(animations);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,15 +4,17 @@ import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
|
||||||
|
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.base.Predicates;
|
import com.google.common.base.Predicates;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
|
import dev.resent.module.base.ModManager;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
import net.minecraft.enchantment.EnchantmentHelper;
|
||||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||||
import net.minecraft.entity.ai.attributes.BaseAttributeMap;
|
import net.minecraft.entity.ai.attributes.BaseAttributeMap;
|
||||||
|
@ -886,6 +888,11 @@ public abstract class EntityLivingBase extends Entity {
|
||||||
* account.
|
* account.
|
||||||
*/
|
*/
|
||||||
private int getArmSwingAnimationEnd() {
|
private int getArmSwingAnimationEnd() {
|
||||||
|
|
||||||
|
if(ModManager.animations.isEnabled() && Minecraft.getMinecraft().theWorld != null){
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
return this.isPotionActive(Potion.digSpeed)
|
return this.isPotionActive(Potion.digSpeed)
|
||||||
? 6 - (1 + this.getActivePotionEffect(Potion.digSpeed).getAmplifier()) * 1
|
? 6 - (1 + this.getActivePotionEffect(Potion.digSpeed).getAmplifier()) * 1
|
||||||
: (this.isPotionActive(Potion.digSlowdown)
|
: (this.isPotionActive(Potion.digSlowdown)
|
||||||
|
|
|
@ -2,11 +2,13 @@ package net.minecraft.entity.player;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
|
||||||
|
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
|
import dev.resent.Resent;
|
||||||
|
import dev.resent.event.impl.EventAttack;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||||
import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
|
import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockBed;
|
import net.minecraft.block.BlockBed;
|
||||||
|
@ -1018,6 +1020,10 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS
|
||||||
* Args: targetEntity
|
* Args: targetEntity
|
||||||
*/
|
*/
|
||||||
public void attackTargetEntityWithCurrentItem(Entity entity) {
|
public void attackTargetEntityWithCurrentItem(Entity entity) {
|
||||||
|
|
||||||
|
EventAttack event = new EventAttack(entity);
|
||||||
|
Resent.INSTANCE.events().post(event);
|
||||||
|
|
||||||
if (entity.canAttackWithItem()) {
|
if (entity.canAttackWithItem()) {
|
||||||
if (!entity.hitByEntity(this)) {
|
if (!entity.hitByEntity(this)) {
|
||||||
float f = (float) this.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
|
float f = (float) this.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user