Skip to content

Commit

Permalink
feat: adds inital support for Minecraft 1.21.4
Browse files Browse the repository at this point in the history
  • Loading branch information
timbru31 committed Dec 18, 2024
1 parent eb0ee70 commit f98919f
Show file tree
Hide file tree
Showing 10 changed files with 732 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/maven-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
cd BuildTools
[ -f ~/.m2/repository/org/spigotmc/spigot/1.20.6-R0.1-SNAPSHOT/spigot-1.20.6-R0.1-SNAPSHOT-remapped-mojang.jar ] || java -jar BuildTools.jar --rev 1.20.6 --remapped
[ -f ~/.m2/repository/org/spigotmc/spigot/1.21.1-R0.1-SNAPSHOT/spigot-1.21.1-R0.1-SNAPSHOT-remapped-mojang.jar ] || java -jar BuildTools.jar --rev 1.21.1 --remapped
[ -f ~/.m2/repository/org/spigotmc/spigot/1.21.4-R0.1-SNAPSHOT/spigot-1.21.4-R0.1-SNAPSHOT-remapped-mojang.jar ] || java -jar BuildTools.jar --rev 1.21.4 --remapped
- name: Build with Maven
run: mvn -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" "-Dhttps.protocols=TLSv1.2" -DskipTests=true "-Dmaven.javadoc.skip=true" -B clean package
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This Bukkit (compatible with CraftBukkit, Spigot, Paper) plugin adds a way to ob
- Shop addon [SilkSpawnersShopAddon](https://spigotmc.org/resources/12028/) (login required, Premium Plugin)
- BossBarAPI support for >= 1.9, otherwise BarAPI can be used
- Mimic support
- Support for multiple Minecraft versions, from 1.8.8 to 1.21.1 (with exlusion of 1.9 and 1.10)
- Support for multiple Minecraft versions, from 1.8.8 to 1.21.4 (with exlusion of 1.9 and 1.10)

_Third party features, all of them can be disabled_

Expand Down Expand Up @@ -319,6 +319,7 @@ Unfortunately, I can't give access to https://repo.dustplanet.de/artifactory/pri
mkdir -p BuildTools
cd BuildTools
wget -q https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
java -jar BuildTools.jar --rev 1.21.4 --remapped
java -jar BuildTools.jar --rev 1.21.1 --remapped
java -jar BuildTools.jar --rev 1.20.6 --remapped
java -jar BuildTools.jar --rev 1.20.4 --remapped
Expand Down
2 changes: 1 addition & 1 deletion modules/API/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.21.1-R0.1-SNAPSHOT</version>
<version>1.21.4-R0.1-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
7 changes: 6 additions & 1 deletion modules/SilkSpawners/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.21.1-R0.1-SNAPSHOT</version>
<version>1.21.4-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.sk89q</groupId>
Expand Down Expand Up @@ -213,6 +213,11 @@
<artifactId>silkspawners-v1_21_R1</artifactId>
<version>8.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.dustplanet</groupId>
<artifactId>silkspawners-v1_21_R3</artifactId>
<version>8.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.dustplanet</groupId>
<artifactId>silkspawners-API</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ public class SilkSpawners extends JavaPlugin {
private static final int BSTATS_PLUGIN_ID = 273;
private static final String[] COMPATIBLE_MINECRAFT_VERSIONS = { "v1_8_R3", "v1_11_R1", "v1_12_R1", "v1_13_R2", "v1_14_R1", "v1_15_R1",
"v1_16_R1", "v1_16_R2", "v1_16_R3", "v1_17_R1", "v1_18_R1", "v1_18_R2", "v1_19_R1", "v1_19_R2", "v1_19_R3", "v1_20_R1",
"v1_20_R2", "v1_20_R3", "v1_20_R4", "v1_21_R1" };
"v1_20_R2", "v1_20_R3", "v1_20_R4", "v1_21_R1", "v1_21_R3" };
public static final Map<Integer, String> PROTOCOL_VERSION_PACKAGE_MAP = new HashMap<Integer, String>() {
private static final long serialVersionUID = -5188779509588704507L;
{
put(766, "v1_20_R4");
put(767, "v1_21_R1");
put(769, "v1_21_R3");
}
};
public CommentedConfiguration config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,15 @@ private void loadDefaultMobs() {
config.addDefault("creatures.breeze.displayName", "Breeze");
config.options().copyDefaults(true);
tempList = new ArrayList<>();
// Creaking
tempList.add("groan");
config.addDefault("creatures.creaking.aliases", tempList);
config.addDefault("creatures.creaking.enable", true);
config.addDefault("creatures.creaking.enableCraftingSpawner", true);
config.addDefault("creatures.creaking.enableSpawnEggOverride", true);
config.addDefault("creatures.creaking.displayName", "Creaking");
config.options().copyDefaults(true);
tempList = new ArrayList<>();

// Non-mob vanilla entities below
// Item
Expand Down Expand Up @@ -1125,5 +1134,45 @@ private void loadDefaultMobs() {
config.addDefault("creatures.ominous_item_spawner.enable", false);
// wind_charge
config.addDefault("creatures.wind_charge.enable", false);
// acacia_boat
config.addDefault("creatures.acacia_boat.enable", false);
// acacia_chest_boat
config.addDefault("creatures.acacia_chest_boat.enable", false);
// bamboo_chest_raft
config.addDefault("creatures.bamboo_chest_raft.enable", false);
// bamboo_raft
config.addDefault("creatures.bamboo_raft.enable", false);
// birch_boat
config.addDefault("creatures.birch_boat.enable", false);
// birch_chest_boat
config.addDefault("creatures.birch_chest_boat.enable", false);
// cherry_boat
config.addDefault("creatures.cherry_boat.enable", false);
// cherry_chest_boat
config.addDefault("creatures.cherry_chest_boat.enable", false);
// dark_oak_boat
config.addDefault("creatures.dark_oak_boat.enable", false);
// dark_oak_chest_boat
config.addDefault("creatures.dark_oak_chest_boat.enable", false);
// jungle_boat
config.addDefault("creatures.jungle_boat.enable", false);
// jungle_chest_boat
config.addDefault("creatures.jungle_chest_boat.enable", false);
// mangrove_boat
config.addDefault("creatures.mangrove_boat.enable", false);
// mangrove_chest_boat
config.addDefault("creatures.mangrove_chest_boat.enable", false);
// oak_boat
config.addDefault("creatures.oak_boat.enable", false);
// oak_chest_boat
config.addDefault("creatures.oak_chest_boat.enable", false);
// pale_oak_boat
config.addDefault("creatures.pale_oak_boat.enable", false);
// pale_oak_chest_boat
config.addDefault("creatures.pale_oak_chest_boat.enable", false);
// spruce_boat
config.addDefault("creatures.spruce_boat.enable", false);
// spruce_chest_boat
config.addDefault("creatures.spruce_chest_boat.enable", false);
}
}
48 changes: 47 additions & 1 deletion modules/SilkSpawners/src/main/resources/mobs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# The creatures key is official creature type name (mobID), case-sensitive.
# Taken from https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html
creatures:

# Vanilla mobs, taken from https://minecraft.gamepedia.com/Java_Edition_data_values#Entities for 1.13+
# and https://minecraft.gamepedia.com/Java_Edition_data_values/Pre-flattening/Entity_IDs for up to 1.12
Creeper:
Expand Down Expand Up @@ -890,6 +889,13 @@ creatures:
enableCraftingSpawner: true
enableSpawnEggOverride: true
displayName: Breeze
creaking:
aliases:
- groan
enable: true
enableCraftingSpawner: true
enableSpawnEggOverride: true
displayName: Creaking

# Non-mob vanilla entities
# Enable on your own risk, some might work, some not!
Expand Down Expand Up @@ -1079,3 +1085,43 @@ creatures:
enable: false
wind_charge:
enable: false
acacia_boat:
enable: false
acacia_chest_boat:
enable: false
bamboo_chest_raft:
enable: false
bamboo_raft:
enable: false
birch_boat:
enable: false
birch_chest_boat:
enable: false
cherry_boat:
enable: false
cherry_chest_boat:
enable: false
dark_oak_boat:
enable: false
dark_oak_chest_boat:
enable: false
jungle_boat:
enable: false
jungle_chest_boat:
enable: false
mangrove_boat:
enable: false
mangrove_chest_boat:
enable: false
oak_boat:
enable: false
oak_chest_boat:
enable: false
pale_oak_boat:
enable: false
pale_oak_chest_boat:
enable: false
spruce_boat:
enable: false
spruce_chest_boat:
enable: false
72 changes: 72 additions & 0 deletions modules/v1_21_R3/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>silkspawners-v1_21_R3</artifactId>
<packaging>jar</packaging>
<name>SilkSpawners for v1_21_R3</name>

<parent>
<groupId>de.dustplanet</groupId>
<artifactId>silkspawners-parent</artifactId>
<version>8.1.1-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>

<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.21.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>remapped-mojang</classifier>
<exclusions>
<exclusion>
<groupId>org.spigotmc</groupId>
<artifactId>minecraft-server</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>de.dustplanet</groupId>
<artifactId>silkspawners-API</artifactId>
<version>8.1.1-SNAPSHOT</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>2.0.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-mojang</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.21.4-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.21.4-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-mojang</remappedClassifierName>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-spigot</id>
<configuration>
<inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-mojang.jar</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.21.4-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.21.4-R0.1-SNAPSHOT:jar:remapped-mojang</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit f98919f

Please sign in to comment.