9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-23 17:09:19 +00:00

feat(client-mod): 修复客户端视觉问题

This commit is contained in:
jhqwqmc
2025-03-24 14:26:01 +08:00
parent 0f7f5e87d9
commit 36edf67dfe
4 changed files with 6 additions and 5 deletions

View File

@@ -161,11 +161,11 @@ public class BukkitNetworkManager implements NetworkManager, Listener {
@EventHandler @EventHandler
public void onPlayerRegisterChannel(PlayerRegisterChannelEvent event) { public void onPlayerRegisterChannel(PlayerRegisterChannelEvent event) {
if (!event.getChannel().equals("craftengine:payload")) return;
Player player = event.getPlayer(); Player player = event.getPlayer();
NetWorkUser user = getUser(player); NetWorkUser user = getUser(player);
if (user != null) { if (user == null) return;
user.setUsingClientMod(true); user.setUsingClientMod(true);
}
} }
@Override @Override

View File

@@ -19,6 +19,8 @@ sourceSets {
runtimeClasspath += sourceSets.main.get().runtimeClasspath runtimeClasspath += sourceSets.main.get().runtimeClasspath
} }
main { main {
compileClasspath += sourceSets["client"].output
runtimeClasspath += sourceSets["client"].output
output.dir(sourceSets["client"].output) output.dir(sourceSets["client"].output)
} }
} }

View File

@@ -13,7 +13,7 @@ public class BlockUtils {
if (world != null && pos != null) { if (world != null && pos != null) {
return BiomeColors.getFoliageColor(world, pos); return BiomeColors.getFoliageColor(world, pos);
} }
return FoliageColors.DEFAULT; // 默认颜色 return FoliageColors.DEFAULT;
}, },
block block
); );

View File

@@ -2,7 +2,6 @@ package net.momirealms.craftEngineFabricMod.util;
import net.minecraft.block.AbstractBlock; import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.registry.Registries; import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry; import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKey;