-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #694 from FTBTeam/dev
Dev
- Loading branch information
Showing
11 changed files
with
137 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
common/src/main/java/dev/ftb/mods/ftbquests/net/OpenQuestBookMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package dev.ftb.mods.ftbquests.net; | ||
|
||
import dev.architectury.networking.NetworkManager; | ||
import dev.architectury.networking.simple.BaseS2CMessage; | ||
import dev.architectury.networking.simple.MessageType; | ||
import dev.ftb.mods.ftbquests.client.ClientQuestFile; | ||
import net.minecraft.network.FriendlyByteBuf; | ||
|
||
public class OpenQuestBookMessage extends BaseS2CMessage { | ||
private final long id; | ||
|
||
public OpenQuestBookMessage(long id) { | ||
this.id = id; | ||
} | ||
|
||
OpenQuestBookMessage(FriendlyByteBuf buf) { | ||
id = buf.readLong(); | ||
} | ||
|
||
@Override | ||
public MessageType getType() { | ||
return FTBQuestsNetHandler.OPEN_QUEST_BOOK; | ||
} | ||
|
||
@Override | ||
public void write(FriendlyByteBuf buf) { | ||
buf.writeLong(id); | ||
} | ||
|
||
@Override | ||
public void handle(NetworkManager.PacketContext context) { | ||
ClientQuestFile.openBookToQuestObject(id); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters