This commit is contained in:
gnembon committed 2020-01-03 00:13:05 -04:00
1 parent c568a3d258
commit 78ea9cd6e4
5 files changed
+9 -13

No files matched your search

+1 -1
View File
@@ -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;
@@ -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();
}
}
+2 -1
View File
@@ -170,7 +170,8 @@
"ClientPlayerInteractionManager_ghostBlocksMixin",
"BlockEntityRenderDispatcher_movableTEMixin",
"PistonBlockEntityRenderer_movableTEMixin"
"PistonBlockEntityRenderer_movableTEMixin",
"ClientPlayNetworkHandler_smoothClientAnimationsMixin"
],
"server": [
"MinecraftDedicatedServerMixin"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "carpet",
"version": "1.3.2",
"version": "1.3.3",
"name": "Carpet Mod in Fabric",
"description": "Carpet made out of fabric",