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

fix: 1.20.6 兼容 #118

Merged
merged 2 commits into from
Aug 3, 2024
Merged
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
6 changes: 2 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
*.java @SlimefunGuguProject/code-reviewers
src/main/resources/blocks.yml @StarWishsama
src/main/resources/generic-stories.yml @StarWishsama
* @ybw0014
*.java @SlimefunGuguProject/code-reviewers
@ybw0014
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

32 changes: 7 additions & 25 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
value: |
## 欢迎来到 SlimefunGuguProject 的问题追踪器
你正在反馈 CrystamaeHistoria 汉化版出现的 Bug。
任何意见,建议请前往[QQ群](https://ybw0014.net/go/sf-qgroup)进行反馈。
任何意见,建议请前往[QQ群](https://50l.cc/gugu-qgroup)进行反馈。
建议先阅读[这篇文章](https://slimefun-wiki.guizhanss.cn/How-to-report-bugs)了解如何正确地汇报Bug。

<strong><i>你必须填写标注为星号(*)的表单项</i></strong>
Expand All @@ -20,13 +20,11 @@ body:
label: 检查项目
description: 在汇报之前,你需要确认
options:
- label: 你使用的是从构建站下载的版本 (https://builds.guizhanss.net)
- label: 你使用的是从构建站下载的版本
required: true
- label: 你已经检验过下载的文件的校验和,确认已完整下载文件 (暂未推出)
required: false
- label: 你没有对下载的文件内容进行任何更改
- label: 你已经检验过下载的文件的校验和,确认已完整下载文件
required: true
- label: 你没有安装`CS-CoreLib`
- label: 你没有对下载的文件内容进行任何更改
required: true
- label: 你已经寻找过[已知问题列表](https://github.com/SlimefunGuguProject/CrystamaeHistoria/issues),且没有找到相同的问题
required: true
Expand Down Expand Up @@ -102,29 +100,14 @@ body:
validations:
required: true

- type: dropdown
- type: input
id: minecraft-version
attributes:
label: Minecraft 版本
description: 请选择你的 Minecraft 版本
options:
- 1.18.x
- 1.17.x
- 本插件不支持旧版本
description: 请填写你的 Minecraft 版本
validations:
required: true

- type: checkboxes
id: cscorelib-version
attributes:
label: CS-CoreLib 版本
description: |
从2021年1月30日起,Slimefun以及其附属插件都不再需要安装CS-CoreLib。
保留CS-CoreLib可能导致一些未知的问题。
options:
- label: 我没有安装CS-CoreLib
required: true

- type: textarea
id: slimefun-version
attributes:
Expand All @@ -142,7 +125,6 @@ body:
label: 插件版本
description: |
请填写插件版本
只需填写Build后面的数字版本即可
(`Build 7 zh-CN(ybw0014) (git 9ef7fee)`只需填写`7`即可)
(例如 Build 1 (git x114514))
validations:
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 没有 Github 账号? 不会使用 Github?
url: https://ybw0014.net/go/sf-qgroup
url: https://50l.cc/gugu-qgroup
about: 点击右侧按钮加入QQ群进行反馈
8 changes: 4 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
if: startsWith(github.event.head_commit.message, '[CI skip]') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- name: Set up JDK 16
uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 16
java-version: 21
cache: 'maven'
- name: Build with Maven
run: mvn package --file pom.xml
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<version>1.20.6-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.StarWishsama</groupId>
<artifactId>Slimefun4</artifactId>
<version>2022.06</version>
<version>a19da27bee</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -153,7 +153,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<version>1.18.34</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.libraries.dough.collections.Pair;
import io.github.thebusybiscuit.slimefun4.libraries.dough.common.ChatColors;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedItemFlag;
import lombok.Getter;
import lombok.Setter;
import net.md_5.bungee.api.ChatColor;
Expand Down Expand Up @@ -64,7 +65,7 @@ public SlimefunItemStack getThemedStack() {
);
ItemMeta itemMeta = stack.getItemMeta();
itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
itemMeta.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS);
itemMeta.addItemFlags(VersionedItemFlag.HIDE_ADDITIONAL_TOOLTIP);
stack.setItemMeta(itemMeta);
return stack;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import io.github.sefiraat.crystamaehistoria.utils.GeneralUtils;
import io.github.sefiraat.crystamaehistoria.utils.SpellUtils;
import io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedEntityType;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Entity;
Expand All @@ -35,14 +36,14 @@ public class Animaniacs extends Spell {
EntityType.DONKEY,
EntityType.WOLF,
EntityType.FOX,
EntityType.SNOWMAN,
VersionedEntityType.SNOW_GOLEM,
EntityType.TURTLE,
EntityType.RABBIT,
EntityType.PARROT,
EntityType.CAT,
EntityType.OCELOT,
EntityType.HORSE,
EntityType.MUSHROOM_COW,
VersionedEntityType.MOOSHROOM,
EntityType.AXOLOTL,
EntityType.PUFFERFISH,
EntityType.PIG,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
import io.github.sefiraat.crystamaehistoria.utils.SpellUtils;
import io.github.thebusybiscuit.slimefun4.libraries.dough.data.persistent.PersistentDataAPI;
import io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedPotionEffectType;
import net.guizhanss.crystamaehistoria.utils.compatibility.VersionedEntityTypeX;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffectType;
Expand All @@ -33,12 +34,12 @@ public AntiPrism() {
.makeEffectingSpell(true, true)
.addNegativeEffect(PotionEffectType.BAD_OMEN, 1, 30)
.addNegativeEffect(PotionEffectType.BLINDNESS, 1, 30)
.addNegativeEffect(PotionEffectType.CONFUSION, 1, 30)
.addNegativeEffect(PotionEffectType.HARM, 1, 30)
.addNegativeEffect(VersionedPotionEffectType.NAUSEA, 1, 30)
.addNegativeEffect(VersionedPotionEffectType.INSTANT_DAMAGE, 1, 30)
.addNegativeEffect(PotionEffectType.HUNGER, 1, 30)
.addNegativeEffect(PotionEffectType.POISON, 1, 30)
.addNegativeEffect(PotionEffectType.SLOW, 1, 30)
.addNegativeEffect(PotionEffectType.SLOW_DIGGING, 1, 30)
.addNegativeEffect(VersionedPotionEffectType.SLOWNESS, 1, 30)
.addNegativeEffect(VersionedPotionEffectType.MINING_FATIGUE, 1, 30)
.addNegativeEffect(PotionEffectType.UNLUCK, 1, 30)
.addNegativeEffect(PotionEffectType.WEAKNESS, 1, 30)
.addNegativeEffect(PotionEffectType.WITHER, 1, 30);
Expand All @@ -49,7 +50,7 @@ public AntiPrism() {
public void cast(CastInformation castInformation) {
Location location = castInformation.getCastLocation();
Location aimLocation = location.clone().add(0, 1.5, 0).add(location.getDirection().multiply(2));
MagicProjectile magicProjectile = SpellUtils.summonMagicProjectile(castInformation, EntityType.SPLASH_POTION, aimLocation);
MagicProjectile magicProjectile = SpellUtils.summonMagicProjectile(castInformation, VersionedEntityTypeX.POTION, aimLocation);
magicProjectile.setVelocity(location.getDirection(), 0.5);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
import io.github.sefiraat.crystamaehistoria.utils.SpellUtils;
import io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction;
import io.github.thebusybiscuit.slimefun4.utils.tags.SlimefunTag;
import net.guizhanss.crystamaehistoria.utils.compatibility.VersionedEntityTypeX;
import org.bukkit.DyeColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Tag;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.material.Colorable;

import javax.annotation.Nonnull;
Expand All @@ -42,7 +42,7 @@ public Bobulate() {
public void fireProjectile(CastInformation castInformation) {
final Location location = castInformation.getCastLocation();
final Location aimLocation = location.clone().add(0, 1.5, 0).add(location.getDirection().multiply(2));
final MagicProjectile magicProjectile = SpellUtils.summonMagicProjectile(castInformation, EntityType.SPLASH_POTION, aimLocation);
final MagicProjectile magicProjectile = SpellUtils.summonMagicProjectile(castInformation, VersionedEntityTypeX.POTION, aimLocation);
magicProjectile.setVelocity(location.getDirection(), 1.5);
magicProjectile.disableGravity();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
import io.github.sefiraat.crystamaehistoria.slimefun.items.mechanisms.liquefactionbasin.RecipeSpell;
import io.github.sefiraat.crystamaehistoria.stories.definition.StoryType;
import io.github.sefiraat.crystamaehistoria.utils.ParticleUtils;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedPotionEffectType;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.potion.PotionEffectType;

import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
Expand All @@ -22,8 +22,8 @@ public ChillWind() {
SpellCoreBuilder spellCoreBuilder = new SpellCoreBuilder(120, true, 7, false, 25, true)
.makeTickingSpell(this::cast, 20, true, 5, false)
.makeEffectingSpell(false, false)
.addNegativeEffect(PotionEffectType.SLOW, 4, 1)
.addNegativeEffect(PotionEffectType.SLOW_DIGGING, 4, 1);
.addNegativeEffect(VersionedPotionEffectType.SLOWNESS, 4, 1)
.addNegativeEffect(VersionedPotionEffectType.MINING_FATIGUE, 4, 1);
setSpellCore(spellCoreBuilder.build());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import io.github.sefiraat.crystamaehistoria.slimefun.items.mechanisms.liquefactionbasin.RecipeSpell;
import io.github.sefiraat.crystamaehistoria.stories.definition.StoryType;
import io.github.sefiraat.crystamaehistoria.utils.ParticleUtils;
import net.guizhanss.crystamaehistoria.utils.compatibility.VersionedParticleX;
import org.bukkit.Color;
import org.bukkit.Location;
import org.bukkit.Material;
Expand Down Expand Up @@ -39,7 +40,7 @@ public void onTick(CastInformation castInformation) {
if (foundBlock == null) {
ParticleUtils.displayParticleEffect(
location.add(location.getDirection()),
Particle.VILLAGER_ANGRY,
VersionedParticleX.ANGRY_VILLAGER,
1,
10
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import io.github.sefiraat.crystamaehistoria.utils.GeneralUtils;
import io.github.sefiraat.crystamaehistoria.utils.ParticleUtils;
import io.github.sefiraat.crystamaehistoria.utils.SpellUtils;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedPotionEffectType;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.potion.PotionEffectType;

import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
Expand All @@ -25,7 +25,7 @@ public EarthNova() {
SpellCoreBuilder spellCoreBuilder = new SpellCoreBuilder(20, true, 10, false, 10, false)
.makeDamagingSpell(2, true, 1, false)
.makeEffectingSpell(false, true)
.addNegativeEffect(PotionEffectType.SLOW, 20, 2)
.addNegativeEffect(VersionedPotionEffectType.SLOWNESS, 20, 2)
.makeProjectileSpell(this::fireProjectiles, 2, false, 1, false)
.makeProjectileVsEntitySpell(this::projectileHit);
setSpellCore(spellCoreBuilder.build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import io.github.sefiraat.crystamaehistoria.utils.GeneralUtils;
import io.github.sefiraat.crystamaehistoria.utils.ParticleUtils;
import io.github.sefiraat.crystamaehistoria.utils.SpellUtils;
import net.guizhanss.crystamaehistoria.utils.compatibility.VersionedParticleX;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;

Expand Down Expand Up @@ -57,7 +57,7 @@ public void projectileHit(CastInformation castInformation) {

@ParametersAreNonnullByDefault
public void afterProjectileHit(CastInformation castInformation) {
ParticleUtils.displayParticleEffect(castInformation.getMainTarget(), Particle.EXPLOSION_NORMAL, 1.0, 5);
ParticleUtils.displayParticleEffect(castInformation.getMainTarget(), VersionedParticleX.POOF, 1.0, 5);
}

@Nonnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import io.github.sefiraat.crystamaehistoria.utils.GeneralUtils;
import io.github.sefiraat.crystamaehistoria.utils.ParticleUtils;
import io.github.sefiraat.crystamaehistoria.utils.SpellUtils;
import net.guizhanss.crystamaehistoria.utils.compatibility.VersionedParticleX;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;

Expand Down Expand Up @@ -53,7 +53,7 @@ public void projectileHit(CastInformation castInformation) {
for (LivingEntity livingEntity : getTargets(castInformation, getProjectileAoe(castInformation), true)) {
GeneralUtils.damageEntity(livingEntity, castInformation.getCaster(), getDamage(castInformation));
livingEntity.setFreezeTicks(60);
ParticleUtils.displayParticleEffect(livingEntity, Particle.SNOW_SHOVEL, 1, 5);
ParticleUtils.displayParticleEffect(livingEntity, VersionedParticleX.ITEM_SNOWBALL, 1, 5);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.github.sefiraat.crystamaehistoria.utils.GeneralUtils;
import io.github.sefiraat.crystamaehistoria.utils.ParticleUtils;
import io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction;
import net.guizhanss.crystamaehistoria.utils.compatibility.VersionedParticleX;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
Expand Down Expand Up @@ -50,7 +51,7 @@ public void cast(CastInformation castInformation) {
Location newLocation = entity.getLocation().clone();
newLocation.setYaw(entity.getLocation().getYaw() + 10F);
entity.teleport(newLocation);
ParticleUtils.displayParticleEffect(entity, Particle.SPELL, 1, 1);
ParticleUtils.displayParticleEffect(entity, VersionedParticleX.EFFECT, 1, 1);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
import io.github.sefiraat.crystamaehistoria.utils.GeneralUtils;
import io.github.sefiraat.crystamaehistoria.utils.ParticleUtils;
import io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedParticle;
import io.github.thebusybiscuit.slimefun4.utils.tags.SlimefunTag;
import net.guizhanss.crystamaehistoria.utils.compatibility.VersionedMaterial;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.Tag;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
Expand Down Expand Up @@ -67,7 +68,7 @@ public void onTick(CastInformation castInformation) {
block.setType(material);
}
block.getRelative(BlockFace.DOWN).setType(Material.GRASS_BLOCK);
ParticleUtils.displayParticleEffect(block.getLocation(), Particle.FIREWORKS_SPARK, 0.5, 3);
ParticleUtils.displayParticleEffect(block.getLocation(), VersionedParticle.FIREWORK, 0.5, 3);
}
}

Expand Down Expand Up @@ -105,6 +106,6 @@ public String getId() {
@Nonnull
@Override
public Material getMaterial() {
return Material.GRASS;
return VersionedMaterial.SHORT_GRASS;
}
}
Loading