23w06a
This commit is contained in:
1 parent
277872b33c
commit
41e33503fb
9 files changed
+20
-20
No files matched your search
@@ -9,7 +9,6 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntitySelector;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
@@ -62,7 +61,7 @@ public abstract class LivingEntity_maxCollisionsMixin extends Entity
|
||||
}
|
||||
|
||||
if (candidates > maxEntityCramming - 1) {
|
||||
this.hurt(DamageSource.CRAMMING, 6.0F);
|
||||
this.hurt(damageSources().cramming(), 6.0F);
|
||||
}
|
||||
}
|
||||
if (CarpetSettings.maxEntityCollisions > 0 && entities.size() > CarpetSettings.maxEntityCollisions)
|
||||
|
||||
@@ -34,7 +34,7 @@ public abstract class LivingEntity_scarpetEventsMixin extends Entity implements
|
||||
@Inject(method = "die", at = @At("HEAD"))
|
||||
private void onDeathCall(DamageSource damageSource_1, CallbackInfo ci)
|
||||
{
|
||||
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.Event.ON_DEATH, damageSource_1.msgId);
|
||||
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.Event.ON_DEATH, damageSource_1.getMsgId());
|
||||
}
|
||||
|
||||
@Inject(method = "actuallyHurt", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(
|
||||
|
||||
@@ -3,6 +3,7 @@ package carpet.mixins;
|
||||
import carpet.fakes.ServerWorldInterface;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.util.profiling.ProfilerFiller;
|
||||
@@ -40,8 +41,9 @@ import static carpet.script.CarpetEventServer.Event.CHUNK_UNLOADED;
|
||||
@Mixin(ServerLevel.class)
|
||||
public abstract class ServerLevel_scarpetMixin extends Level implements ServerWorldInterface
|
||||
{
|
||||
protected ServerLevel_scarpetMixin(WritableLevelData writableLevelData, ResourceKey<Level> resourceKey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean bl, boolean bl2, long l, int i) {
|
||||
super(writableLevelData, resourceKey, holder, supplier, bl, bl2, l, i);
|
||||
protected ServerLevel_scarpetMixin(WritableLevelData writableLevelData, ResourceKey<Level> resourceKey, RegistryAccess registryAccess, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean bl, boolean bl2, long l, int i)
|
||||
{
|
||||
super(writableLevelData, resourceKey, registryAccess, holder, supplier, bl, bl2, l, i);
|
||||
}
|
||||
|
||||
@Inject(method = "tickChunk", locals = LocalCapture.CAPTURE_FAILHARD, at = @At(
|
||||
|
||||
@@ -3,6 +3,7 @@ package carpet.mixins;
|
||||
import carpet.helpers.TickSpeed;
|
||||
import carpet.utils.CarpetProfiler;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -24,11 +25,9 @@ import net.minecraft.world.level.storage.WritableLevelData;
|
||||
@Mixin(ServerLevel.class)
|
||||
public abstract class ServerLevel_tickMixin extends Level
|
||||
{
|
||||
|
||||
|
||||
protected ServerLevel_tickMixin(WritableLevelData writableLevelData, ResourceKey<Level> resourceKey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean bl, boolean bl2, long l, int i)
|
||||
protected ServerLevel_tickMixin(final WritableLevelData writableLevelData, final ResourceKey<Level> resourceKey, final RegistryAccess registryAccess, final Holder<DimensionType> holder, final Supplier<ProfilerFiller> supplier, final boolean bl, final boolean bl2, final long l, final int i)
|
||||
{
|
||||
super(writableLevelData, resourceKey, holder, supplier, bl, bl2, l, i);
|
||||
super(writableLevelData, resourceKey, registryAccess, holder, supplier, bl, bl2, l, i);
|
||||
}
|
||||
|
||||
@Shadow protected abstract void runBlockEvents();
|
||||
|
||||
@@ -42,7 +42,7 @@ public abstract class ServerPlayer_scarpetEventMixin extends Player implements S
|
||||
super(level, blockPos, f, gameProfile);
|
||||
}
|
||||
|
||||
@Shadow protected abstract void completeUsingItem();
|
||||
//@Shadow protected abstract void completeUsingItem();
|
||||
|
||||
@Shadow public boolean wonGame;
|
||||
|
||||
@@ -76,7 +76,7 @@ public abstract class ServerPlayer_scarpetEventMixin extends Player implements S
|
||||
@Inject(method = "die", at = @At("HEAD"))
|
||||
private void onDeathEvent(DamageSource source, CallbackInfo ci)
|
||||
{
|
||||
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.Event.ON_DEATH, source.msgId);
|
||||
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.Event.ON_DEATH, source.getMsgId());
|
||||
if (PLAYER_DIES.isNeeded())
|
||||
{
|
||||
PLAYER_DIES.onPlayerEvent((ServerPlayer) (Object)this);
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
@Mixin(SummonCommand.class)
|
||||
public class SummonCommand_lightningMixin
|
||||
{
|
||||
@Redirect(method = "spawnEntity", at = @At(
|
||||
@Redirect(method = "createEntity", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/entity/Entity;blockPosition()Lnet/minecraft/core/BlockPos;"
|
||||
))
|
||||
|
||||
Reference in new issue
Block a user