Merge branch 'master' into future
# Conflicts: # gradle.properties
This commit is contained in:
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"))))).
|
||||
then(literal("test").
|
||||
executes( (c)-> runTest(c.getSource(), 72000, null)).
|
||||
then(argument("ticks", integer(10,720000)).
|
||||
then(argument("ticks", integer(10)).
|
||||
executes( (c)-> runTest(
|
||||
c.getSource(),
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user