From 4d527b59d4775d1bdf1f622cf7ba0b5b66259f54 Mon Sep 17 00:00:00 2001 From: Jurjen Verbruggen Date: Mon, 1 Jul 2024 22:56:20 +0200 Subject: [PATCH 1/4] Started support 1.20.6 --- pom.xml | 24 ++++++---- .../animator/coaster/CoasterHandle.java | 2 +- .../tool/ParticleTrackVisualisationTool.java | 48 +++++++++---------- .../tool/ParticleTrainVisualisationTool.java | 16 +++---- .../com/jverbruggen/jrides/common/Tuple.java | 44 +++++++++++++++++ .../jrides/common/particle/Particle.java | 27 +++++++++++ .../common/particle/ParticleSpawner.java | 25 ++++++++++ .../particle/ParticleSpawnerFactory.java | 43 +++++++++++++++++ .../particle/ParticleSpawner_1_20_5.java | 34 +++++++++++++ .../particle/ParticleSpawner_Pre_1_20_5.java | 45 +++++++++++++++++ .../jrides/effect/EffectTriggerFactory.java | 3 +- .../ServiceProviderConfigurator.java | 3 ++ 12 files changed, 271 insertions(+), 43 deletions(-) create mode 100644 src/main/java/com/jverbruggen/jrides/common/Tuple.java create mode 100644 src/main/java/com/jverbruggen/jrides/common/particle/Particle.java create mode 100644 src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner.java create mode 100644 src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawnerFactory.java create mode 100644 src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner_1_20_5.java create mode 100644 src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner_Pre_1_20_5.java diff --git a/pom.xml b/pom.xml index ee3a186..02dc560 100644 --- a/pom.xml +++ b/pom.xml @@ -87,12 +87,12 @@ de.tr7zw item-nbt-api-plugin - 2.12.3 + 2.13.1 com.comphenix.protocol ProtocolLib - 5.1.0 + 5.3.0-SNAPSHOT provided @@ -110,13 +110,13 @@ dev.cerus.maps common - 3.8.3 + 3.8.5 compile dev.cerus.maps plugin - 3.8.3 + 3.8.5 compile @@ -147,7 +147,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.7.0 + 3.13.0 true 512m @@ -213,7 +213,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.3.0 + 3.6.0 @@ -292,12 +292,20 @@ jrides-1.20.4 + + 1.20.4 + 1.20.4 + 1.20 + + + + jrides-1.20.6 true - 1.20.4 - 1.20.4 + 1.20.6 + 1.20.6 1.20 diff --git a/src/main/java/com/jverbruggen/jrides/animator/coaster/CoasterHandle.java b/src/main/java/com/jverbruggen/jrides/animator/coaster/CoasterHandle.java index 4c669dc..14f4c53 100644 --- a/src/main/java/com/jverbruggen/jrides/animator/coaster/CoasterHandle.java +++ b/src/main/java/com/jverbruggen/jrides/animator/coaster/CoasterHandle.java @@ -96,7 +96,7 @@ public void setRideOverviewMapId(int rideOverviewMapId) { public void setTrains(List trains) { this.trains = trains; trains.forEach(t -> t.setCoasterHandle(this)); - this.visualisationTool = ParticleTrackVisualisationTool.fromTrack(getWorld(), track, 20, trains); + this.visualisationTool = ParticleTrackVisualisationTool.fromTrack(track, 20, trains); } public List getTrains() { diff --git a/src/main/java/com/jverbruggen/jrides/animator/coaster/tool/ParticleTrackVisualisationTool.java b/src/main/java/com/jverbruggen/jrides/animator/coaster/tool/ParticleTrackVisualisationTool.java index 4211302..e606a8c 100644 --- a/src/main/java/com/jverbruggen/jrides/animator/coaster/tool/ParticleTrackVisualisationTool.java +++ b/src/main/java/com/jverbruggen/jrides/animator/coaster/tool/ParticleTrackVisualisationTool.java @@ -18,13 +18,14 @@ package com.jverbruggen.jrides.animator.coaster.tool; import com.jverbruggen.jrides.animator.coaster.TrainHandle; +import com.jverbruggen.jrides.common.particle.Particle; +import com.jverbruggen.jrides.common.particle.ParticleSpawner; import com.jverbruggen.jrides.models.entity.Player; import com.jverbruggen.jrides.models.math.Vector3; import com.jverbruggen.jrides.models.ride.coaster.track.Track; import com.jverbruggen.jrides.models.ride.coaster.train.CoasterCart; import com.jverbruggen.jrides.models.ride.section.Section; -import org.bukkit.Location; -import org.bukkit.Particle; +import com.jverbruggen.jrides.serviceprovider.ServiceProvider; import org.bukkit.World; import java.util.List; @@ -32,33 +33,33 @@ import java.util.stream.IntStream; public class ParticleTrackVisualisationTool extends ParticleVisualisationTool { - private List locations; - private World world; - private List sectionSplitLocations; - private List trains; + private final List locations; + private final List sectionSplitLocations; + private final List trains; + private final ParticleSpawner particleSpawner; - public ParticleTrackVisualisationTool(World world, List locations, List sectionSplitLocations, List trains){ + public ParticleTrackVisualisationTool(List locations, List sectionSplitLocations, List trains){ super(5); - this.world = world; this.locations = locations; this.sectionSplitLocations = sectionSplitLocations; this.trains = trains; + this.particleSpawner = ServiceProvider.getSingleton(ParticleSpawner.class); } - public static ParticleTrackVisualisationTool fromTrack(World world, Track track, int takeOneInX, List trains){ + public static ParticleTrackVisualisationTool fromTrack(Track track, int takeOneInX, List trains){ List positions = track.getAllPositions(); - List sectionSplitLocations = track.getSections().stream() - .map(s -> s.getParentTrack().getLocationFor(s.getEndFrame()).toBukkitLocation(world)) + List sectionSplitLocations = track.getSections().stream() + .map(s -> s.getParentTrack().getLocationFor(s.getEndFrame())) .collect(Collectors.toList()); - List locations = IntStream + List locations = IntStream .range(0, positions.size()) .filter(i -> i % takeOneInX == 0) - .mapToObj(i -> positions.get(i).toBukkitLocation(world)) + .mapToObj(positions::get) .collect(Collectors.toList()); - return new ParticleTrackVisualisationTool(world, locations, sectionSplitLocations, trains); + return new ParticleTrackVisualisationTool(locations, sectionSplitLocations, trains); } @Override @@ -69,25 +70,24 @@ public void tick(){ } public void spawnVisualisationParticles(Player player){ - org.bukkit.entity.Player bukkitPlayer = player.getBukkitPlayer(); - for(Location location : locations){ - bukkitPlayer.spawnParticle(Particle.VILLAGER_HAPPY, location, 1, 0.01, 0.01, 0.01, 0); + for(Vector3 location : locations){ + particleSpawner.spawnParticle(player, Particle.TRACK_PARTICLE, location, 1, 0.01, 0.01, 0.01); } - for(Location splitSectionLocation : sectionSplitLocations){ - bukkitPlayer.spawnParticle(Particle.CRIT_MAGIC, splitSectionLocation, 5, 0.01, 1, 0.01, 0); + for(Vector3 splitSectionLocation : sectionSplitLocations){ + particleSpawner.spawnParticle(player, Particle.SECTION_DIVIDER_PARTICLE, splitSectionLocation, 5, 0.01, 1, 0.01); } for(TrainHandle train : trains){ - bukkitPlayer.spawnParticle(Particle.DRIP_WATER, train.getTrain().getCurrentHeadLocation().toBukkitLocation(world), 5, 0.01, 1, 0.01, 0); + particleSpawner.spawnParticle(player, Particle.TRAIN_HEAD_PARTICLE, train.getTrain().getCurrentHeadLocation(), 5, 0.01, 1, 0.01); for(CoasterCart cart : train.getTrain().getCarts()){ - bukkitPlayer.spawnParticle(Particle.VILLAGER_HAPPY, cart.getPosition().toBukkitLocation(world), 5, 0.01, 1, 0.01, 0); + particleSpawner.spawnParticle(player, Particle.CART_PARTICLE, cart.getPosition(), 5, 0.01, 1, 0.01); Section cartSection = cart.getFrame().getSection(); if(cart.getWheelDistance() != 0) { - bukkitPlayer.spawnParticle(Particle.HEART, cartSection.getLocationFor(cart.getFrame().clone().add(cart.getWheelDistance())).toBukkitLocation(world), 1, 0.01, 1, 0.01, 0); - bukkitPlayer.spawnParticle(Particle.HEART, cartSection.getLocationFor(cart.getFrame().clone().add(-cart.getWheelDistance())).toBukkitLocation(world), 1, 0.01, 1, 0.01, 0); + particleSpawner.spawnParticle(player, Particle.CART_WHEEL_DISTANCE_PARTICLE, cartSection.getLocationFor(cart.getFrame().clone().add(cart.getWheelDistance())), 1, 0.01, 1, 0.01); + particleSpawner.spawnParticle(player, Particle.CART_WHEEL_DISTANCE_PARTICLE, cartSection.getLocationFor(cart.getFrame().clone().add(-cart.getWheelDistance())), 1, 0.01, 1, 0.01); } } - bukkitPlayer.spawnParticle(Particle.DRIP_LAVA, train.getTrain().getCurrentTailLocation().toBukkitLocation(world), 5, 0.01, 1, 0.01, 0); + particleSpawner.spawnParticle(player, Particle.TRAIN_TAIL_PARTICLE, train.getTrain().getCurrentTailLocation(), 5, 0.01, 1, 0.01); } } } diff --git a/src/main/java/com/jverbruggen/jrides/animator/coaster/tool/ParticleTrainVisualisationTool.java b/src/main/java/com/jverbruggen/jrides/animator/coaster/tool/ParticleTrainVisualisationTool.java index 9b5cd20..5d0ab73 100644 --- a/src/main/java/com/jverbruggen/jrides/animator/coaster/tool/ParticleTrainVisualisationTool.java +++ b/src/main/java/com/jverbruggen/jrides/animator/coaster/tool/ParticleTrainVisualisationTool.java @@ -17,18 +17,19 @@ package com.jverbruggen.jrides.animator.coaster.tool; +import com.jverbruggen.jrides.common.particle.Particle; +import com.jverbruggen.jrides.common.particle.ParticleSpawner; import com.jverbruggen.jrides.models.entity.Player; import com.jverbruggen.jrides.models.ride.coaster.train.Train; -import org.bukkit.Particle; -import org.bukkit.World; +import com.jverbruggen.jrides.serviceprovider.ServiceProvider; public class ParticleTrainVisualisationTool extends ParticleVisualisationTool { - private World world; - private Train train; + private final ParticleSpawner particleSpawner; + private final Train train; - public ParticleTrainVisualisationTool(World world, Train train){ + public ParticleTrainVisualisationTool(Train train){ super(5); - this.world = world; + this.particleSpawner = ServiceProvider.getSingleton(ParticleSpawner.class); this.train = train; } @@ -40,7 +41,6 @@ public void tick(){ } public void spawnVisualisationParticles(Player player){ - org.bukkit.entity.Player bukkitPlayer = player.getBukkitPlayer(); - bukkitPlayer.spawnParticle(Particle.VILLAGER_HAPPY, train.getCurrentHeadLocation().toBukkitLocation(world), 1, 0.01, 0.01, 0.01, 0); + particleSpawner.spawnParticle(player, Particle.TRAIN_HEAD_PARTICLE, train.getCurrentHeadLocation(), 1, 0.01, 0.01, 0.01); } } diff --git a/src/main/java/com/jverbruggen/jrides/common/Tuple.java b/src/main/java/com/jverbruggen/jrides/common/Tuple.java new file mode 100644 index 0000000..bfba003 --- /dev/null +++ b/src/main/java/com/jverbruggen/jrides/common/Tuple.java @@ -0,0 +1,44 @@ +/************************************************************************************************************ + * GPLv3 License * + * * + * Copyright (c) 2024-2024 JVerbruggen * + * https://github.com/JVerbruggen/jrides * + * * + * This software is protected under the GPLv3 license, * + * that can be found in the project's LICENSE file. * + * * + * In short, permission is hereby granted that anyone can copy, modify and distribute this software. * + * You have to include the license and copyright notice with each and every distribution. You can use * + * this software privately or commercially. Modifications to the code have to be indicated, and * + * distributions of this code must be distributed with the same license, GPLv3. The software is provided * + * without warranty. The software author or license can not be held liable for any damages * + * inflicted by the software. * + ************************************************************************************************************/ + +package com.jverbruggen.jrides.common; + +public class Tuple { + private A a; + private B b; + + public Tuple(A var0, B var1) { + this.a = var0; + this.b = var1; + } + + public A getA() { + return this.a; + } + + public void setA(A var0) { + this.a = var0; + } + + public B getB() { + return this.b; + } + + public void setB(B var0) { + this.b = var0; + } +} diff --git a/src/main/java/com/jverbruggen/jrides/common/particle/Particle.java b/src/main/java/com/jverbruggen/jrides/common/particle/Particle.java new file mode 100644 index 0000000..3c06ecc --- /dev/null +++ b/src/main/java/com/jverbruggen/jrides/common/particle/Particle.java @@ -0,0 +1,27 @@ +/************************************************************************************************************ + * GPLv3 License * + * * + * Copyright (c) 2024-2024 JVerbruggen * + * https://github.com/JVerbruggen/jrides * + * * + * This software is protected under the GPLv3 license, * + * that can be found in the project's LICENSE file. * + * * + * In short, permission is hereby granted that anyone can copy, modify and distribute this software. * + * You have to include the license and copyright notice with each and every distribution. You can use * + * this software privately or commercially. Modifications to the code have to be indicated, and * + * distributions of this code must be distributed with the same license, GPLv3. The software is provided * + * without warranty. The software author or license can not be held liable for any damages * + * inflicted by the software. * + ************************************************************************************************************/ + +package com.jverbruggen.jrides.common.particle; + +public enum Particle { + TRACK_PARTICLE, + SECTION_DIVIDER_PARTICLE, + TRAIN_HEAD_PARTICLE, + TRAIN_TAIL_PARTICLE, + CART_PARTICLE, + CART_WHEEL_DISTANCE_PARTICLE +} diff --git a/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner.java b/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner.java new file mode 100644 index 0000000..fbc7c7b --- /dev/null +++ b/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner.java @@ -0,0 +1,25 @@ +/************************************************************************************************************ + * GPLv3 License * + * * + * Copyright (c) 2024-2024 JVerbruggen * + * https://github.com/JVerbruggen/jrides * + * * + * This software is protected under the GPLv3 license, * + * that can be found in the project's LICENSE file. * + * * + * In short, permission is hereby granted that anyone can copy, modify and distribute this software. * + * You have to include the license and copyright notice with each and every distribution. You can use * + * this software privately or commercially. Modifications to the code have to be indicated, and * + * distributions of this code must be distributed with the same license, GPLv3. The software is provided * + * without warranty. The software author or license can not be held liable for any damages * + * inflicted by the software. * + ************************************************************************************************************/ + +package com.jverbruggen.jrides.common.particle; + +import com.jverbruggen.jrides.models.entity.Player; +import com.jverbruggen.jrides.models.math.Vector3; + +public interface ParticleSpawner { + void spawnParticle(Player player, Particle particle, Vector3 location, int amount, double v0, double v1, double v2); +} diff --git a/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawnerFactory.java b/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawnerFactory.java new file mode 100644 index 0000000..de254c6 --- /dev/null +++ b/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawnerFactory.java @@ -0,0 +1,43 @@ +/************************************************************************************************************ + * GPLv3 License * + * * + * Copyright (c) 2024-2024 JVerbruggen * + * https://github.com/JVerbruggen/jrides * + * * + * This software is protected under the GPLv3 license, * + * that can be found in the project's LICENSE file. * + * * + * In short, permission is hereby granted that anyone can copy, modify and distribute this software. * + * You have to include the license and copyright notice with each and every distribution. You can use * + * this software privately or commercially. Modifications to the code have to be indicated, and * + * distributions of this code must be distributed with the same license, GPLv3. The software is provided * + * without warranty. The software author or license can not be held liable for any damages * + * inflicted by the software. * + ************************************************************************************************************/ + +package com.jverbruggen.jrides.common.particle; + +import org.bukkit.Bukkit; + +public class ParticleSpawnerFactory { + public static ParticleSpawner getParticleSpawner(){ + String currentVersion = Bukkit.getVersion(); + ParticleSpawner particleSpawner = null; + + if(currentVersion.contains("1.19.2") + || currentVersion.contains("1.20.1") + || currentVersion.contains("1.20.2") + || currentVersion.contains("1.20.3") + || currentVersion.contains("1.20.4")){ + particleSpawner = new ParticleSpawner_Pre_1_20_5(); + }else if(currentVersion.contains("1.20.5") + || currentVersion.contains("1.20.6")){ + particleSpawner = new ParticleSpawner_1_20_5(); + } + + if(particleSpawner == null) + throw new RuntimeException("No particle spawner implemented for bukkit version '" + currentVersion + "'"); + + return particleSpawner; + } +} diff --git a/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner_1_20_5.java b/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner_1_20_5.java new file mode 100644 index 0000000..1e225d0 --- /dev/null +++ b/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner_1_20_5.java @@ -0,0 +1,34 @@ +/************************************************************************************************************ + * GPLv3 License * + * * + * Copyright (c) 2024-2024 JVerbruggen * + * https://github.com/JVerbruggen/jrides * + * * + * This software is protected under the GPLv3 license, * + * that can be found in the project's LICENSE file. * + * * + * In short, permission is hereby granted that anyone can copy, modify and distribute this software. * + * You have to include the license and copyright notice with each and every distribution. You can use * + * this software privately or commercially. Modifications to the code have to be indicated, and * + * distributions of this code must be distributed with the same license, GPLv3. The software is provided * + * without warranty. The software author or license can not be held liable for any damages * + * inflicted by the software. * + ************************************************************************************************************/ + +package com.jverbruggen.jrides.common.particle; + +public class ParticleSpawner_1_20_5 extends ParticleSpawner_Pre_1_20_5 { + + @Override + protected org.bukkit.Particle getBukkitParticle(Particle particle){ + String particleName = switch (particle){ + case TRACK_PARTICLE -> "HAPPY_VILLAGER"; + case SECTION_DIVIDER_PARTICLE -> "CRIT"; + case TRAIN_HEAD_PARTICLE -> "DRIPPING_WATER"; + case TRAIN_TAIL_PARTICLE -> "DRIPPING_LAVA"; + case CART_PARTICLE -> "HAPPY_VILLAGER"; + case CART_WHEEL_DISTANCE_PARTICLE -> "HEART"; + }; + return org.bukkit.Particle.valueOf(particleName); + } +} diff --git a/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner_Pre_1_20_5.java b/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner_Pre_1_20_5.java new file mode 100644 index 0000000..e02c1df --- /dev/null +++ b/src/main/java/com/jverbruggen/jrides/common/particle/ParticleSpawner_Pre_1_20_5.java @@ -0,0 +1,45 @@ +/************************************************************************************************************ + * GPLv3 License * + * * + * Copyright (c) 2024-2024 JVerbruggen * + * https://github.com/JVerbruggen/jrides * + * * + * This software is protected under the GPLv3 license, * + * that can be found in the project's LICENSE file. * + * * + * In short, permission is hereby granted that anyone can copy, modify and distribute this software. * + * You have to include the license and copyright notice with each and every distribution. You can use * + * this software privately or commercially. Modifications to the code have to be indicated, and * + * distributions of this code must be distributed with the same license, GPLv3. The software is provided * + * without warranty. The software author or license can not be held liable for any damages * + * inflicted by the software. * + ************************************************************************************************************/ + +package com.jverbruggen.jrides.common.particle; + +import com.jverbruggen.jrides.JRidesPlugin; +import com.jverbruggen.jrides.models.entity.Player; +import com.jverbruggen.jrides.models.math.Vector3; + +public class ParticleSpawner_Pre_1_20_5 implements ParticleSpawner{ + + protected org.bukkit.Particle getBukkitParticle(Particle particle){ + String particleName = switch (particle){ + case TRACK_PARTICLE -> "VILLAGER_HAPPY"; + case SECTION_DIVIDER_PARTICLE -> "CRIT_MAGIC"; + case TRAIN_HEAD_PARTICLE -> "DRIP_WATER"; + case TRAIN_TAIL_PARTICLE -> "DRIP_LAVA"; + case CART_PARTICLE -> "VILLAGER_HAPPY"; + case CART_WHEEL_DISTANCE_PARTICLE -> "HEART"; + }; + return org.bukkit.Particle.valueOf(particleName); + } + + @Override + public void spawnParticle(Player player, Particle particle, Vector3 location, int amount, double v0, double v1, double v2) { + player.getBukkitPlayer().spawnParticle( + getBukkitParticle(particle), + location.toBukkitLocation(JRidesPlugin.getWorld()), + amount, v0, v1, v2, 0); + } +} diff --git a/src/main/java/com/jverbruggen/jrides/effect/EffectTriggerFactory.java b/src/main/java/com/jverbruggen/jrides/effect/EffectTriggerFactory.java index 5e8aaaa..1106984 100644 --- a/src/main/java/com/jverbruggen/jrides/effect/EffectTriggerFactory.java +++ b/src/main/java/com/jverbruggen/jrides/effect/EffectTriggerFactory.java @@ -17,6 +17,7 @@ package com.jverbruggen.jrides.effect; +import com.jverbruggen.jrides.common.Tuple; import com.jverbruggen.jrides.config.ConfigManager; import com.jverbruggen.jrides.config.trigger.TriggerConfig; import com.jverbruggen.jrides.effect.handle.EffectTriggerHandle; @@ -27,8 +28,6 @@ import com.jverbruggen.jrides.models.ride.RideType; import com.jverbruggen.jrides.models.ride.coaster.track.Track; import com.jverbruggen.jrides.serviceprovider.ServiceProvider; -import net.minecraft.util.Tuple; -import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; import java.util.*; diff --git a/src/main/java/com/jverbruggen/jrides/serviceprovider/configuration/ServiceProviderConfigurator.java b/src/main/java/com/jverbruggen/jrides/serviceprovider/configuration/ServiceProviderConfigurator.java index 351d9bb..4015512 100644 --- a/src/main/java/com/jverbruggen/jrides/serviceprovider/configuration/ServiceProviderConfigurator.java +++ b/src/main/java/com/jverbruggen/jrides/serviceprovider/configuration/ServiceProviderConfigurator.java @@ -25,6 +25,8 @@ import com.jverbruggen.jrides.animator.coaster.trackbehaviour.factory.TrackBehaviourFactory; import com.jverbruggen.jrides.animator.coaster.trackbehaviour.result.CartMovementFactory; import com.jverbruggen.jrides.common.MenuSessionManager; +import com.jverbruggen.jrides.common.particle.ParticleSpawner; +import com.jverbruggen.jrides.common.particle.ParticleSpawnerFactory; import com.jverbruggen.jrides.config.ConfigManager; import com.jverbruggen.jrides.config.trigger.TriggerConfigFactory; import com.jverbruggen.jrides.control.controller.RideControllerFactory; @@ -86,6 +88,7 @@ public static void configureStage2(JavaPlugin plugin){ File dataFolder = plugin.getDataFolder(); ServiceProvider.register(MenuSessionManager.class, new MenuSessionManager()); + ServiceProvider.register(ParticleSpawner.class, ParticleSpawnerFactory.getParticleSpawner()); ServiceProvider.register(MessageAgentManager.class, new MessageAgentManager()); ServiceProvider.register(RideCounterManager.class, new RideCounterManager()); ServiceProvider.register(ControlModeFactory.class, new ControlModeFactory()); From f0d7c0e1dc7d598a157ebbdb6cf278df9bbaade7 Mon Sep 17 00:00:00 2001 From: Jurjen Verbruggen Date: Mon, 1 Jul 2024 22:57:27 +0200 Subject: [PATCH 2/4] Updated release tags --- .github/workflows/create_release.yml | 2 +- .github/workflows/maven.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 38fa5ed..be5038f 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -12,7 +12,7 @@ on: workflow_dispatch: env: - MINECRAFT_VERSION: 1.20.4 + MINECRAFT_VERSION: 1.20.6 jobs: build: diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 531f25e..96ad1b1 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,7 +15,7 @@ on: branches: [ "master" ] env: - MINECRAFT_VERSION: 1.20.4 + MINECRAFT_VERSION: 1.20.6 jobs: build: From a401d2dc8739be08a954c74c5779c41cdf595778 Mon Sep 17 00:00:00 2001 From: Jurjen Verbruggen Date: Mon, 1 Jul 2024 23:39:55 +0200 Subject: [PATCH 3/4] Updated java version --- .github/workflows/create_release.yml | 4 ++-- .github/workflows/maven.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index be5038f..f5a9466 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -23,10 +23,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Java 17 + - name: Set up Java 21 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: maven - uses: SpraxDev/Action-SpigotMC@v4 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 96ad1b1..48e772c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -24,10 +24,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Java 17 + - name: Set up Java 21 uses: actions/setup-java@v3 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: maven - uses: SpraxDev/Action-SpigotMC@v4 From e42e2264001b3a08a7a108eb8592dbd36216bd94 Mon Sep 17 00:00:00 2001 From: Jurjen Verbruggen Date: Tue, 2 Jul 2024 22:00:41 +0200 Subject: [PATCH 4/4] Updated java version in maven --- docs/plugin_update.md | 8 ++++++++ pom.xml | 16 ++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/plugin_update.md b/docs/plugin_update.md index 70271d2..310aa6c 100644 --- a/docs/plugin_update.md +++ b/docs/plugin_update.md @@ -11,6 +11,14 @@ and download the latest BuildTools. Run BuildTools with the '--remapped' option, or in the gui with 'Remapped Jars'. +## 2. Update Java and Maven if necessary + +BuildTools will notify you when it needs a Java update. However, check maven as well if it is using the latest Java version. + +`mvn -version` + +You may have to change your JAVA_HOME environment variable. + ## 2. Add new build profile to pom.xml ```xml diff --git a/pom.xml b/pom.xml index 02dc560..b304c06 100644 --- a/pom.xml +++ b/pom.xml @@ -38,12 +38,12 @@ UTF-8 - 17.0.5 - 17 - 17.0.5 - 17.0.5 + 21.0.3 + 21 + 21 + 21 - + ${minecraft.version.short} ${minecraft.version.short}-R0.1-SNAPSHOT @@ -62,7 +62,7 @@ org.junit.jupiter junit-jupiter - 5.10.2 + 5.10.3 test @@ -122,7 +122,7 @@ junit junit - RELEASE + 4.13.2 test @@ -159,7 +159,7 @@ net.md-5 specialsource-maven-plugin - 1.2.4 + 2.0.3 package