Merge branch 'master' into 1.16
This commit is contained in:
commit
95a7420e7d
8 files changed
+179
-26
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.fakes.EntityInterface;
|
||||
import carpet.fakes.LivingEntityInterface;
|
||||
import carpet.script.EntityEventsGroup;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
@@ -8,14 +9,19 @@ import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.damage.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(LivingEntity.class)
|
||||
public abstract class LivingEntity_scarpetEventsMixin extends Entity
|
||||
public abstract class LivingEntity_scarpetEventsMixin extends Entity implements LivingEntityInterface
|
||||
{
|
||||
|
||||
@Shadow protected abstract void jump();
|
||||
|
||||
@Shadow protected boolean jumping;
|
||||
|
||||
public LivingEntity_scarpetEventsMixin(EntityType<?> type, World world)
|
||||
{
|
||||
super(type, world);
|
||||
@@ -26,4 +32,16 @@ public abstract class LivingEntity_scarpetEventsMixin extends Entity
|
||||
{
|
||||
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.EntityEventType.ON_DEATH, this, damageSource_1.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doJumpCM()
|
||||
{
|
||||
jump();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isJumpingCM()
|
||||
{
|
||||
return jumping;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user