Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.gradle/
build/

# IntelliJ project files
.idea
Expand All @@ -17,4 +19,20 @@ gen
.project
.classpath
.settings
bin
bin

# Local editors and OS files
.DS_Store
Thumbs.db
.vscode/
*.swp
*.swo

# Local test servers and generated Paper data
servers/
cache/
libraries/
versions/

# Local release jars for the centralized Paper runner
libs/
436 changes: 426 additions & 10 deletions README.md

Large diffs are not rendered by default.

110 changes: 110 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
plugins {
id 'java'
}

group = 'com.onemb.xmas'
version = '2.1.0-032'
def projectVersion = version.toString()
def enableDeprecationLint = providers.gradleProperty('lintDeprecatedApi').map { it.toBoolean() }.getOrElse(false)

def javaRelease = 25
def paperCompileVersion = '26.2.build.29-alpha'
def declaredPluginApiVersion = '26.2'
def experimentalCompatibilityTarget = 'future 26.x'
def resourceExpansionProperties = [
version : projectVersion,
apiVersion: declaredPluginApiVersion
]
def sharedServersRoot = file(System.getenv('CODEX_SHARED_SERVERS_ROOT') ?: '/Users/floris/Projects/Codex/servers')
def sharedPaperCache = new File(sharedServersRoot, 'cache/Paper-26.2')
def paper262LibrariesDir = new File(sharedPaperCache, 'libraries')
def paper262Api = new File(sharedPaperCache, "libraries/io/papermc/paper/paper-api/${paperCompileVersion}/paper-api-${paperCompileVersion}.jar")
def placeholderApiJar = new File(sharedPaperCache, 'plugins/PlaceholderAPI-2.12.3-DEV-266.jar')
def paper262ArchiveName = "1MB-XMas-2026-v${projectVersion}-v25-26.2.jar"

[
[paper262Api, "Paper API jar"],
[paper262LibrariesDir, "Paper libraries directory"],
[placeholderApiJar, "PlaceholderAPI jar"],
].each { entry ->
File path = entry[0] as File
String label = entry[1] as String
if (!path.exists()) {
throw new GradleException("${label} not found at ${path}. This project now uses the centralized Paper cache under ${sharedServersRoot}.")
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(javaRelease)
}
}

dependencies {
compileOnly files(paper262Api)
compileOnly fileTree(dir: paper262LibrariesDir, include: '**/*.jar')
compileOnly files(placeholderApiJar)
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.release = javaRelease
if (enableDeprecationLint) {
options.compilerArgs.add('-Xlint:deprecation')
}
}

tasks.named('processResources') {
filteringCharset = 'UTF-8'
inputs.properties(resourceExpansionProperties)
filesMatching('plugin.yml') {
expand(resourceExpansionProperties)
}
}

tasks.named('jar') {
archiveFileName = paper262ArchiveName
}

tasks.register('releaseJar', Copy) {
description = 'Copies the newest plugin jar into libs/ for the centralized Paper runner.'
group = 'build'
dependsOn tasks.named('jar')
from(tasks.named('jar'))
into(layout.projectDirectory.dir('libs'))
}

tasks.register('paper262Jar') {
description = 'Assembles the Paper 26.2 Java 25 plugin jar and copies it into libs/.'
group = 'build'
dependsOn tasks.named('releaseJar')
}

tasks.register('printBuildConfig') {
description = 'Prints the active centralized build and compatibility configuration.'
group = 'help'
doLast {
println 'XMasTree build config'
println " version: ${projectVersion}"
println " compile target: Paper API ${paperCompileVersion}"
println " declared plugin api-version: ${declaredPluginApiVersion}"
println " experimental compatibility target: Paper ${experimentalCompatibilityTarget}"
println " java release target: ${javaRelease}"
println " centralized Paper cache: ${sharedPaperCache}"
println " PlaceholderAPI compile jar: ${placeholderApiJar}"
println " deprecation lint enabled: ${enableDeprecationLint}"
println " build/libs output: ${layout.buildDirectory.file("libs/${paper262ArchiveName}").get().asFile}"
println " libs/ release copy: ${layout.projectDirectory.file("libs/${paper262ArchiveName}").asFile}"
}
}

tasks.register('buildAllJars') {
description = 'Builds the current Paper 26.2 target jar and copies it into libs/.'
group = 'build'
dependsOn tasks.named('releaseJar')
finalizedBy tasks.named('printBuildConfig')
}

tasks.named('assemble') {
dependsOn tasks.named('paper262Jar')
}
92 changes: 0 additions & 92 deletions pom.xml

This file was deleted.

15 changes: 15 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
}
}

rootProject.name = '1MB-XMas'
12 changes: 6 additions & 6 deletions src/main/java/ru/meloncode/xmas/Effects.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ class Effects {

public static final ParticleContainer AMBIENT_SAPLING = new ParticleContainer(Particle.PORTAL, 0.2f, 0.25f, 0.2f, 0.1f, 16);
public static final ParticleContainer AMBIENT_PORTAL = new ParticleContainer(Particle.PORTAL, 2f, 2f, 2f, 0.1f, 16);
public static final ParticleContainer TREE_SWAG = new ParticleContainer(Particle.REDSTONE, 0.25f, 0.25f, 0.25f, 10f, 16);
public static final ParticleContainer TREE_SWAG = new ParticleContainer(Particle.DUST, 0.25f, 0.25f, 0.25f, 10f, 16);
public static final ParticleContainer TREE_HEARTS_AMBIENT = new ParticleContainer(Particle.HEART, 1.25f, 1.25f, 1.25f, 10f, 1);
public static final ParticleContainer TREE_RED_SWAG = new ParticleContainer(Particle.REDSTONE, 0.25f, 0.25f, 0.25f, 0f, 16);
public static final ParticleContainer TREE_WHITE_AMBIENT = new ParticleContainer(Particle.FIREWORKS_SPARK, 2.25f, 2.25f, 2.25f, 0f, 4);
public static final ParticleContainer TREE_RED_SWAG = new ParticleContainer(Particle.DUST, 0.25f, 0.25f, 0.25f, 0f, 16);
public static final ParticleContainer TREE_WHITE_AMBIENT = new ParticleContainer(Particle.FIREWORK, 2.25f, 2.25f, 2.25f, 0f, 4);
public static final ParticleContainer TREE_CRIT_SWAG = new ParticleContainer(Particle.CRIT, 0.25f, 0.25f, 0.25f, 0f, 16);
public static final ParticleContainer TREE_GOLD_SWAG = new ParticleContainer(Particle.FLAME, 0.25f, 0.25f, 0.25f, 0f, 16);
public static final ParticleContainer SMOKE = new ParticleContainer(Particle.SMOKE_LARGE, 0f, 0f, 0f, 0f, 16);
public static final ParticleContainer SMOKE = new ParticleContainer(Particle.LARGE_SMOKE, 0f, 0f, 0f, 0f, 16);

public static final ParticleContainer GROW = new ParticleContainer(Particle.VILLAGER_HAPPY, 0.25f, 0.25f, 0.25f, 1f, 16);
public static final ParticleContainer AMBIENT_SNOW = new ParticleContainer(Particle.SNOW_SHOVEL, 1.5f, 3f, 1.5f, 0, 16);
public static final ParticleContainer GROW = new ParticleContainer(Particle.HAPPY_VILLAGER, 0.25f, 0.25f, 0.25f, 1f, 16);
public static final ParticleContainer AMBIENT_SNOW = new ParticleContainer(Particle.ITEM_SNOWBALL, 1.5f, 3f, 1.5f, 0, 16);

}
Loading