fix: todos
This commit is contained in:
5 files changed
+9
-7
No files matched your search
@@ -35,6 +35,10 @@ dependencies {
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = file("src/main/resources/slsa.accesswidener")
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
|
||||
+2
-3
@@ -1,11 +1,11 @@
|
||||
package com.github.zly2006.carpetslsaddition.mixin.entity;
|
||||
|
||||
import com.github.zly2006.carpetslsaddition.SLSCarpetSettings;
|
||||
import com.github.zly2006.carpetslsaddition.ServerMain;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.ItemEntity;
|
||||
import net.minecraft.entity.damage.DamageSource;
|
||||
import net.minecraft.entity.damage.DamageTypes;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.world.World;
|
||||
@@ -29,8 +29,7 @@ public abstract class MixinItemEntity extends Entity {
|
||||
|
||||
@Inject(method = "damage", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/ItemEntity;discard()V"), cancellable = true)
|
||||
private void damage(DamageSource source, float amount, CallbackInfoReturnable<Boolean> cir) {
|
||||
// TODO: 迁移至1.19.4时,需要修改DamageSource相关逻辑
|
||||
if (source == this.getDamageSources().fallingAnvil() && SLSCarpetSettings.obtainableReinforcedDeepSlate) {
|
||||
if (source.getTypeRegistryEntry().matchesKey(DamageTypes.FALLING_ANVIL) && SLSCarpetSettings.obtainableReinforcedDeepSlate) {
|
||||
if ((getStack().isOf(Items.DEEPSLATE) || getStack().isOf(Items.COBBLED_DEEPSLATE))
|
||||
&& getStack().getCount() == 64) {
|
||||
setStack(new ItemStack(Items.REINFORCED_DEEPSLATE));
|
||||
|
||||
+1
-4
@@ -5,13 +5,11 @@ import com.github.zly2006.carpetslsaddition.util.SitEntity;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.entity.decoration.ArmorStandEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.network.encryption.PlayerPublicKey;
|
||||
import net.minecraft.network.packet.s2c.play.EntityTrackerUpdateS2CPacket;
|
||||
import net.minecraft.server.network.ServerPlayNetworkHandler;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
@@ -60,8 +58,7 @@ public abstract class MixinServerPlayerEntity extends PlayerEntity {
|
||||
// 同步潜行状态到客户端
|
||||
// 如果不同步的话客户端会认为仍在潜行,从而碰撞箱的高度会计算错误
|
||||
if (sneakTimes == 0 && this.networkHandler != null) {
|
||||
// TODO: 构造函数改变,需要进行适配
|
||||
this.networkHandler.sendPacket(new EntityTrackerUpdateS2CPacket(this.getId(), this.getDataTracker(), true));
|
||||
this.networkHandler.sendPacket(new EntityTrackerUpdateS2CPacket(this.getId(), this.getDataTracker().getChangedEntries()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
"com.github.zly2006.carpetslsaddition.ServerMain"
|
||||
]
|
||||
},
|
||||
"accessWidener": "slsa.accesswidener",
|
||||
"mixins": [
|
||||
"slsaddition.mixins.json"
|
||||
],
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
accessWidener v1 named
|
||||
Reference in new issue
Block a user