Skip to content

Commit

Permalink
更正bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MegumiKasuga committed Oct 7, 2024
1 parent 2d1e78f commit 762b4d5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
Binary file modified src/generated/resources/kasuga_lib.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/main/java/kasuga/lib/core/KasugaLibStacks.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class KasugaLibStacks {
public KasugaLibStacks(IEventBus bus) {
this.bus = bus;
this.registries = new HashMap<>();
KeyBindingReg.invoke();
ARGUMENT_TYPES = DeferredRegister.create(ForgeRegistries.Keys.COMMAND_ARGUMENT_TYPES, MOD_ID);
ARGUMENT_TYPES.register("base", () -> ArgumentTypeInfos.registerByClass(BaseArgument.class, new BaseArgumentInfo()));
ARGUMENT_TYPES.register(bus);
Expand Down
17 changes: 7 additions & 10 deletions src/main/java/kasuga/lib/registrations/client/KeyBindingReg.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,11 @@ public class KeyBindingReg extends Reg {
private Consumer<ServerPlayer> serverHandler;
private KeyModifier modifier = KeyModifier.NONE;
private InputConstants.Type type = InputConstants.Type.KEYSYM;
private static final ChannelReg keyChannel;
private static final LinkedList<KeyBindingReg> registered;

static {
keyChannel = new ChannelReg("kasuga_lib_key_bindings")
.brand("1.0")
.loadPacket(KeyBindingReg.KeySyncPacket.class, KeyBindingReg.KeySyncPacket::new)
.submit(KasugaLibStacks.REGISTRY);
registered = new LinkedList<>();
}
private static final ChannelReg keyChannel = new ChannelReg("kasuga_lib_key_bindings")
.brand("1.0")
.loadPacket(KeyBindingReg.KeySyncPacket.class, KeyBindingReg.KeySyncPacket::new)
.submit(KasugaLibStacks.REGISTRY);;
private static final LinkedList<KeyBindingReg> registered = new LinkedList<>();

/**
* The beginning of your registry
Expand Down Expand Up @@ -210,4 +205,6 @@ public void encode(FriendlyByteBuf buf) {
buf.writeCharSequence(key, StandardCharsets.UTF_8);
}
}

public static void invoke(){}
}

0 comments on commit 762b4d5

Please sign in to comment.