Merge branch 'master' into 1.16

This commit is contained in:
gnembon committed 2020-03-15 23:26:44 -03:00
commit efbafdcf0b
5 files changed
+40 -3

No files matched your search

@@ -1,7 +1,9 @@
package carpet.mixins;
import carpet.fakes.EntityInterface;
import carpet.script.EntityEventsGroup;
import com.mojang.authlib.GameProfile;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.server.network.ServerPlayerEntity;
@@ -55,6 +57,12 @@ public abstract class ServerPlayerEntity_scarpetEventMixin extends PlayerEntity
STATISTICS.onPlayerStatistic((ServerPlayerEntity) (Object)this, stat, amount);
}
@Inject(method = "onDeath", at = @At("HEAD"))
private void onDeathEvent(DamageSource source, CallbackInfo ci)
{
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.EntityEventType.ON_DEATH, this, source.name);
}
@Redirect(method = "method_14218", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/network/ServerPlayerEntity;setSneaking(Z)V"