Fix Fabric Networking issues resulting in server crash and undelivered packets
This commit is contained in:
@@ -39,8 +39,6 @@ public interface LibClientHelper {
|
||||
|
||||
Connection getClientConnection();
|
||||
|
||||
void registerClientReceiver(@NotNull ResourceLocation channelName, @NotNull Function<FriendlyByteBuf, @NotNull CraterPacket<?>> factory);
|
||||
|
||||
void registerBlockEntityRenderer(@NotNull BlockEntityType<? extends BlockEntity> blockEntityType, @NotNull BlockEntityRendererProvider blockEntityRendererFactory);
|
||||
|
||||
}
|
||||
|
@@ -33,8 +33,5 @@ public interface LibCommonHelper {
|
||||
|
||||
<T extends AbstractContainerMenu> MenuType<T> createMenuType(TriFunction<Integer, Inventory, FriendlyByteBuf, T> constructor);
|
||||
|
||||
/* FABRIC ONLY */
|
||||
void registerServerReceiver(ResourceLocation channelName, Function<FriendlyByteBuf, CraterPacket<?>> factory);
|
||||
|
||||
<T> Optional<T> getCapabilityHandler(BlockEntity entity, Direction side, CraterCapabilityHandler capability);
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ public class CommandMixin {
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lcom/mojang/brigadier/CommandDispatcher;execute(Lcom/mojang/brigadier/ParseResults;)I",
|
||||
shift = At.Shift.BEFORE
|
||||
), cancellable = true, remap = false
|
||||
), cancellable = true
|
||||
)
|
||||
private void injectCommandEvent(ParseResults<CommandSourceStack> stackParseResults, String command, CallbackInfoReturnable<Integer> cir) {
|
||||
CraterCommandEvent commandEvent = new CraterCommandEvent(stackParseResults, command);
|
||||
|
Reference in New Issue
Block a user