mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-24 01:19:24 +00:00
feat(client-mod): 修复客户端视觉问题
This commit is contained in:
@@ -161,12 +161,12 @@ 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
|
||||||
public Collection<BukkitServerPlayer> onlineUsers() {
|
public Collection<BukkitServerPlayer> onlineUsers() {
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user