Merge branch 'master' into 1.17
# Conflicts: # src/main/java/carpet/mixins/ClientPlayNetworkHandler_smoothClientAnimationsMixin.java
This commit is contained in:
commit
f306da7cc2
6 files changed
+5
-58
No files matched your search
+1
-1
@@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
loader_version=0.10.6+build.214
|
loader_version=0.10.6+build.214
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.4.15+v201102
|
mod_version = 1.4.16+v201105
|
||||||
maven_group = carpet
|
maven_group = carpet
|
||||||
archives_base_name = fabric-carpet
|
archives_base_name = fabric-carpet
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import static carpet.settings.RuleCategory.CLIENT;
|
|||||||
@SuppressWarnings("CanBeFinal")
|
@SuppressWarnings("CanBeFinal")
|
||||||
public class CarpetSettings
|
public class CarpetSettings
|
||||||
{
|
{
|
||||||
public static final String carpetVersion = "1.4.15+v201102";
|
public static final String carpetVersion = "1.4.16+v201105";
|
||||||
public static final Logger LOG = LogManager.getLogger("carpet");
|
public static final Logger LOG = LogManager.getLogger("carpet");
|
||||||
public static boolean skipGenerationChecks = false;
|
public static boolean skipGenerationChecks = false;
|
||||||
public static boolean impendingFillSkipUpdates = false;
|
public static boolean impendingFillSkipUpdates = false;
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
package carpet.mixins;
|
|
||||||
|
|
||||||
import carpet.CarpetSettings;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.Blocks;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.block.entity.PistonBlockEntity;
|
|
||||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
|
||||||
import net.minecraft.network.packet.s2c.play.ChunkDataS2CPacket;
|
|
||||||
import net.minecraft.client.world.ClientWorld;
|
|
||||||
import net.minecraft.nbt.CompoundTag;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
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.callback.CallbackInfo;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
|
||||||
|
|
||||||
import java.util.Iterator;
|
|
||||||
|
|
||||||
@Mixin(ClientPlayNetworkHandler.class)
|
|
||||||
public class ClientPlayNetworkHandler_smoothClientAnimationsMixin
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
@Shadow private ClientWorld world;
|
|
||||||
// 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
|
|
||||||
))
|
|
||||||
private void recreateMovingPistons(ChunkDataS2CPacket packet, CallbackInfo ci,
|
|
||||||
//int i, int j, BiomeArray biomeArray, WorldChunk worldChunk,
|
|
||||||
Iterator var5, CompoundTag tag, BlockPos blockPos)
|
|
||||||
{
|
|
||||||
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(blockState, tag);
|
|
||||||
world.setBlockEntity(blockPos, blockEntity);
|
|
||||||
blockEntity.resetBlock();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
@@ -8,6 +8,7 @@ import carpet.script.value.FunctionValue;
|
|||||||
import carpet.script.value.Value;
|
import carpet.script.value.Value;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class FunctionArgument extends Argument
|
public class FunctionArgument extends Argument
|
||||||
@@ -46,7 +47,7 @@ public class FunctionArgument extends Argument
|
|||||||
Value functionValue = params.get(offset).evalValue(c);
|
Value functionValue = params.get(offset).evalValue(c);
|
||||||
if (functionValue.isNull())
|
if (functionValue.isNull())
|
||||||
{
|
{
|
||||||
if (allowNone) return new FunctionArgument(null, offset+1, null);
|
if (allowNone) return new FunctionArgument(null, offset+1, Collections.emptyList());
|
||||||
throw new InternalExpressionException("function argument cannot be null");
|
throw new InternalExpressionException("function argument cannot be null");
|
||||||
}
|
}
|
||||||
if (!(functionValue instanceof FunctionValue))
|
if (!(functionValue instanceof FunctionValue))
|
||||||
|
|||||||
@@ -197,7 +197,6 @@
|
|||||||
"InGameHudMixin",
|
"InGameHudMixin",
|
||||||
"PlayerListHudMixin",
|
"PlayerListHudMixin",
|
||||||
"PistonBlockEntityRenderer_movableTEMixin",
|
"PistonBlockEntityRenderer_movableTEMixin",
|
||||||
"ClientPlayNetworkHandler_smoothClientAnimationsMixin",
|
|
||||||
"ClientPlayerEntity_clientCommandMixin",
|
"ClientPlayerEntity_clientCommandMixin",
|
||||||
"WorldRenderer_fogOffMixin",
|
"WorldRenderer_fogOffMixin",
|
||||||
"WorldRenderer_creativeNoClipMixin",
|
"WorldRenderer_creativeNoClipMixin",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"id": "carpet",
|
"id": "carpet",
|
||||||
"version": "1.4.15",
|
"version": "1.4.16",
|
||||||
|
|
||||||
"name": "Carpet Mod in Fabric",
|
"name": "Carpet Mod in Fabric",
|
||||||
"description": "Carpet made out of fabric",
|
"description": "Carpet made out of fabric",
|
||||||
|
|||||||
Reference in new issue
Block a user