Skip to content

Commit

Permalink
Add support for Minecraft version 1.19.4
Browse files Browse the repository at this point in the history
Took 12 minutes
  • Loading branch information
DerFrZocker committed Mar 30, 2023
1 parent 8aca181 commit 1b8006a
Show file tree
Hide file tree
Showing 31 changed files with 2,299 additions and 3 deletions.
6 changes: 6 additions & 0 deletions custom-ore-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>de.derfrzocker</groupId>
<artifactId>custom-ore-generator-impl-v1_19_R3</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
import de.derfrzocker.custom.ore.generator.impl.v1_19_R1.oregenerator.MinableGenerator_v1_19_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R2.WorldHandler_v1_19_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R2.oregenerator.MinableGenerator_v1_19_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R3.WorldHandler_v1_19_R3;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R3.oregenerator.MinableGenerator_v1_19_R3;
import de.derfrzocker.custom.ore.generator.impl.v1_8_R1.CustomOreBlockPopulator_v1_8_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_8_R1.oregenerator.MinableGenerator_v1_8_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_8_R2.CustomOreBlockPopulator_v1_8_R2;
Expand Down Expand Up @@ -136,8 +138,8 @@ public void onLoad() {
getLogger().warning("The Server version which you are running is unsupported, you are running version '" + version + "'");
getLogger().warning("The plugin supports following versions " + combineVersions(Version.v1_8_R1, Version.v1_8_R2, Version.v1_8_R3,
Version.v1_9_R1, Version.v1_9_R2, Version.v1_10_R1, Version.v1_11_R1, Version.v1_12_R1, Version.v1_13_R1, Version.v1_13_R2,
Version.v1_14_R1, Version.v1_15_R1, Version.v1_16_R1, Version.v1_16_R2, Version.v1_16_R3, Version.v1_17_R1, Version.v1_18_R1, Version.v1_18_R2, Version.v1_19_R1, Version.v1_19_R2));
getLogger().warning("(Spigot / Paper version 1.8 - 1.18.2), if you are running such a Minecraft version, than your bukkit implementation is unsupported, in this case please contact the developer, so he can resolve this Issue");
Version.v1_14_R1, Version.v1_15_R1, Version.v1_16_R1, Version.v1_16_R2, Version.v1_16_R3, Version.v1_17_R1, Version.v1_18_R1, Version.v1_18_R2, Version.v1_19_R1, Version.v1_19_R2, Version.v1_19_R3));
getLogger().warning("(Spigot / Paper version 1.8 - 1.19.4), if you are running such a Minecraft version, than your bukkit implementation is unsupported, in this case please contact the developer, so he can resolve this Issue");

if (version == Version.UNKNOWN) {
getLogger().warning("The Version '" + version + "' can indicate, that you are using a newer Minecraft version than currently supported.");
Expand Down Expand Up @@ -237,6 +239,7 @@ private void registerStandardOreGenerators(@NotNull final RegisterUtil registerU
registerUtil.register(Version.v1_18_R2, Version.v1_18_R2, () -> new MinableGenerator_v1_18_R2(infoFunction, oreSettingInfoBiFunction), true);
registerUtil.register(Version.v1_19_R1, Version.v1_19_R1, () -> new MinableGenerator_v1_19_R1(infoFunction, oreSettingInfoBiFunction), true);
registerUtil.register(Version.v1_19_R2, Version.v1_19_R2, () -> new MinableGenerator_v1_19_R2(infoFunction, oreSettingInfoBiFunction), true);
registerUtil.register(Version.v1_19_R3, Version.v1_19_R3, () -> new MinableGenerator_v1_19_R3(infoFunction, oreSettingInfoBiFunction), true);
}

private void registerStandardBlockSelector(@NotNull final RegisterUtil registerUtil) {
Expand Down Expand Up @@ -271,6 +274,9 @@ private void registerStandardCustomDatas(@NotNull final RegisterUtil registerUti

private void initWorldHandler() {
switch (version) {
case v1_19_R3:
new WorldHandler_v1_19_R3(this, CustomOreGeneratorServiceSupplier.INSTANCE);
break;
case v1_19_R2:
new WorldHandler_v1_19_R2(this, CustomOreGeneratorServiceSupplier.INSTANCE);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import de.derfrzocker.custom.ore.generator.impl.v1_18_R2.customdata.AutoApplier_v1_18_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R1.customdata.AutoApplier_v1_19_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R2.customdata.AutoApplier_v1_19_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R3.customdata.AutoApplier_v1_19_R3;
import de.derfrzocker.custom.ore.generator.impl.v1_9_R1.customdata.AutoApplier_v1_9_R1;
import de.derfrzocker.custom.ore.generator.impl.v_1_9_R2.customdata.AutoApplier_v1_9_R2;
import de.derfrzocker.spigot.utils.Version;
Expand All @@ -61,6 +62,7 @@ public class AutoCustomData extends AbstractAutoCustomData {

static {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
case v1_19_R2:
case v1_19_R1:
case v1_18_R2:
Expand Down Expand Up @@ -109,6 +111,8 @@ public boolean hasCustomData(@NotNull final BlockState blockState) {
@Override
protected AutoApplier getCustomDataApplier0() {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
return new AutoApplier_v1_19_R3(this);
case v1_19_R2:
return new AutoApplier_v1_19_R2(this);
case v1_19_R1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import de.derfrzocker.custom.ore.generator.impl.v1_18_R2.customdata.BlockStateApplier_v1_18_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R1.customdata.BlockStateApplier_v1_19_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R2.customdata.BlockStateApplier_v1_19_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R3.customdata.BlockStateApplier_v1_19_R3;
import de.derfrzocker.spigot.utils.Version;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
Expand All @@ -67,6 +68,8 @@ public BlockStateCustomData(@NotNull final Supplier<CustomOreGeneratorService> s
@Override
protected AbstractBlockStateCustomData.BlockStateApplier getCustomDataApplier0() {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
return new BlockStateApplier_v1_19_R3(this.serviceSupplier, this);
case v1_19_R2:
return new BlockStateApplier_v1_19_R2(this.serviceSupplier, this);
case v1_19_R1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class CommandCustomData extends AbstractCustomData<CustomDataApplier> {

static {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
case v1_19_R2:
case v1_19_R1:
case v1_18_R2:
Expand Down Expand Up @@ -139,6 +140,8 @@ public String getCustomData(@NotNull final BlockState blockState) {
@Override
protected CustomDataApplier getCustomDataApplier0() {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
return new CommandApplier_v1_19_R2(this);
case v1_19_R2:
return new CommandApplier_v1_19_R2(this);
case v1_19_R1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import de.derfrzocker.custom.ore.generator.impl.v1_18_R2.customdata.DirectionApplier_v1_18_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R1.customdata.DirectionApplier_v1_19_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R2.customdata.DirectionApplier_v1_19_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R3.customdata.DirectionApplier_v1_19_R3;
import de.derfrzocker.spigot.utils.Version;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
Expand Down Expand Up @@ -124,6 +125,8 @@ public Boolean getCustomData(@NotNull final BlockState blockState) {
@Override
protected CustomDataApplier getCustomDataApplier0() {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
return new DirectionApplier_v1_19_R3(this, blockFace);
case v1_19_R2:
return new DirectionApplier_v1_19_R2(this, blockFace);
case v1_19_R1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import de.derfrzocker.custom.ore.generator.impl.v1_18_R2.customdata.FacingApplier_v1_18_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R1.customdata.FacingApplier_v1_19_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R2.customdata.FacingApplier_v1_19_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R3.customdata.FacingApplier_v1_19_R3;
import de.derfrzocker.spigot.utils.Version;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
Expand Down Expand Up @@ -109,6 +110,8 @@ public BlockFace getCustomData(@NotNull final BlockState blockState) {
@Override
protected CustomDataApplier getCustomDataApplier0() {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
return new FacingApplier_v1_19_R3(this);
case v1_19_R2:
return new FacingApplier_v1_19_R2(this);
case v1_19_R1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import de.derfrzocker.custom.ore.generator.impl.v1_18_R2.customdata.ItemModsApplier_v1_18_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R1.customdata.ItemModsApplier_v1_19_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R2.customdata.ItemModsApplier_v1_19_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R3.customdata.ItemModsApplier_v1_19_R3;
import de.derfrzocker.spigot.utils.Version;
import dev.linwood.itemmods.ItemMods;
import dev.linwood.itemmods.api.block.CustomBlock;
Expand Down Expand Up @@ -106,6 +107,8 @@ public String getCustomData(@NotNull final BlockState blockState) {
@Override
protected CustomDataApplier getCustomDataApplier0() {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
return new ItemModsApplier_v1_19_R3(this);
case v1_19_R2:
return new ItemModsApplier_v1_19_R2(this);
case v1_19_R1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import de.derfrzocker.custom.ore.generator.impl.v1_18_R2.customdata.NBTTagApplier_v1_18_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R1.customdata.NBTTagApplier_v1_19_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R2.customdata.NBTTagApplier_v1_19_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R3.customdata.NBTTagApplier_v1_19_R3;
import de.derfrzocker.custom.ore.generator.impl.v1_8_R1.customdata.NBTTagApplier_v1_8_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_8_R2.customdata.NBTTagApplier_v1_8_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_8_R3.customdata.NBTTagApplier_v1_8_R3;
Expand All @@ -63,6 +64,8 @@ public NBTTagCustomData(@NotNull final Function<String, Info> infoFunction, @Not
@Override
protected NBTTagApplier getCustomDataApplier0() {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
return new NBTTagApplier_v1_19_R3(this);
case v1_19_R2:
return new NBTTagApplier_v1_19_R2(this);
case v1_19_R1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import de.derfrzocker.custom.ore.generator.impl.v1_18_R2.customdata.OraxenApplier_v1_18_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R1.customdata.OraxenApplier_v1_19_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R2.customdata.OraxenApplier_v1_19_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R3.customdata.OraxenApplier_v1_19_R3;
import de.derfrzocker.spigot.utils.Version;
import io.th0rgal.oraxen.api.OraxenItems;
import io.th0rgal.oraxen.mechanics.provided.gameplay.block.BlockMechanicFactory;
Expand Down Expand Up @@ -147,6 +148,8 @@ private int getCode(MultipleFacing blockData) {
@Override
protected CustomDataApplier getCustomDataApplier0() {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
return new OraxenApplier_v1_19_R3(this);
case v1_19_R2:
return new OraxenApplier_v1_19_R2(this);
case v1_19_R1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import de.derfrzocker.custom.ore.generator.impl.v1_18_R2.customdata.SkullTextureApplier_v1_18_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R1.customdata.SkullTextureApplier_v1_19_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R2.customdata.SkullTextureApplier_v1_19_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R3.customdata.SkullTextureApplier_v1_19_R3;
import de.derfrzocker.custom.ore.generator.impl.v1_8_R1.customdata.SkullTextureApplier_v1_8_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_8_R2.customdata.SkullTextureApplier_v1_8_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_8_R3.customdata.SkullTextureApplier_v1_8_R3;
Expand All @@ -62,6 +63,7 @@ public class SkullTextureCustomData extends AbstractSkullTextureCustomData {

static {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
case v1_19_R2:
case v1_19_R1:
case v1_18_R2:
Expand Down Expand Up @@ -104,6 +106,8 @@ public boolean canApply(@NotNull final OreConfig oreConfig) {
@Override
protected SkullTextureApplier getCustomDataApplier0() {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
return new SkullTextureApplier_v1_19_R3(this);
case v1_19_R2:
return new SkullTextureApplier_v1_19_R2(this);
case v1_19_R1:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import de.derfrzocker.custom.ore.generator.impl.v1_18_R2.customdata.TickBlockApplier_v1_18_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R1.customdata.TickBlockApplier_v1_19_R1;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R2.customdata.TickBlockApplier_v1_19_R2;
import de.derfrzocker.custom.ore.generator.impl.v1_19_R3.customdata.TickBlockApplier_v1_19_R3;
import de.derfrzocker.spigot.utils.Version;
import org.bukkit.Bukkit;
import org.bukkit.Material;
Expand Down Expand Up @@ -88,6 +89,8 @@ public Boolean getCustomData(@NotNull final BlockState blockState) {
@Override
protected CustomDataApplier getCustomDataApplier0() {
switch (Version.getServerVersion(Bukkit.getServer())) {
case v1_19_R3:
return new TickBlockApplier_v1_19_R3(this);
case v1_19_R2:
return new TickBlockApplier_v1_19_R2(this);
case v1_19_R1:
Expand Down
1 change: 1 addition & 0 deletions impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<module>v1_18_R2</module>
<module>v1_19_R1</module>
<module>v1_19_R2</module>
<module>v1_19_R3</module>
</modules>

<artifactId>custom-ore-generator-impl</artifactId>
Expand Down
98 changes: 98 additions & 0 deletions impl/v1_19_R3/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>

<parent>
<artifactId>custom-ore-generator-impl</artifactId>
<groupId>de.derfrzocker</groupId>
<version>${revision}</version>
</parent>

<artifactId>custom-ore-generator-impl-v1_19_R3</artifactId>
<repositories>
<repository>
<id>minecraft-libraries</id>
<name>Minecraft Libraries</name>
<url>https://libraries.minecraft.net</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>dev.linwood</groupId>
<artifactId>ItemMods</artifactId>
<version>${ItemMods.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.oraxen</groupId>
<artifactId>Oraxen</artifactId>
<version>${Oraxen.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>de.derfrzocker</groupId>
<artifactId>custom-ore-generator-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>de.derfrzocker</groupId>
<artifactId>custom-ore-generator-impl-abstract</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>net.md-5</groupId>
<artifactId>specialsource-maven-plugin</artifactId>
<version>1.2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>remap</goal>
</goals>
<id>remap-obf</id>
<configuration>
<srgIn>org.spigotmc:minecraft-server:1.19.4-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
<reverse>true</reverse>
<remappedDependencies>org.spigotmc:spigot:1.19.4-R0.1-SNAPSHOT:jar:remapped-mojang
</remappedDependencies>
<remappedArtifactAttached>true</remappedArtifactAttached>
<remappedClassifierName>remapped-obf</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-obf.jar
</inputFile>
<srgIn>org.spigotmc:minecraft-server:1.19.4-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.19.4-R0.1-SNAPSHOT:jar:remapped-obf
</remappedDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Loading

0 comments on commit 1b8006a

Please sign in to comment.