Merge branch 'master' into future

This commit is contained in:
gnembon committed 2021-10-21 08:44:52 -03:00
commit f19b314b78
3 files changed
+11 -5

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ org.gradle.jvmargs=-Xmx1G
fabric_version=0.41.1+1.18
# Mod Properties
mod_version = 1.4.49
mod_version = 1.4.50
maven_group = carpet
archives_base_name = fabric-carpet
+1 -1
View File
@@ -43,7 +43,7 @@ import static carpet.settings.RuleCategory.CLIENT;
@SuppressWarnings("CanBeFinal")
public class CarpetSettings
{
public static final String carpetVersion = "1.4.49+v211021";
public static final String carpetVersion = "1.4.50+v211021";
public static final Logger LOG = LogManager.getLogger("carpet");
public static ThreadLocal<Boolean> skipGenerationChecks = ThreadLocal.withInitial(() -> false);
public static ThreadLocal<Boolean> impendingFillSkipUpdates = ThreadLocal.withInitial(() -> false);
@@ -4,17 +4,23 @@ import carpet.CarpetSettings;
import carpet.helpers.ThrowableSuppression;
import carpet.logging.LoggerRegistry;
import carpet.utils.Messenger;
import com.mojang.authlib.GameProfile;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.BaseText;
import net.minecraft.util.crash.CrashException;
import net.minecraft.util.math.BlockPos;
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(ServerPlayerEntity.class)
public class ServerPlayerEntity_updateSuppressionCrashFixMixin {
public abstract class ServerPlayerEntity_updateSuppressionCrashFixMixin extends PlayerEntity {
public ServerPlayerEntity_updateSuppressionCrashFixMixin(World world, BlockPos pos, float yaw, GameProfile profile) {
super(world, pos, yaw, profile);
}
@Redirect(
method = "playerTick()V",
@@ -26,11 +32,11 @@ public class ServerPlayerEntity_updateSuppressionCrashFixMixin {
)
private void fixUpdateSuppressionCrashPlayerTick(PlayerEntity playerEntity){
if (!CarpetSettings.updateSuppressionCrashFix) {
playerEntity.tick();
super.tick();
return;
}
try {
playerEntity.tick();
super.tick();
} catch (CrashException e) {
if (!(e.getCause() instanceof ThrowableSuppression throwableSuppression)) throw e;
logUpdateSuppressionPlayer(throwableSuppression.pos);