Merge branch 'master' into future

# Conflicts:
#	gradle.properties
This commit is contained in:
gnembon committed 2021-09-17 03:15:30 -03:00
commit 70754dbfe8
3 files changed
+30 -1

No files matched your search

@@ -63,7 +63,7 @@ public class SpawnCommand
executes( (c) -> recentSpawnsForType(c.getSource(), getString(c, "type"))))). executes( (c) -> recentSpawnsForType(c.getSource(), getString(c, "type"))))).
then(literal("test"). then(literal("test").
executes( (c)-> runTest(c.getSource(), 72000, null)). executes( (c)-> runTest(c.getSource(), 72000, null)).
then(argument("ticks", integer(10,720000)). then(argument("ticks", integer(10)).
executes( (c)-> runTest( executes( (c)-> runTest(
c.getSource(), c.getSource(),
getInteger(c, "ticks"), getInteger(c, "ticks"),
@@ -0,0 +1,27 @@
package carpet.mixins;
import carpet.CarpetSettings;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.world.GameRules;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(LivingEntity.class)
public abstract class LivingEntityMixin extends Entity
{
public LivingEntityMixin(EntityType<?> type, World world)
{
super(type, world);
}
@Redirect(method = "onDeath", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/LivingEntity;hasCustomName()Z"))
private boolean shouldLogDeaths(LivingEntity livingEntity)
{
return livingEntity.hasCustomName() && CarpetSettings.cleanLogs && world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES);
}
}
+2
View File
@@ -59,6 +59,8 @@
"ChunkTicketManager_spawnChunksMixin", "ChunkTicketManager_spawnChunksMixin",
"ServerWorld_spawnChunksMixin", "ServerWorld_spawnChunksMixin",
"LivingEntityMixin",
"MobEntityMixin", "MobEntityMixin",
"EntityTrackerEntry_leashFixMixin", "EntityTrackerEntry_leashFixMixin",