mapping update, fixed missing target mixins
This commit is contained in:
1 parent
b9964c8da8
commit
286913ebd7
17 files changed
+37
-33
No files matched your search
+2
-2
@@ -5,8 +5,8 @@ org.gradle.jvmargs=-Xmx1G
|
||||
# check these on https://fabricmc.net/use
|
||||
# or better: https://modmuss50.me/fabric.html
|
||||
minecraft_version=20w10a
|
||||
yarn_mappings=20w10a+build.10
|
||||
loader_version=0.7.8+build.186
|
||||
yarn_mappings=20w10a+build.20
|
||||
loader_version=0.7.8+build.187
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.3.14+v200311
|
||||
|
||||
@@ -322,7 +322,11 @@ public class CarpetSettings
|
||||
@Rule(desc = "Placing carpets may issue carpet commands for non-op players", category = SURVIVAL)
|
||||
public static boolean carpets = false;
|
||||
|
||||
@Rule(desc = "Pistons, Glass and Sponge can be broken faster with their appropriate tools", category = SURVIVAL)
|
||||
@Rule(
|
||||
desc = "Glass and Sponge can be broken faster with their appropriate tools",
|
||||
extra = "Glass is pickaxes, sponge is shears",
|
||||
category = SURVIVAL
|
||||
)
|
||||
public static boolean missingTools = false;
|
||||
|
||||
//@Rule(desc = "Alternative, persistent caching strategy for nether portals", category = {SURVIVAL, CREATIVE})
|
||||
|
||||
@@ -80,7 +80,7 @@ public class DrawCommand
|
||||
final int ceilRadiusY = (int) Math.ceil(radiusY);
|
||||
final int ceilRadiusZ = (int) Math.ceil(radiusZ);
|
||||
|
||||
BlockPos.Mutable mbpos = pos.method_25503();
|
||||
BlockPos.Mutable mbpos = pos.mutableCopy();
|
||||
List<BlockPos> list = Lists.newArrayList();
|
||||
|
||||
double nextXn = 0;
|
||||
|
||||
@@ -489,7 +489,7 @@ public class ScriptCommand
|
||||
|
||||
boolean[][][] volume = new boolean[area.getBlockCountX()][area.getBlockCountY()][area.getBlockCountZ()];
|
||||
|
||||
BlockPos.Mutable mbpos = origin.method_25503();
|
||||
BlockPos.Mutable mbpos = origin.mutableCopy();
|
||||
ServerWorld world = source.getWorld();
|
||||
|
||||
for (int x = area.minX; x <= area.maxX; x++)
|
||||
|
||||
@@ -269,8 +269,8 @@ public class FeatureGenerator
|
||||
:simplePlop(Feature.CORAL_CLAW).plop(w, p));
|
||||
put("sea_pickle", simplePlop(Feature.SEA_PICKLE.configure( new SeaPickleFeatureConfig(20))));
|
||||
put("boulder", simplePlop(Feature.FOREST_ROCK.configure( new BoulderFeatureConfig(Blocks.MOSSY_COBBLESTONE.getDefaultState(), 0))));
|
||||
put("crimson_fungus", simplePlop(Feature.HUGE_FUNGUS.configure(HugeFungusFeatureConfig.field_22432)));
|
||||
put("warped_fungus", simplePlop(Feature.HUGE_FUNGUS.configure(HugeFungusFeatureConfig.field_22434)));
|
||||
put("crimson_fungus", simplePlop(Feature.HUGE_FUNGUS.configure(HugeFungusFeatureConfig.CRIMSON_FUNGUS_NOT_PLANTED_CONFIG)));
|
||||
put("warped_fungus", simplePlop(Feature.HUGE_FUNGUS.configure(HugeFungusFeatureConfig.WARPED_FUNGUS_NOT_PLANTED_CONFIG)));
|
||||
put("nether_sprouts", simplePlop(Feature.NETHER_FOREST_VEGETATION.configure(DefaultBiomeFeatures.NETHER_SPROUTS_CONFIG)));
|
||||
put("crimson_roots", simplePlop(Feature.NETHER_FOREST_VEGETATION.configure(DefaultBiomeFeatures.CRIMSON_ROOTS_CONFIG)));
|
||||
put("warped_roots", simplePlop(Feature.NETHER_FOREST_VEGETATION.configure(DefaultBiomeFeatures.WARPED_ROOTS_CONFIG)));
|
||||
|
||||
@@ -42,6 +42,7 @@ public abstract class CommandManagerMixin
|
||||
CarpetSettings.impendingFillSkipUpdates = false;
|
||||
}
|
||||
|
||||
// warning expected
|
||||
@Redirect(method = "execute", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lorg/apache/logging/log4j/Logger;isDebugEnabled()Z"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.container.Container;
|
||||
import net.minecraft.container.Slot;
|
||||
import net.minecraft.container.SlotActionType;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.screen.slot.SlotActionType;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
@@ -16,7 +16,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mixin(Container.class)
|
||||
@Mixin(ScreenHandler.class)
|
||||
public abstract class ContainerMixin
|
||||
{
|
||||
@Shadow @Final public List<Slot> slots;
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
@Mixin(PickaxeItem.class)
|
||||
public class PickaxeItem_missingToolsMixin
|
||||
{
|
||||
@Redirect(method = "getMiningSpeed", at = @At(
|
||||
@Redirect(method = "getMiningSpeedMultiplier", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/block/BlockState;getMaterial()Lnet/minecraft/block/Material;"
|
||||
))
|
||||
|
||||
@@ -18,16 +18,16 @@ public abstract class PlayerEntity_antiCheatDisabled
|
||||
{
|
||||
@Shadow public abstract ItemStack getEquippedStack(EquipmentSlot equipmentSlot_1);
|
||||
|
||||
@Shadow public abstract void method_23669();
|
||||
@Shadow public abstract void startFallFlying();
|
||||
|
||||
@Inject(method = "method_23668", at = @At("HEAD"), cancellable = true)
|
||||
@Inject(method = "checkFallFlying", at = @At("HEAD"), cancellable = true)
|
||||
private void allowDeploys(CallbackInfoReturnable<Boolean> cir)
|
||||
{
|
||||
if (CarpetSettings.antiCheatDisabled && CarpetServer.minecraft_server.isDedicated())
|
||||
{
|
||||
ItemStack itemStack_1 = getEquippedStack(EquipmentSlot.CHEST);
|
||||
if (itemStack_1.getItem() == Items.ELYTRA && ElytraItem.isUsable(itemStack_1)) {
|
||||
method_23669();
|
||||
startFallFlying();
|
||||
cir.setReturnValue(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,6 @@ public abstract class PlayerEntity_parrotMixin extends LivingEntity
|
||||
|
||||
@Shadow protected abstract void dropShoulderEntities();
|
||||
|
||||
@Shadow protected abstract void method_7296(CompoundTag compoundTag_1);
|
||||
|
||||
@Shadow public abstract CompoundTag getShoulderEntityLeft();
|
||||
|
||||
@Shadow protected abstract void setShoulderEntityLeft(CompoundTag compoundTag_1);
|
||||
@@ -33,7 +31,9 @@ public abstract class PlayerEntity_parrotMixin extends LivingEntity
|
||||
@Shadow protected abstract void setShoulderEntityRight(CompoundTag compoundTag_1);
|
||||
|
||||
@Shadow public abstract CompoundTag getShoulderEntityRight();
|
||||
|
||||
|
||||
@Shadow protected abstract void dropShoulderEntity(CompoundTag entityNbt);
|
||||
|
||||
protected PlayerEntity_parrotMixin(EntityType<? extends LivingEntity> entityType_1, World world_1)
|
||||
{
|
||||
super(entityType_1, world_1);
|
||||
@@ -66,13 +66,13 @@ public abstract class PlayerEntity_parrotMixin extends LivingEntity
|
||||
|
||||
protected void dismount_left()
|
||||
{
|
||||
this.method_7296(this.getShoulderEntityLeft());
|
||||
dropShoulderEntity(this.getShoulderEntityLeft());
|
||||
this.setShoulderEntityLeft(new CompoundTag());
|
||||
}
|
||||
|
||||
protected void dismount_right()
|
||||
{
|
||||
this.method_7296(this.getShoulderEntityRight());
|
||||
dropShoulderEntity(this.getShoulderEntityRight());
|
||||
this.setShoulderEntityRight(new CompoundTag());
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public class PortalForcer_portalSuffocationMixin
|
||||
CarpetSettings.fixedPosition = null;
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("UnresolvedMixinReference")
|
||||
@Redirect(method = "method_22391",at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/block/pattern/BlockPattern$Result;getTeleportTarget(Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/BlockPos;DLnet/minecraft/util/math/Vec3d;D)Lnet/minecraft/block/pattern/BlockPattern$TeleportTarget;"
|
||||
|
||||
@@ -193,7 +193,7 @@ public class ServerPlayNetworkHandler_scarpetEventsMixin
|
||||
|
||||
@Inject(method = "onClientCommand", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/server/network/ServerPlayerEntity;method_23668()Z",
|
||||
target = "Lnet/minecraft/server/network/ServerPlayerEntity;checkFallFlying()Z",
|
||||
shift = At.Shift.BEFORE
|
||||
))
|
||||
private void onElytraEngage(ClientCommandC2SPacket clientCommandC2SPacket_1, CallbackInfo ci)
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
@Mixin(ShearsItem.class)
|
||||
public class ShearsItem_missingToolsMixin
|
||||
{
|
||||
@Inject(method = "getMiningSpeed", at = @At("HEAD"), cancellable = true)
|
||||
@Inject(method = "getMiningSpeedMultiplier", at = @At("HEAD"), cancellable = true)
|
||||
private void getCustomMaterial(ItemStack itemStack_1, BlockState blockState_1, CallbackInfoReturnable<Float> cir)
|
||||
{
|
||||
if (CarpetSettings.missingTools && (blockState_1.getMaterial() == Material.SPONGE))
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
@Mixin(Structure.class)
|
||||
public class Structure_fillUpdatesMixin
|
||||
{
|
||||
@Redirect( method = "method_15172", at = @At(
|
||||
@Redirect( method = "place(Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/structure/StructurePlacementData;I)Z", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/IWorld;updateNeighbors(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;)V"
|
||||
))
|
||||
@@ -23,7 +23,7 @@ public class Structure_fillUpdatesMixin
|
||||
iWorld.updateNeighbors(var1, var2);
|
||||
}
|
||||
|
||||
@Redirect(method = "method_15172", at = @At(
|
||||
@Redirect(method = "place(Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/structure/StructurePlacementData;I)Z", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/structure/StructurePlacementData;shouldUpdateNeighbors()Z"
|
||||
))
|
||||
|
||||
+2
-2
@@ -52,8 +52,6 @@ public abstract class ThreadedAnvilChunkStorage_scarpetChunkCreationMixin implem
|
||||
|
||||
@Shadow private boolean chunkHolderListDirty;
|
||||
|
||||
@Shadow protected abstract void method_20458(long l, ChunkHolder chunkHolder);
|
||||
|
||||
@Shadow @Final private Queue<Runnable> field_19343;
|
||||
|
||||
@Shadow @Final private ServerLightingProvider serverLightingProvider;
|
||||
@@ -73,6 +71,8 @@ public abstract class ThreadedAnvilChunkStorage_scarpetChunkCreationMixin implem
|
||||
//in method_20617
|
||||
//method_19534(Lnet/minecraft/server/world/ChunkHolder;Lnet/minecraft/world/chunk/Chunk;)Ljava/util/concurrent/CompletableFuture;
|
||||
// incmopatibility with optifine makes this mixin fail.
|
||||
// lambda for convertToFullChunk
|
||||
@SuppressWarnings("UnresolvedMixinReference")
|
||||
@Inject(method = "method_19534", require = 0, at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/server/world/ThreadedAnvilChunkStorage;convertToFullChunk(Lnet/minecraft/server/world/ChunkHolder;)Ljava/util/concurrent/CompletableFuture;",
|
||||
|
||||
@@ -48,14 +48,13 @@ public abstract class World_movableTEMixin implements WorldInterface
|
||||
@Shadow
|
||||
public abstract void updateNeighborsAlways(BlockPos blockPos_1, Block block_1);
|
||||
|
||||
@Shadow
|
||||
public abstract void updateHorizontalAdjacent(BlockPos blockPos_1, Block block_1);
|
||||
|
||||
@Shadow
|
||||
public abstract void onBlockChanged(BlockPos blockPos_1, BlockState blockState_1, BlockState blockState_2);
|
||||
|
||||
@Shadow public abstract Profiler getProfiler();
|
||||
|
||||
@Shadow public abstract void updateComparators(BlockPos pos, Block block);
|
||||
|
||||
/**
|
||||
* @author 2No2Name
|
||||
*/
|
||||
@@ -116,7 +115,7 @@ public abstract class World_movableTEMixin implements WorldInterface
|
||||
this.updateNeighborsAlways(blockPos_1, blockState_2.getBlock());
|
||||
if (blockState_1.hasComparatorOutput())
|
||||
{
|
||||
this.updateHorizontalAdjacent(blockPos_1, block_1);
|
||||
updateComparators(blockPos_1, block_1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ import net.minecraft.item.MiningToolItem;
|
||||
import net.minecraft.item.ShearsItem;
|
||||
import net.minecraft.item.SwordItem;
|
||||
import net.minecraft.item.TridentItem;
|
||||
import net.minecraft.network.packet.s2c.play.ContainerSlotUpdateS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.play.ScreenHandlerSlotUpdateS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.play.PlaySoundIdS2CPacket;
|
||||
import net.minecraft.command.arguments.ItemStackArgument;
|
||||
import net.minecraft.command.arguments.ParticleArgumentType;
|
||||
@@ -2101,7 +2101,7 @@ public class CarpetExpression
|
||||
if (inventory.owner instanceof ServerPlayerEntity && !inventory.isEnder)
|
||||
{
|
||||
ServerPlayerEntity player = (ServerPlayerEntity) inventory.owner;
|
||||
player.networkHandler.sendPacket(new ContainerSlotUpdateS2CPacket(
|
||||
player.networkHandler.sendPacket(new ScreenHandlerSlotUpdateS2CPacket(
|
||||
-2,
|
||||
int_1,
|
||||
inventory.inventory.getInvStack(int_1)
|
||||
|
||||
Reference in new issue
Block a user