Skip to content

Commit f159890

Browse files
committed
Updated for 1.20
1 parent 287239a commit f159890

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'fabric-loom' version '0.12-SNAPSHOT'
2+
id 'fabric-loom' version '1.2-SNAPSHOT'
33
id 'maven-publish'
44
}
55

@@ -19,9 +19,9 @@ repositories {
1919
}
2020

2121
dependencies {
22-
minecraft "com.mojang:minecraft:1.19"
23-
mappings "net.fabricmc:yarn:1.19+build.4"
24-
modImplementation "net.fabricmc:fabric-loader:0.14.8"
22+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
23+
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
24+
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
2525
}
2626

2727
processResources {

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
org.gradle.jvmargs=-Xmx1G
33
# Fabric Properties
44
# check these on https://modmuss50.me/fabric.html
5-
minecraft_version=1.19
6-
yarn_mappings=1.19+build.4
7-
loader_version=0.14.8
5+
minecraft_version=1.20
6+
yarn_mappings=1.20+build.1
7+
loader_version=0.14.21
88
# Mod Properties
9-
mod_version=1.2-1.19
9+
mod_version=1.2-1.20
1010
maven_group=capitalistspz
1111
archives_base_name=snowballkb
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/java/capitalistspz/test/commands/Commands.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,6 @@ public static void register(CommandDispatcher<ServerCommandSource> dispatcher){
190190
}
191191

192192
private static void SendValueFeedback(CommandContext<ServerCommandSource> cmd, String message, double value){
193-
cmd.getSource().sendFeedback(Text.literal(String.format(message, value)), false);
193+
cmd.getSource().sendFeedback(() -> Text.literal(String.format(message, value)), false);
194194
}
195195
}

src/main/java/capitalistspz/test/mixin/EggEntityMxn.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import capitalistspz.test.SnowballKB;
44
import net.minecraft.entity.Entity;
55
import net.minecraft.entity.EntityType;
6-
import net.minecraft.entity.damage.DamageSource;
76
import net.minecraft.entity.player.PlayerEntity;
87
import net.minecraft.entity.projectile.thrown.EggEntity;
98
import net.minecraft.entity.projectile.thrown.ThrownItemEntity;
@@ -30,7 +29,7 @@ protected void onHitPlayer(EntityHitResult entityHitResult, CallbackInfo ci) {
3029
{
3130
entity.setVelocity(entity.getVelocity().add(this.getVelocity().normalize().multiply(SnowballKB.config.eggKbMultiplier)));
3231
entity.velocityModified = true;
33-
entity.damage(DamageSource.thrownProjectile(this, this.getOwner()), SnowballKB.config.eggDamage);
32+
entity.damage(this.getDamageSources().thrown(this, this.getOwner()), SnowballKB.config.eggDamage);
3433
}
3534

3635
}

src/main/java/capitalistspz/test/mixin/SnowballEntityMxn.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import capitalistspz.test.SnowballKB;
44
import net.minecraft.entity.Entity;
55
import net.minecraft.entity.EntityType;
6-
import net.minecraft.entity.damage.DamageSource;
76
import net.minecraft.entity.player.PlayerEntity;
87
import net.minecraft.entity.projectile.thrown.SnowballEntity;
98
import net.minecraft.entity.projectile.thrown.ThrownItemEntity;
@@ -31,8 +30,10 @@ protected void onHitPlayer(EntityHitResult entityHitResult, CallbackInfo ci, Ent
3130
{
3231
entity.setVelocity(entity.getVelocity().add(this.getVelocity().normalize().multiply(SnowballKB.config.snowKbMultiplier)));
3332
entity.velocityModified = true;
34-
entity.damage(DamageSource.thrownProjectile(this, this.getOwner()), SnowballKB.config.snowDamage);
33+
34+
entity.damage(this.getDamageSources().thrown(this, this.getOwner()), SnowballKB.config.snowDamage);
3535
}
3636

3737
}
38+
3839
}

src/main/resources/fabric.mod.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
],
2121
"accessWidener" : "snowballkb.accesswidener",
2222
"depends": {
23-
"fabricloader": ">=0.14.8",
24-
"minecraft": ">=1.19"
23+
"fabricloader": ">=0.14.21",
24+
"minecraft": ">=1.20"
2525
}
2626
}

0 commit comments

Comments
 (0)