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
@@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.7.2+build.174 loader_version=0.7.2+build.174
# Mod Properties # Mod Properties
mod_version = 1.3.2+v191230 mod_version = 1.3.3+v200103
maven_group = carpet maven_group = carpet
archives_base_name = fabric-carpet archives_base_name = fabric-carpet
+1 -1
View File
@@ -31,7 +31,7 @@ import static carpet.settings.RuleCategory.DISPENSER;
public class CarpetSettings 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 final Logger LOG = LogManager.getLogger();
public static boolean skipGenerationChecks = false; public static boolean skipGenerationChecks = false;
public static boolean impendingFillSkipUpdates = 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.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; 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.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture; import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import org.spongepowered.asm.mixin.injection.struct.InjectionInfo;
import java.util.Iterator; import java.util.Iterator;
@@ -25,9 +23,8 @@ import java.util.Iterator;
public class ClientPlayNetworkHandler_smoothClientAnimationsMixin public class ClientPlayNetworkHandler_smoothClientAnimationsMixin
{ {
@Shadow private ClientWorld world; @Shadow private ClientWorld world;
// fix as suggested by G4me4u
// as suggested by G4me4u @Inject( method = "onChunkData", locals = LocalCapture.CAPTURE_FAILHARD, require = 0, at = @At(
@Inject( method = "onChunkData", locals = LocalCapture.CAPTURE_FAILSOFT, require = 0, at = @At(
value = "INVOKE", value = "INVOKE",
target = "Lnet/minecraft/client/world/ClientWorld;getBlockEntity(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/entity/BlockEntity;", target = "Lnet/minecraft/client/world/ClientWorld;getBlockEntity(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/entity/BlockEntity;",
shift = At.Shift.AFTER shift = At.Shift.AFTER
@@ -35,19 +32,17 @@ public class ClientPlayNetworkHandler_smoothClientAnimationsMixin
private void recreateMovingPistons(ChunkDataS2CPacket packet, CallbackInfo ci, private void recreateMovingPistons(ChunkDataS2CPacket packet, CallbackInfo ci,
Iterator var5, CompoundTag tag, BlockPos blockPos) Iterator var5, CompoundTag tag, BlockPos blockPos)
{ {
if (CarpetSettings.smoothClientAnimations) //WIP if (CarpetSettings.smoothClientAnimations)
{ {
BlockEntity blockEntity = world.getBlockEntity(blockPos); BlockEntity blockEntity = world.getBlockEntity(blockPos);
if (blockEntity == null && "minecraft:piston".equals(tag.getString("id"))) if (blockEntity == null && "minecraft:piston".equals(tag.getString("id")))
{ {
BlockState blockState = world.getBlockState(blockPos); BlockState blockState = world.getBlockState(blockPos);
if (blockState.getBlock() == Blocks.MOVING_PISTON) { if (blockState.getBlock() == Blocks.MOVING_PISTON) {
tag.putFloat("progress", Math.min(tag.getFloat("progress") + 0.5F, 1.0F));
blockEntity = new PistonBlockEntity(); blockEntity = new PistonBlockEntity();
blockEntity.fromTag(tag); blockEntity.fromTag(tag);
world.setBlockEntity(blockPos, blockEntity); world.setBlockEntity(blockPos, blockEntity);
// Probably not needed but it's done in
// other places so let's keep the standard.
blockEntity.resetBlock(); blockEntity.resetBlock();
} }
} }
+2 -1
View File
@@ -170,7 +170,8 @@
"ClientPlayerInteractionManager_ghostBlocksMixin", "ClientPlayerInteractionManager_ghostBlocksMixin",
"BlockEntityRenderDispatcher_movableTEMixin", "BlockEntityRenderDispatcher_movableTEMixin",
"PistonBlockEntityRenderer_movableTEMixin" "PistonBlockEntityRenderer_movableTEMixin",
"ClientPlayNetworkHandler_smoothClientAnimationsMixin"
], ],
"server": [ "server": [
"MinecraftDedicatedServerMixin" "MinecraftDedicatedServerMixin"
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"id": "carpet", "id": "carpet",
"version": "1.3.2", "version": "1.3.3",
"name": "Carpet Mod in Fabric", "name": "Carpet Mod in Fabric",
"description": "Carpet made out of fabric", "description": "Carpet made out of fabric",