Skip to content

Commit 6bb3134

Browse files
committed
Update to 1.21.3
1 parent 4e50ac7 commit 6bb3134

File tree

9 files changed

+22
-39
lines changed

9 files changed

+22
-39
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: ./gradlew build
3838
- name: capture build artifacts
3939
if: ${{ runner.os == 'Linux' && matrix.java == '21' }} # Only upload artifacts built from LTS java on one OS
40-
uses: actions/upload-artifact@v2
40+
uses: actions/upload-artifact@v4
4141
with:
4242
name: Artifacts
4343
path: build/libs/

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
CHANGELOG: ${{ github.event.release.body }}
3939
RELEASE: true
4040
- name: Upload GitHub release
41-
uses: AButler/upload-release-assets@v2.0
41+
uses: AButler/upload-release-assets@v3.0
4242
with:
4343
files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev.jar'
4444
repo-token: ${{ secrets.GITHUB_TOKEN }}

build.gradle

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
/*buildscript {
2-
dependencies {
3-
classpath "de.guntram.mcmod:crowdin-translate:1.4+1.19.3"
4-
}
5-
repositories {
6-
maven {
7-
name = 'CrowdinTranslate source'
8-
url = "https://minecraft.guntram.de/maven/"
9-
}
10-
}
11-
}*/
12-
131

142
plugins {
15-
id 'fabric-loom' version '1.6.+'
3+
id 'fabric-loom' version '1.7.+'
164
id "com.modrinth.minotaur" version "2.+"
175
id 'maven-publish'
186
}
@@ -23,13 +11,6 @@ targetCompatibility = JavaVersion.VERSION_21
2311

2412
archivesBaseName = project.archives_base_name
2513
group = project.maven_group
26-
/*
27-
apply plugin: 'de.guntram.mcmod.crowdin-translate'
28-
crowdintranslate.crowdinProjectName = 'patbox-mods'
29-
crowdintranslate.jsonSourceName = 'polydecorations'
30-
crowdintranslate.minecraftProjectName = 'polydecorations'
31-
crowdintranslate.verbose = false
32-
*/
3314

3415
if (System.getenv("CI") != null) {
3516
if (System.getenv("RELEASE") != null) {
@@ -80,9 +61,9 @@ dependencies {
8061

8162
// Fabric API. This is technically optional, but you probably want it anyway.
8263
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
83-
modImplementation include('eu.pb4:polymer-virtual-entity:0.9.2+1.21')
84-
modImplementation include("eu.pb4:placeholder-api:2.4.0+1.21")
85-
modImplementation include('eu.pb4:predicate-api:0.5.2+1.21')
64+
modImplementation include('eu.pb4:polymer-virtual-entity:0.10.0+1.21.2')
65+
modImplementation include("eu.pb4:placeholder-api:2.5.0+1.21.2")
66+
modImplementation include('eu.pb4:predicate-api:0.6.0+1.21.2')
8667
}
8768

8869
processResources {

gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ org.gradle.parallel=true
44

55
# Fabric Properties
66
# check these on https://fabricmc.net/develop
7-
minecraft_version=1.21
8-
yarn_mappings=1.21+build.1
9-
loader_version=0.15.11
7+
minecraft_version=1.21.3
8+
yarn_mappings=1.21.3+build.1
9+
loader_version=0.16.7
1010

1111
# Mod Properties
12-
mod_version = 1.1.0
12+
mod_version = 1.2.0
1313
maven_group = eu.pb4
1414
archives_base_name = ouch
1515

1616
# Dependencies
17-
fabric_version=0.100.1+1.21
17+
fabric_version=0.106.1+1.21.3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

src/main/java/eu/pb4/ouch/DamageDisplayLogic.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public record DamageDisplayLogic(Optional<RegistryEntryList<DamageType>> type,
5858

5959

6060
public static DamageDisplayLogic of(RegistryWrapper.WrapperLookup wrapper, String format, FloatRange range, float chance, MinecraftPredicate victimPredicate, MinecraftPredicate sourcePredicate, MinecraftPredicate attackerPredicate, RegistryKey<DamageType>... type) {
61-
var x = wrapper.getWrapperOrThrow(RegistryKeys.DAMAGE_TYPE);
61+
var x = wrapper.getOrThrow(RegistryKeys.DAMAGE_TYPE);
6262
return new DamageDisplayLogic(Optional.of(RegistryEntryList.of(Arrays.stream(type).map(x::getOrThrow).toList())),
6363
victimPredicate,
6464
attackerPredicate,
@@ -70,7 +70,7 @@ public static DamageDisplayLogic of(RegistryWrapper.WrapperLookup wrapper, Strin
7070
);
7171
}
7272
public static DamageDisplayLogic of(RegistryWrapper.WrapperLookup wrapper, String format, FloatRange range, float chance, MinecraftPredicate victimPredicate, MinecraftPredicate sourcePredicate, MinecraftPredicate attackerPredicate, TagKey<DamageType> tag) {
73-
return new DamageDisplayLogic(Optional.of(wrapper.getWrapperOrThrow(RegistryKeys.DAMAGE_TYPE).getOrThrow(tag)),
73+
return new DamageDisplayLogic(Optional.of(wrapper.getOrThrow(RegistryKeys.DAMAGE_TYPE).getOrThrow(tag)),
7474
victimPredicate,
7575
attackerPredicate,
7676
sourcePredicate,

src/main/java/eu/pb4/ouch/mixin/ArmorStandEntityMixin.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ private void onDamageApplied(ServerWorld world, DamageSource source, float amoun
2828
}
2929

3030
@Inject(method = "damage", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/decoration/ArmorStandEntity;emitGameEvent(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/entity/Entity;)V"))
31-
private void onDamageApplied2(DamageSource source, float amount, CallbackInfoReturnable<Boolean> cir) {
31+
private void onDamageApplied2(ServerWorld world, DamageSource source, float amount, CallbackInfoReturnable<Boolean> cir) {
3232
this.createText(source, amount);
3333
}
3434

35-
@Inject(method = "damage", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/decoration/ArmorStandEntity;kill()V"))
36-
private void onDamageApplied3(DamageSource source, float amount, CallbackInfoReturnable<Boolean> cir) {
35+
@Inject(method = "damage", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/decoration/ArmorStandEntity;kill(Lnet/minecraft/server/world/ServerWorld;)V"))
36+
private void onDamageApplied3(ServerWorld world, DamageSource source, float amount, CallbackInfoReturnable<Boolean> cir) {
3737
this.createText(source, amount);
3838
}
3939

4040
@Unique
4141
private void createText(DamageSource source, float amount) {
4242
if (!this.getWorld().isClient) {
43-
amount = DamageUtil.getDamageLeft(this, amount, source, (float) this.getArmor(), (float) this.getAttributeValue(EntityAttributes.GENERIC_ARMOR_TOUGHNESS));
43+
amount = DamageUtil.getDamageLeft(this, amount, source, (float) this.getArmor(), (float) this.getAttributeValue(EntityAttributes.ARMOR_TOUGHNESS));
4444
FloatingText.createDamage(this, source, amount);
4545
}
4646
}

src/main/java/eu/pb4/ouch/mixin/LivingEntityMixin.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import net.minecraft.entity.EntityType;
77
import net.minecraft.entity.LivingEntity;
88
import net.minecraft.entity.damage.DamageSource;
9+
import net.minecraft.server.world.ServerWorld;
910
import net.minecraft.world.World;
1011
import org.spongepowered.asm.mixin.Mixin;
1112
import org.spongepowered.asm.mixin.Shadow;
@@ -22,7 +23,7 @@ public LivingEntityMixin(EntityType<?> type, World world) {
2223
}
2324

2425
@Inject(method = "applyDamage", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/LivingEntity;emitGameEvent(Lnet/minecraft/registry/entry/RegistryEntry;)V"))
25-
private void onDamageApplied(DamageSource source, float amount, CallbackInfo ci) {
26+
private void onDamageApplied(ServerWorld world, DamageSource source, float amount, CallbackInfo ci) {
2627
if (!this.getWorld().isClient) {
2728
FloatingText.createDamage((LivingEntity) (Object) this, source, amount);
2829
}

src/main/java/eu/pb4/ouch/mixin/PlayerEntityMixin.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import net.minecraft.entity.LivingEntity;
88
import net.minecraft.entity.damage.DamageSource;
99
import net.minecraft.entity.player.PlayerEntity;
10+
import net.minecraft.server.world.ServerWorld;
1011
import net.minecraft.world.World;
1112
import org.spongepowered.asm.mixin.Mixin;
1213
import org.spongepowered.asm.mixin.Shadow;
@@ -21,7 +22,7 @@ public PlayerEntityMixin(EntityType<?> type, World world) {
2122
}
2223

2324
@Inject(method = "applyDamage", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;emitGameEvent(Lnet/minecraft/registry/entry/RegistryEntry;)V"))
24-
private void onDamageApplied(DamageSource source, float amount, CallbackInfo ci) {
25+
private void onDamageApplied(ServerWorld world, DamageSource source, float amount, CallbackInfo ci) {
2526
if (!this.getWorld().isClient) {
2627
FloatingText.createDamage((LivingEntity) (Object) this, source, amount);
2728
}

0 commit comments

Comments
 (0)