Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure ASPaper for paper hardfork #149

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9d5c151
Update to 1.21.1
kyngs Aug 11, 2024
c337bad
Update Upstream
invalid-email-address Aug 11, 2024
cbb8fb2
Re-add null-check in FastChunkPruner.java
kyngs Aug 21, 2024
ee1a536
Migrate back to the gradleup shadow plugin and upgrade version to 8.3.0
notstevy Aug 19, 2024
80e3297
Fix typo: worldData.name() was added twice to WorldsInUse instead of …
jepu2x Aug 24, 2024
3e34812
fix: issue with chunks not saving sometimes when unloading the world
TechStreetDev Aug 31, 2024
17eb817
fix disable dragon fights
emmanuelvlad Sep 9, 2024
e36d5ae
fix chunk pdc getting wiped on chunk unload
emmanuelvlad Sep 19, 2024
3fd836f
Move patch 0016 to the correct folder
kyngs Sep 20, 2024
6ba9ed9
1.21.3 work maybe donegit add .!
AverageGithub Nov 10, 2024
4ef6419
feat: update to da7138233f6392e791d790d1c3407414c855f9c2
davidmayr Dec 3, 2024
05876d7
fix: missing chunks & entities when chunk saving
davidmayr Dec 5, 2024
32f2640
fix: pdc not saving when chunks are unloaded
davidmayr Dec 5, 2024
138ee8b
fix: move saving up so block entities can get saved
davidmayr Dec 10, 2024
991eae1
Attempt to fix #142
kyngs Dec 13, 2024
c394d0f
Update deps
ComputerNerd100 Dec 15, 2024
6c01d44
Update gradlew to 8.11.1
ComputerNerd100 Dec 15, 2024
b4d01cd
Downgrade some versions slightly
ComputerNerd100 Dec 15, 2024
e70bcdd
chore(*): restructuring round 1
ComputerNerd100 Dec 16, 2024
83bb203
fix(conventions): call get on gradle property
ComputerNerd100 Dec 16, 2024
c62213a
chore(plugin): rename to ASP
ComputerNerd100 Dec 16, 2024
49f2351
chore(plugin): update plugin jar output name
ComputerNerd100 Dec 16, 2024
b7fd593
chore(*): restructuring round 2
ComputerNerd100 Dec 20, 2024
699f99a
chore(core): remove legacy SRF support
ComputerNerd100 Dec 20, 2024
bc2d52d
chore(api): fix javadoc
ComputerNerd100 Dec 20, 2024
3e9e99c
chore(api): Change SWI extra data to Map
ComputerNerd100 Dec 20, 2024
167c327
chore(impl): Replace FlowNBT with AdventureNBT in all patches
ComputerNerd100 Dec 20, 2024
8290f91
chore(*): Update to 1.21.4
ComputerNerd100 Dec 20, 2024
fa101d8
chore(settings): Add toolchain resolver plugin
ComputerNerd100 Dec 20, 2024
50c27aa
chore(conventions): Relocate gradle/build-logic -> buildSrc
ComputerNerd100 Dec 21, 2024
a9788b3
chore(gradlew): Update gradle wrapper to 8.12
ComputerNerd100 Dec 21, 2024
f7a4a97
chore(*): Setup initial hard fork structure
ComputerNerd100 Dec 21, 2024
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
31 changes: 15 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
*.iml
*.ipr
*.iws
.idea/
.classpath
.project
.settings/
slimeworldmanager-test/
.DS_Store/
release.properties
libs/
.gradle/
.vscode/

**/.gradle/
.DS_Store
build/
slimeworldmanager-api
slimeworldmanager-server
run
*.hprof
paper-api-generator
**/run/

**/*.iml

impl/aspaper-server/build.gradle.kts
impl/aspaper-server/src/minecraft/
impl/paper-server/
impl/aspaper-api/build.gradle.kts
impl/paper-api/
impl/paper-api-generator/
/impl/aspaper-server/.gradle/
96 changes: 8 additions & 88 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,96 +1,16 @@
plugins {
`java-library`
`maven-publish`
signing
id("asp.base-conventions")
id("asp.publishing-conventions")
}

dependencies {
api("com.flowpowered:flow-nbt:2.0.2")
api("org.jetbrains:annotations:23.0.0")
api(libs.annotations)
api(libs.adventure.nbt)

compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
compileOnly(paperApi())
}

version = "3.0.0-SNAPSHOT"

java {
withSourcesJar()
withJavadocJar()
}

profiles {
profile("publish") {
activation {
property {
setKey("publish")
setValue("true")
}
}
action {
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "${project.group}"
artifactId = project.name
version = "${project.version}"

from(components["java"])

pom {
name.set("Advanced Slime Paper API")
description.set("API for ASP")
url.set("https://github.com/InfernalSuite/AdvancedSlimePaper")
licenses {
license {
name.set("GNU General Public License, Version 3.0")
url.set("https://www.gnu.org/licenses/gpl-3.0.txt")
}
}
developers {
developer {
id.set("InfernalSuite")
name.set("The InfernalSuite Team")
url.set("https://github.com/InfernalSuite")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:https://github.com:InfernalSuite/AdvancedSlimePaper.git")
developerConnection.set("scm:git:ssh://github.com:InfernalSuite/AdvancedSlimePaper.git")
url.set("https://github.com/InfernalSuite/AdvancedSlimePaper/")
}
issueManagement {
system.set("Github")
url.set("https://github.com/InfernalSuite/AdvancedSlimePaper/issues")
}
}

versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
}
}
repositories {
maven {
name = "infernalsuite"
url = uri("https://repo.infernalsuite.com/repository/maven-snapshots/")
credentials {
username = project.property("ISUsername") as String?
password = project.property("ISPassword") as String?
}
}
}
}

signing {
useGpgCmd()
sign(publishing.publications["maven"])
}
}
}
publishConfiguration {
name = "Advanced Slime Paper API"
description = "API for Advanced Slime Paper"
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
package com.infernalsuite.aswm.api;
package com.infernalsuite.asp.api;

import com.infernalsuite.aswm.api.exceptions.*;
import com.infernalsuite.aswm.api.world.SlimeWorld;
import com.infernalsuite.aswm.api.world.properties.SlimePropertyMap;
import com.infernalsuite.aswm.api.loaders.SlimeLoader;
import com.infernalsuite.asp.api.exceptions.CorruptedWorldException;
import com.infernalsuite.asp.api.exceptions.InvalidWorldException;
import com.infernalsuite.asp.api.exceptions.NewerFormatException;
import com.infernalsuite.asp.api.exceptions.UnknownWorldException;
import com.infernalsuite.asp.api.exceptions.WorldAlreadyExistsException;
import com.infernalsuite.asp.api.exceptions.WorldLoadedException;
import com.infernalsuite.asp.api.exceptions.WorldTooBigException;
import com.infernalsuite.asp.api.world.SlimeWorld;
import com.infernalsuite.asp.api.world.properties.SlimePropertyMap;
import com.infernalsuite.asp.api.loaders.SlimeLoader;
import net.kyori.adventure.util.Services;
import org.bukkit.World;
import org.jetbrains.annotations.ApiStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.infernalsuite.aswm.api;
package com.infernalsuite.asp.api;

import com.flowpowered.nbt.CompoundMap;
import com.flowpowered.nbt.CompoundTag;
import com.infernalsuite.aswm.api.world.SlimeWorld;
import com.infernalsuite.aswm.api.world.SlimeWorldInstance;
import com.infernalsuite.asp.api.world.SlimeWorld;
import com.infernalsuite.asp.api.world.SlimeWorldInstance;
import net.kyori.adventure.nbt.CompoundBinaryTag;
import net.kyori.adventure.util.Services;
import org.bukkit.World;
import org.bukkit.persistence.PersistentDataContainer;
Expand Down Expand Up @@ -36,15 +35,15 @@ static SlimeNMSBridge instance() {
return Holder.INSTANCE;
}

void extractCraftPDC(PersistentDataContainer source, CompoundMap target);
void extractCraftPDC(PersistentDataContainer source, CompoundBinaryTag.Builder builder);

PersistentDataContainer extractCompoundMapIntoCraftPDC(CompoundMap source);
PersistentDataContainer extractCompoundMapIntoCraftPDC(CompoundBinaryTag source);

@ApiStatus.Internal
class Holder {
private static final SlimeNMSBridge INSTANCE = Services.service(SlimeNMSBridge.class).orElseThrow();
}

CompoundTag convertChunkTo1_13(CompoundTag tag);
CompoundBinaryTag convertChunkTo1_13(CompoundBinaryTag tag);

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.infernalsuite.aswm.api.events;
package com.infernalsuite.asp.api.events;

import com.infernalsuite.aswm.api.world.SlimeWorld;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
Expand All @@ -10,9 +9,9 @@
public class AsyncPostCreateEmptyWorldEvent extends Event {

private static final HandlerList handlers = new HandlerList();
private final SlimeWorld slimeWorld;
private final com.infernalsuite.asp.api.world.SlimeWorld slimeWorld;

public AsyncPostCreateEmptyWorldEvent(SlimeWorld slimeWorld) {
public AsyncPostCreateEmptyWorldEvent(com.infernalsuite.asp.api.world.SlimeWorld slimeWorld) {
super(true);
this.slimeWorld = Objects.requireNonNull(slimeWorld, "slimeWorld cannot be null");
}
Expand All @@ -26,7 +25,7 @@ public static HandlerList getHandlerList() {
return handlers;
}

public SlimeWorld getSlimeWorld() {
public com.infernalsuite.asp.api.world.SlimeWorld getSlimeWorld() {
return slimeWorld;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.infernalsuite.aswm.api.events;
package com.infernalsuite.asp.api.events;

import com.infernalsuite.aswm.api.world.SlimeWorld;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
Expand All @@ -10,9 +9,9 @@
public class AsyncPostGetWorldEvent extends Event {

private static final HandlerList handlers = new HandlerList();
private final SlimeWorld slimeWorld;
private final com.infernalsuite.asp.api.world.SlimeWorld slimeWorld;

public AsyncPostGetWorldEvent(SlimeWorld slimeWorld) {
public AsyncPostGetWorldEvent(com.infernalsuite.asp.api.world.SlimeWorld slimeWorld) {
super(true);
this.slimeWorld = Objects.requireNonNull(slimeWorld, "slimeWorld cannot be null");
}
Expand All @@ -26,7 +25,7 @@ public static HandlerList getHandlerList() {
return handlers;
}

public SlimeWorld getSlimeWorld() {
public com.infernalsuite.asp.api.world.SlimeWorld getSlimeWorld() {
return slimeWorld;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.infernalsuite.aswm.api.events;
package com.infernalsuite.asp.api.events;

import com.infernalsuite.aswm.api.loaders.SlimeLoader;
import com.infernalsuite.asp.api.loaders.SlimeLoader;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.infernalsuite.aswm.api.events;
package com.infernalsuite.asp.api.events;

import com.infernalsuite.aswm.api.world.SlimeWorld;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
Expand All @@ -10,9 +9,9 @@
public class AsyncPostLoadWorldEvent extends Event {

private static final HandlerList handlers = new HandlerList();
private final SlimeWorld slimeWorld;
private final com.infernalsuite.asp.api.world.SlimeWorld slimeWorld;

public AsyncPostLoadWorldEvent(SlimeWorld slimeWorld) {
public AsyncPostLoadWorldEvent(com.infernalsuite.asp.api.world.SlimeWorld slimeWorld) {
super(true);
this.slimeWorld = Objects.requireNonNull(slimeWorld, "slimeWorld cannot be null");
}
Expand All @@ -26,7 +25,7 @@ public static HandlerList getHandlerList() {
return handlers;
}

public SlimeWorld getSlimeWorld() {
public com.infernalsuite.asp.api.world.SlimeWorld getSlimeWorld() {
return this.slimeWorld;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.infernalsuite.aswm.api.events;
package com.infernalsuite.asp.api.events;

import com.infernalsuite.aswm.api.loaders.SlimeLoader;
import com.infernalsuite.asp.api.loaders.SlimeLoader;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.infernalsuite.aswm.api.events;
package com.infernalsuite.asp.api.events;

import com.infernalsuite.aswm.api.loaders.SlimeLoader;
import com.infernalsuite.aswm.api.world.properties.SlimePropertyMap;
import com.infernalsuite.asp.api.loaders.SlimeLoader;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
Expand All @@ -16,9 +15,9 @@ public class AsyncPreCreateEmptyWorldEvent extends Event implements Cancellable
private SlimeLoader slimeLoader;
private String worldName;
private boolean readOnly;
private SlimePropertyMap slimePropertyMap;
private com.infernalsuite.asp.api.world.properties.SlimePropertyMap slimePropertyMap;

public AsyncPreCreateEmptyWorldEvent(SlimeLoader slimeLoader, String worldName, boolean readOnly, SlimePropertyMap slimePropertyMap) {
public AsyncPreCreateEmptyWorldEvent(SlimeLoader slimeLoader, String worldName, boolean readOnly, com.infernalsuite.asp.api.world.properties.SlimePropertyMap slimePropertyMap) {
super(true);
this.slimeLoader = Objects.requireNonNull(slimeLoader, "slimeLoader cannot be null");
this.worldName = Objects.requireNonNull(worldName, "worldName cannot be null");
Expand Down Expand Up @@ -69,11 +68,11 @@ public void setReadOnly(boolean readOnly) {
this.readOnly = readOnly;
}

public SlimePropertyMap getSlimePropertyMap() {
public com.infernalsuite.asp.api.world.properties.SlimePropertyMap getSlimePropertyMap() {
return this.slimePropertyMap;
}

public void setSlimePropertyMap(SlimePropertyMap slimePropertyMap) {
public void setSlimePropertyMap(com.infernalsuite.asp.api.world.properties.SlimePropertyMap slimePropertyMap) {
this.slimePropertyMap = Objects.requireNonNull(slimePropertyMap, "slimePropertyMap cannot be null");
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.infernalsuite.aswm.api.events;
package com.infernalsuite.asp.api.events;

import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.infernalsuite.aswm.api.events;
package com.infernalsuite.asp.api.events;

import com.infernalsuite.aswm.api.loaders.SlimeLoader;
import com.infernalsuite.asp.api.loaders.SlimeLoader;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.infernalsuite.aswm.api.events;
package com.infernalsuite.asp.api.events;

import com.infernalsuite.aswm.api.loaders.SlimeLoader;
import com.infernalsuite.aswm.api.world.properties.SlimePropertyMap;
import com.infernalsuite.asp.api.loaders.SlimeLoader;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
Expand All @@ -16,9 +15,9 @@ public class AsyncPreLoadWorldEvent extends Event implements Cancellable {
private SlimeLoader slimeLoader;
private String worldName;
private boolean readOnly;
private SlimePropertyMap slimePropertyMap;
private com.infernalsuite.asp.api.world.properties.SlimePropertyMap slimePropertyMap;

public AsyncPreLoadWorldEvent(SlimeLoader slimeLoader, String worldName, boolean readOnly, SlimePropertyMap slimePropertyMap) {
public AsyncPreLoadWorldEvent(SlimeLoader slimeLoader, String worldName, boolean readOnly, com.infernalsuite.asp.api.world.properties.SlimePropertyMap slimePropertyMap) {
super(true);
this.slimeLoader = Objects.requireNonNull(slimeLoader, "slimeLoader cannot be null");
this.worldName = Objects.requireNonNull(worldName, "worldName cannot be null");
Expand Down Expand Up @@ -69,11 +68,11 @@ public void setReadOnly(boolean readOnly) {
this.readOnly = readOnly;
}

public SlimePropertyMap getSlimePropertyMap() {
public com.infernalsuite.asp.api.world.properties.SlimePropertyMap getSlimePropertyMap() {
return this.slimePropertyMap;
}

public void setSlimePropertyMap(SlimePropertyMap slimePropertyMap) {
public void setSlimePropertyMap(com.infernalsuite.asp.api.world.properties.SlimePropertyMap slimePropertyMap) {
this.slimePropertyMap = Objects.requireNonNull(slimePropertyMap, "slimePropertyMap cannot be null");
}
}
Loading