1.3.3
This commit is contained in:
1 parent
c568a3d258
commit
78ea9cd6e4
5 files changed
+9
-13
No files matched your search
@@ -31,7 +31,7 @@ import static carpet.settings.RuleCategory.DISPENSER;
|
||||
|
||||
public class CarpetSettings
|
||||
{
|
||||
public static final String carpetVersion = "1.3.2+v191230";
|
||||
public static final String carpetVersion = "1.3.3+v200103";
|
||||
public static final Logger LOG = LogManager.getLogger();
|
||||
public static boolean skipGenerationChecks = false;
|
||||
public static boolean impendingFillSkipUpdates = false;
|
||||
|
||||
+4
-9
@@ -14,10 +14,8 @@ 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.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
import org.spongepowered.asm.mixin.injection.struct.InjectionInfo;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
@@ -25,9 +23,8 @@ import java.util.Iterator;
|
||||
public class ClientPlayNetworkHandler_smoothClientAnimationsMixin
|
||||
{
|
||||
@Shadow private ClientWorld world;
|
||||
|
||||
// as suggested by G4me4u
|
||||
@Inject( method = "onChunkData", locals = LocalCapture.CAPTURE_FAILSOFT, require = 0, at = @At(
|
||||
// fix as suggested by G4me4u
|
||||
@Inject( method = "onChunkData", locals = LocalCapture.CAPTURE_FAILHARD, require = 0, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/world/ClientWorld;getBlockEntity(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/entity/BlockEntity;",
|
||||
shift = At.Shift.AFTER
|
||||
@@ -35,19 +32,17 @@ public class ClientPlayNetworkHandler_smoothClientAnimationsMixin
|
||||
private void recreateMovingPistons(ChunkDataS2CPacket packet, CallbackInfo ci,
|
||||
Iterator var5, CompoundTag tag, BlockPos blockPos)
|
||||
{
|
||||
if (CarpetSettings.smoothClientAnimations) //WIP
|
||||
if (CarpetSettings.smoothClientAnimations)
|
||||
{
|
||||
BlockEntity blockEntity = world.getBlockEntity(blockPos);
|
||||
if (blockEntity == null && "minecraft:piston".equals(tag.getString("id")))
|
||||
{
|
||||
BlockState blockState = world.getBlockState(blockPos);
|
||||
if (blockState.getBlock() == Blocks.MOVING_PISTON) {
|
||||
tag.putFloat("progress", Math.min(tag.getFloat("progress") + 0.5F, 1.0F));
|
||||
blockEntity = new PistonBlockEntity();
|
||||
blockEntity.fromTag(tag);
|
||||
world.setBlockEntity(blockPos, blockEntity);
|
||||
|
||||
// Probably not needed but it's done in
|
||||
// other places so let's keep the standard.
|
||||
blockEntity.resetBlock();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user