Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
ae37e62
feat: update to 1.21.11-rc3
TehManu Dec 8, 2025
65f11ec
feat: rebuild patches
TehManu Dec 8, 2025
7d18598
feat: adjust api versioning in test plugin build.gradle.kts
TehManu Dec 8, 2025
dafb54b
feat: adjust mc versioning
TehManu Dec 8, 2025
ac64a0d
fix: compile issue with AdvancementRewards.java.patch
TehManu Dec 8, 2025
a2519d1
feat: update upstream
TehManu Dec 8, 2025
f12b5d7
feat: rebuild patches
TehManu Dec 8, 2025
80d5bb3
feat: readd unapplied feature patch as file patch
TehManu Dec 9, 2025
4995a70
feat: update to 1.21.11
TehManu Dec 9, 2025
c0450e4
feat: adjust versioning in README and build.yml
TehManu Dec 9, 2025
3bee5a2
[skip-ci] feat: adjust versioning in README
TehManu Dec 9, 2025
12c59f8
feat: update upstream
TehManu Dec 9, 2025
bbdbd4c
feat: update upstream
TehManu Dec 16, 2025
e1870f8
feat: rebuild patches
TehManu Dec 16, 2025
4c0f879
feat: update upstream
TehManu Dec 18, 2025
4e07d8d
feat: rebuild patches
TehManu Dec 18, 2025
0a1ea6a
feat: update upstream
TehManu Dec 22, 2025
c0237a6
feat: update upstream
TehManu Dec 23, 2025
6ec36b6
feat: update upstream
TehManu Dec 27, 2025
f460614
feat: update upstream
TehManu Dec 29, 2025
6335c25
feat: update upstream
TehManu Dec 30, 2025
b99e11a
feat: update upstream
TehManu Dec 30, 2025
0b08ae1
feat: update upstream
TehManu Jan 2, 2026
2c4f8ae
feat: update upstream and adapt version fetching
TehManu Jan 3, 2026
d0cfa42
fixup: don't print anything if distance fetched is 0
TehManu Jan 3, 2026
b4f3fad
feat: update upstream
TehManu Jan 3, 2026
9d49627
chore: remove unused code in PaperVersionFetcher.java
TehManu Jan 4, 2026
79793db
feat: update upstream
TehManu Jan 4, 2026
26a4c75
feat: update upstream
TehManu Jan 4, 2026
6b779ca
[ci skip] Rebuild patches
TehManu Jan 4, 2026
3271e8e
feat: update upstream
TrainmasterHD Jan 15, 2026
f2bc377
feat: update upstream
TehManu Jan 22, 2026
d6920df
feat: update upstream
TrainmasterHD Feb 2, 2026
c1657e8
feat: update upstream
TehManu Feb 6, 2026
d7b1dbb
feat: update upstream
TehManu Feb 11, 2026
dc84244
[ci skip] Rebuild patches
TehManu Feb 11, 2026
1b14b47
fix: shield sound was not cancelled correctly (#70)
TrainmasterHD Feb 11, 2026
6fd5bed
feat: update upstream
TehManu Feb 16, 2026
fa7d353
chore: reduce diff size by not deleting unused methods
TrainmasterHD Feb 27, 2026
e7c575c
feat: update upstream
TrainmasterHD Feb 27, 2026
5586137
feat: update upstream
TehManu Mar 14, 2026
4e217c7
chore: rebuild patches
TehManu Mar 14, 2026
89b9f35
fix: wrong implementation of ProjectileAllowCollideWithPlayerEvent
TrainmasterHD Mar 29, 2026
18a744a
feat: update upstream
TehManu Apr 12, 2026
99c7fb7
fix: nautilus and copper golem equipment desync (#71)
TehManu Apr 12, 2026
5377936
feat: port EntityLungeEvent patch from paper (#72)
TehManu Apr 12, 2026
2440949
fix: update gradle wrapper to 9.2.0
TehManu Apr 12, 2026
bb89b1a
fix: remove unused patch
TehManu Apr 12, 2026
cc2b21e
[CB-3820] fix: capturing blocks on End Crystal placement (#75)
TehManu Apr 19, 2026
51b2ba3
[CB-4735] fix: PrepareItemCraftEvent not being fired and use default …
TehManu Apr 19, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
build:
env:
BUILD_NUMBER: ${{ github.run_number }}
MINECRAFT_VERSION: 1.21.10
MINECRAFT_VERSION: 1.21.11

# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# GommeHD.net Cheetah 1.21.10
# GommeHD.net Cheetah 1.21.11

[![Patch and Build](https://github.com/gommehdnet/cheetah/actions/workflows/build.yml/badge.svg)](https://github.com/gommehdnet/cheetah/actions/workflows/build.yml)

This is a fork of Paper tailored for the use at GommeHD.net

## How to build
- Clone this repository
- Open a shell (e.g. using Git Bash on Windows)
- Open a shell (e.g., using Git Bash on Windows)
- On Windows, make sure that `git config core.longpaths true` is set for this project
- Run `./gradlew applyAllPatches` to apply the patches
- Run `./gradlew createMojmapBundlerJar` to create the final jar file
- The final jar file can be found in `cheetah-server/build/libs/cheetah-bundler-1.21.10-R0.1-SNAPSHOT-mojmap.jar`
- The final jar file can be found in `cheetah-server/build/libs/cheetah-bundler-1.21.11-R0.1-SNAPSHOT-mojmap.jar`

## How to use the API with Maven?
Currently, it is not possible to add a dependency containing NMS code, the API, and dependencies to the classpath. The current solution is to use the cheetah API combined with the normal Spigot NMS.
Expand All @@ -21,7 +21,7 @@ Thus, changes to the NMS code will not be reflected to plugins using it.
<dependency>
<groupId>net.gommehd.cheetah</groupId>
<artifactId>cheetah-api</artifactId>
<version>1.21.10-R0.1-SNAPSHOT</version>
<version>1.21.11-R0.1-SNAPSHOT</version>
</dependency>
```

Expand Down
4 changes: 0 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ subprojects {
maven(paperMavenPublicUrl)
}

tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
tasks.withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release = 21
Expand Down
8 changes: 4 additions & 4 deletions cheetah-api/build.gradle.kts.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/paper-api/build.gradle.kts
+++ b/paper-api/build.gradle.kts
@@ -89,7 +_,7 @@
@@ -91,7 +_,7 @@
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

Expand All @@ -9,7 +9,7 @@
idea {
module {
generatedSourceDirs.add(generatedDir.toFile())
@@ -99,6 +_,18 @@
@@ -101,6 +_,18 @@
main {
java {
srcDir(generatedDir)
Expand All @@ -28,7 +28,7 @@
}
}
}
@@ -165,7 +_,7 @@
@@ -183,7 +_,7 @@

tasks.withType<Javadoc>().configureEach {
val options = options as StandardJavadocDocletOptions
Expand All @@ -37,7 +37,7 @@
options.use()
options.isDocFilesSubDirs = true
options.links(
@@ -198,11 +_,11 @@
@@ -217,11 +_,11 @@
}

// workaround for https://github.com/gradle/gradle/issues/4046
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
@@ -31,6 +_,7 @@
@@ -34,6 +_,7 @@
private final InetAddress rawAddress;
private final String hostname;
private final boolean transferred;
+ private boolean skipLog; // Cheetah - Allow skipping log messages for canceled login events
private Result result;
private Component message;
private PlayerProfile profile;
@@ -324,6 +_,16 @@
@@ -327,6 +_,16 @@
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package io.papermc.paper.event.entity;

import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;

/**
* Called when a living entity tries to lunge with a spear
*/
@NullMarked
public class EntityLungeEvent extends EntityEvent implements Cancellable {

private static final HandlerList HANDLER_LIST = new HandlerList();

private int lungePower;
private boolean cancelled;

@ApiStatus.Internal
public EntityLungeEvent(final LivingEntity entity, int lungePower) {
super(entity);
this.lungePower = lungePower;
}

/**
* Gets the lunge power, which when initially passed, matches the enchantment level of the item, but can be higher.
*
* @return the lunge power
*/
public int getLungePower() {
return lungePower;
}

/**
* Sets the lunge power. This commonly matches the enchantment level of the item, and can be set higher.
* <p>
* If set higher than 3, the power of the lunge will continue to scale like normal, as if the max enchantment
* level is higher.
* @param lungePower the new lunge power
*/
public void setLungePower(final int lungePower) {
this.lungePower = lungePower;
}

@Override
public boolean isCancelled() {
return cancelled;
}

/**
* Set whether to cancel the lunge. If cancelled, the living entity will not lunge forward.
* @param cancel {@code true} if you wish to cancel this event
*/
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}

@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}

public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
}
10 changes: 5 additions & 5 deletions cheetah-server/build.gradle.kts.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/paper-server/build.gradle.kts
+++ b/paper-server/build.gradle.kts
@@ -23,6 +_,17 @@
@@ -22,6 +_,17 @@
minecraftVersion = providers.gradleProperty("mcVersion")
gitFilePatches = false

Expand All @@ -17,7 +17,7 @@
+
spigot {
enabled = true
buildDataRef = "42d18d4c4653ffc549778dbe223f6994a031d69e"
buildDataRef = "17f77cee7117ab9d6175f088ae8962bfd04e61a9"
@@ -104,7 +_,20 @@
}
}
Expand Down Expand Up @@ -46,10 +46,10 @@
dependencies {
- implementation(project(":paper-api"))
+ implementation(project(":cheetah-api"))
implementation("ca.spottedleaf:concurrentutil:0.0.7")
implementation("ca.spottedleaf:concurrentutil:0.0.8")
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
@@ -197,14 +_,14 @@
@@ -198,14 +_,14 @@
val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim()
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
Expand All @@ -69,7 +69,7 @@
"Build-Number" to (build ?: ""),
"Build-Time" to buildTime.toString(),
"Git-Branch" to gitBranch,
@@ -263,7 +_,7 @@
@@ -264,7 +_,7 @@
jvmArgumentProviders.add(provider)
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/advancements/AdvancementRewards.java
+++ b/net/minecraft/advancements/AdvancementRewards.java
@@ -36,7 +_,7 @@
@@ -37,7 +_,7 @@
public static final AdvancementRewards EMPTY = new AdvancementRewards(0, List.of(), List.of(), Optional.empty());

public void grant(ServerPlayer player) {
Expand All @@ -9,7 +9,7 @@
ServerLevel serverLevel = player.level();
MinecraftServer server = serverLevel.getServer();
LootParams lootParams = new LootParams.Builder(serverLevel)
@@ -45,36 +_,65 @@
@@ -46,36 +_,65 @@
.create(LootContextParamSets.ADVANCEMENT_REWARD);
boolean flag = false;

Expand Down Expand Up @@ -39,7 +39,7 @@
+
+ net.gommehd.cheetah.event.entity.PlayerAdvancementRewardsGrantEvent event = new net.gommehd.cheetah.event.entity.PlayerAdvancementRewardsGrantEvent(
+ player.getBukkitEntity(),
+ recipes.stream().map(recipe -> org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(recipe.location())).collect(java.util.stream.Collectors.toList()),
+ recipes.stream().map(recipe -> org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(recipe.identifier())).collect(java.util.stream.Collectors.toList()),
+ rewards.stream().map(org.bukkit.craftbukkit.inventory.CraftItemStack::asCraftMirror).collect(java.util.stream.Collectors.toList()),
+ this.experience
+ );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
--- a/net/minecraft/network/Connection.java
+++ b/net/minecraft/network/Connection.java
@@ -212,7 +_,7 @@
@@ -62,6 +_,7 @@
public static final Marker PACKET_MARKER = Util.make(MarkerFactory.getMarker("NETWORK_PACKETS"), marker -> marker.add(ROOT_MARKER));
public static final Marker PACKET_RECEIVED_MARKER = Util.make(MarkerFactory.getMarker("PACKET_RECEIVED"), marker -> marker.add(PACKET_MARKER));
public static final Marker PACKET_SENT_MARKER = Util.make(MarkerFactory.getMarker("PACKET_SENT"), marker -> marker.add(PACKET_MARKER));
+ private static final net.gommehd.cheetah.network.packet.PacketProcessor PACKET_PROCESSOR = new net.gommehd.cheetah.network.packet.DefaultPacketProcessor(); // Cheetah - Packet listener api
private static final ProtocolInfo<ServerHandshakePacketListener> INITIAL_PROTOCOL = HandshakeProtocols.SERVERBOUND;
private final PacketFlow receiving;
private volatile boolean sendLoginDisconnect = true;
@@ -188,7 +_,7 @@

if (player != null) player.quitReason = org.bukkit.event.player.PlayerQuitEvent.QuitReason.ERRONEOUS_STATE; // Paper - Add API for quit reason
if (flag) {
Expand All @@ -9,3 +17,52 @@
boolean doesDisconnectExist = this.packetListener.protocol() != ConnectionProtocol.STATUS && this.packetListener.protocol() != ConnectionProtocol.HANDSHAKING; // Paper
if (this.getSending() == PacketFlow.CLIENTBOUND && doesDisconnectExist) { // Paper
Packet<?> packet = (Packet<?>)(this.sendLoginDisconnect
@@ -285,6 +_,13 @@
}

private static <T extends PacketListener> void genericsFtw(Packet<T> packet, PacketListener listener) {
+ // Cheetah start - Packet listener api
+ Connection connection = net.gommehd.cheetah.network.packet.ConnectionHelper.getCurrentConnection(listener);
+ packet = PACKET_PROCESSOR.processInbound(packet, connection);
+ if (packet == null) {
+ return; // Packet was cancelled
+ }
+ // Cheetah end - Packet listener api
packet.handle((T)listener);
}

@@ -444,11 +_,24 @@
}

private void sendPacket(Packet<?> packet, @Nullable ChannelFutureListener sendListener, boolean flush) {
+ // Cheetah start - Packet listener api
+ packet = PACKET_PROCESSOR.processOutbound(packet, this);
+ if (packet == null) {
+ // Packet was cancelled - handle cleanup
+ if (sendListener != null) {
+ io.netty.channel.ChannelFuture completedFuture = this.channel.newSucceededFuture();
+ completedFuture.addListener(sendListener);
+ }
+ return;
+ }
+ final Packet<?> finalPacket = packet;
+ // Cheetah end - Packet listener api
+
this.sentPackets++;
if (this.channel.eventLoop().inEventLoop()) {
- this.doSendPacket(packet, sendListener, flush);
+ this.doSendPacket(finalPacket, sendListener, flush); // Cheetah - Packet listener api
} else {
- this.channel.eventLoop().execute(() -> this.doSendPacket(packet, sendListener, flush));
+ this.channel.eventLoop().execute(() -> this.doSendPacket(finalPacket, sendListener, flush)); // Cheetah - Packet listener api
}
}

@@ -477,6 +_,7 @@
}
} catch (final Exception e) {
LOGGER.error("NetworkException: {}", player, e);
+ PACKET_PROCESSOR.notifyError(packet, e, this); // Cheetah - Packet listener api
this.disconnect(Component.translatable("disconnect.genericReason", "Internal Exception: " + e.getMessage()));
packet.onPacketDispatchFinish(player, null);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public static class BlockEntityInfo {
public static final StreamCodec<RegistryFriendlyByteBuf, ClientboundLevelChunkPacketData.BlockEntityInfo> STREAM_CODEC = StreamCodec.ofMember(
ClientboundLevelChunkPacketData.BlockEntityInfo::write, ClientboundLevelChunkPacketData.BlockEntityInfo::new
@@ -186,6 +_,25 @@
@@ -185,6 +_,25 @@
ByteBufCodecs.registry(Registries.BLOCK_ENTITY_TYPE).encode(buffer, this.type);
buffer.writeNbt(this.tag);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/network/protocol/game/ClientboundRotateHeadPacket.java
+++ b/net/minecraft/network/protocol/game/ClientboundRotateHeadPacket.java
@@ -20,6 +_,13 @@
@@ -21,6 +_,13 @@
this.yHeadRot = yHeadRot;
}

Expand Down
Loading