Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update IMessage
  • Loading branch information
CalenXwX committed Apr 26, 2025
commit 938cec3cb383ef178765ba390104ac5751b429bd
4 changes: 2 additions & 2 deletions api/buildcraft/api/net/IMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ public interface IMessage {

void toBytes(FriendlyByteBuf buf);

public static IMessage staticFromBytes(Class<? extends IMessage> clazz, FriendlyByteBuf buf) {
public static <MSG extends IMessage> MSG staticFromBytes(Class<MSG> clazz, FriendlyByteBuf buf) {
try {
IMessage message = clazz.newInstance();
MSG message = clazz.newInstance();
message.fromBytes(buf);
return message;
} catch (Exception e) {
Expand Down