Biscuit!
No reviews yet
A simple API for working with 1.20.5 cookies and transfers in an easy and secure way!
Provides a framework or library for other mods to use.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
Biscuit!
A simple API for working with 1.20.5 cookies and transfers in an easy and secure way!
Features
- Cookies as POJOs
- Injected interfaces on many networking classes
- Cookie Signing for tamper detection
- Event system
- Automatic identifier generation (May not be possbile)
- Encryption
- Spreading large data across many cookies
Setup
In your build.gradle include:
repositories {
maven { url "https://api.modrinth.com/maven" }
}
dependencies {
modImplementation("maven.modrinth:biscuit!:1.1.0")
}
Dev
// Make a class to represent your cookie
public static class TestCookie {
private final String data;
public TestCookie(String data) {
this.data = data;
}
@Override
public String toString() {
return data;
}
}
// Register the cookie:
Biscuit.register(new Identifier("test", "cookie"), TestCookie.class);
// Register the cookie with a secret for tamper detection. The secret must be the same on all servers requesting this cookie:
Biscuit.register(new Identifier("test", "cookie"), TestCookie.class).setSecret("my_secret");
// Set/Get the cookie from the ServerPlayerEntity, ClientConnection, or any of the network handlers (Not handshake)
TestCookie cookie = new TestCookie("whoohoo!");
player.setCookie(cookie);
player.getCookie(TestCookie.class).whenComplete((cookie, throwable) -> {
System.out.println(cookie);
});
Set a cookie before your mod (or another mod/the transfer command) transfers the player:
BiscuitEvents.PRE_TRANSFER.register((packet, profile, cookieJar, ci) -> {
cookieJar.setCookie(cookie);
});
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers