Fixed end portal teleportation and added jenkins file
This commit is contained in:
52
JenkinsFile
Normal file
52
JenkinsFile
Normal file
@@ -0,0 +1,52 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
tools {
|
||||
jdk 'jdk23'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Configure git') {
|
||||
steps {
|
||||
script {
|
||||
sh 'git config user.name "luminolmc"'
|
||||
sh 'git config user.email "luminolmc@noreply.github.com"'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Apply patches') {
|
||||
steps {
|
||||
script {
|
||||
sh 'chmod +x gradlew'
|
||||
sh './gradlew applyAllPatches'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build paperclip jar') {
|
||||
steps {
|
||||
script {
|
||||
sh './gradlew createMojmapPaperclipJar'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Upload artifacts') {
|
||||
steps {
|
||||
script {
|
||||
archiveArtifacts(
|
||||
artifacts: "luminol-server/build/libs/*.jar",
|
||||
allowEmptyArchive: false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
cleanWs()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,19 +5,51 @@ Subject: [PATCH] Kaiiju Vanilla end portal teleportation
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 477b71c94461ab504b3955437d0f7acb312ed33f..9a97077acc6dd095c294b5b704b7df91eb48ec9d 100644
|
||||
index 477b71c94461ab504b3955437d0f7acb312ed33f..35e413b7b2f8465946b2cc8651560c6899898458 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4281,7 +4281,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4281,14 +4281,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
targetPos, 16, // load 16 blocks to be safe from block physics
|
||||
ca.spottedleaf.concurrentutil.util.Priority.HIGH,
|
||||
(chunks) -> {
|
||||
- net.minecraft.world.level.levelgen.feature.EndPlatformFeature.createEndPlatform(destination, targetPos.below(), true, null);
|
||||
-
|
||||
+ //net.minecraft.world.level.levelgen.feature.EndPlatformFeature.createEndPlatform(destination, targetPos.below(), true, null); // Kaiiju - Vanilla end teleportation - moved down
|
||||
|
||||
+ // Kaiiju start - Vanilla end teleportation
|
||||
+ Vec3 finalPos;
|
||||
+ if (this instanceof Player) finalPos = Vec3.atBottomCenterOf(targetPos.below());
|
||||
+ else finalPos = Vec3.atBottomCenterOf(targetPos);
|
||||
+ // Kaiiju end
|
||||
// the portal obsidian is placed at targetPos.y - 2, so if we want to place the entity
|
||||
// on the obsidian, we need to spawn at targetPos.y - 1
|
||||
@@ -4485,6 +4485,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
portalInfoCompletable.complete(
|
||||
new net.minecraft.world.level.portal.TeleportTransition(
|
||||
- destination, Vec3.atBottomCenterOf(targetPos.below()), Vec3.ZERO, Direction.WEST.toYRot(), 0.0f,
|
||||
- Relative.union(Relative.DELTA, Set.of(Relative.X_ROT)),
|
||||
+ destination, finalPos, this.getDeltaMovement(), Direction.WEST.toYRot(), 0.0f, // Kaiiju - Vanilla end teleportation
|
||||
+ //Relative.union(Relative.DELTA, Set.of(Relative.X_ROT)), // Kaiiju - Vanilla end teleportation
|
||||
TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET),
|
||||
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL
|
||||
)
|
||||
@@ -4303,11 +4307,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
ca.spottedleaf.concurrentutil.util.Priority.HIGH,
|
||||
(chunks) -> {
|
||||
BlockPos adjustedSpawn = destination.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, spawnPos);
|
||||
-
|
||||
+ // Kaiiju start - Vanilla end teleportation
|
||||
+ Vec3 finalPos;
|
||||
+ if (this instanceof Player) finalPos = Vec3.atBottomCenterOf(adjustedSpawn.below());
|
||||
+ else finalPos = Vec3.atBottomCenterOf(adjustedSpawn);
|
||||
+ // Kaiiju end
|
||||
// done
|
||||
portalInfoCompletable.complete(
|
||||
new net.minecraft.world.level.portal.TeleportTransition(
|
||||
- destination, Vec3.atBottomCenterOf(adjustedSpawn), Vec3.ZERO, 0.0f, 0.0f,
|
||||
+ destination, finalPos, this.getDeltaMovement(), 0.0f, 0.0f, // Kaiiju - Vanilla end teleportation
|
||||
Relative.union(Relative.DELTA, Relative.ROTATION),
|
||||
TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET),
|
||||
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL
|
||||
@@ -4485,6 +4493,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (!this.canPortalAsync(destination, takePassengers)) {
|
||||
return false;
|
||||
}
|
||||
@@ -28,7 +60,7 @@ index 477b71c94461ab504b3955437d0f7acb312ed33f..9a97077acc6dd095c294b5b704b7df91
|
||||
|
||||
Vec3 initialPosition = this.position();
|
||||
ChunkPos initialPositionChunk = new ChunkPos(
|
||||
@@ -4549,9 +4553,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4549,9 +4561,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
info.postTeleportTransition().onTransition(teleported);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Gale Skip entity move if movement is zero
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 9a97077acc6dd095c294b5b704b7df91eb48ec9d..d30892195831c456c8d59ad9d1d2aa9331ef0a82 100644
|
||||
index 35e413b7b2f8465946b2cc8651560c6899898458..59dd6ecc3b79b1d6c13eda7b71d6dbbf4ffc1dfe 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1104,7 +1104,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -23,7 +23,7 @@ index 9a97077acc6dd095c294b5b704b7df91eb48ec9d..d30892195831c456c8d59ad9d1d2aa93
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
// Paper start - detailed watchdog information
|
||||
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||
@@ -5043,6 +5050,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5051,6 +5058,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AABB bb) {
|
||||
|
||||
@@ -19,7 +19,7 @@ index 9fd3fe181df2ce6dbe695f6463d3940ac4c01167..822d401150d3764004b2570da828b4f6
|
||||
);
|
||||
});
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index d30892195831c456c8d59ad9d1d2aa9331ef0a82..59a2ee35a60c833516f59076650c6fd1e86b6be9 100644
|
||||
index 59dd6ecc3b79b1d6c13eda7b71d6dbbf4ffc1dfe..f26cdc00180f72bea271877b9ef814daf9850916 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4166,6 +4166,31 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -74,7 +74,7 @@ index d30892195831c456c8d59ad9d1d2aa9331ef0a82..59a2ee35a60c833516f59076650c6fd1
|
||||
// need to load chunks so we can create the platform
|
||||
destination.moonrise$loadChunksAsync(
|
||||
targetPos, 16, // load 16 blocks to be safe from block physics
|
||||
@@ -4303,7 +4339,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4307,7 +4343,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
);
|
||||
} else {
|
||||
@@ -94,7 +94,7 @@ index d30892195831c456c8d59ad9d1d2aa9331ef0a82..59a2ee35a60c833516f59076650c6fd1
|
||||
// need to load chunk for heightmap
|
||||
destination.moonrise$loadChunksAsync(
|
||||
spawnPos, 0,
|
||||
@@ -4354,8 +4401,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4362,8 +4409,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
WorldBorder destinationBorder = destination.getWorldBorder();
|
||||
double dimensionScale = net.minecraft.world.level.dimension.DimensionType.getTeleportationScale(origin.dimensionType(), destination.dimensionType());
|
||||
@@ -114,7 +114,7 @@ index d30892195831c456c8d59ad9d1d2aa9331ef0a82..59a2ee35a60c833516f59076650c6fd1
|
||||
ca.spottedleaf.concurrentutil.completable.CallbackCompletable<BlockUtil.FoundRectangle> portalFound
|
||||
= new ca.spottedleaf.concurrentutil.completable.CallbackCompletable<>();
|
||||
|
||||
@@ -4492,9 +4549,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4500,9 +4557,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (!this.canPortalAsync(destination, takePassengers)) {
|
||||
return false;
|
||||
}
|
||||
@@ -134,7 +134,7 @@ index d30892195831c456c8d59ad9d1d2aa9331ef0a82..59a2ee35a60c833516f59076650c6fd1
|
||||
// Kaiiju end
|
||||
|
||||
Vec3 initialPosition = this.position();
|
||||
@@ -4568,6 +4634,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4576,6 +4642,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
tpComplete.accept(teleported);
|
||||
}
|
||||
// Kaiiju end
|
||||
|
||||
@@ -19,7 +19,7 @@ index 7eff847790394aecd058e7a61905da86163b4c6e..9099457f55a2829297ac1db8a69a98ff
|
||||
double rangeY = level.paperConfig().entities.trackingRangeY.get(this.entity, -1);
|
||||
if (rangeY != -1) {
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 59a2ee35a60c833516f59076650c6fd1e86b6be9..dc5651d0fb47a8f43b9c6ff4b5a427d0f095f7a8 100644
|
||||
index f26cdc00180f72bea271877b9ef814daf9850916..647510b9fae49b5a4113a35be9909babf54acfcf 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -135,7 +135,7 @@ import net.minecraft.world.scores.ScoreHolder;
|
||||
@@ -31,7 +31,7 @@ index 59a2ee35a60c833516f59076650c6fd1e86b6be9..dc5651d0fb47a8f43b9c6ff4b5a427d0
|
||||
|
||||
// CraftBukkit start
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
@@ -6047,4 +6047,46 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -6055,4 +6055,46 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// Paper end - Expose entity id counter
|
||||
|
||||
public boolean shouldTickHot() { return this.tickCount > 20 * 10 && this.isAlive(); } // KioCG
|
||||
|
||||
Reference in New Issue
Block a user