Skip to content

Commit

Permalink
Update to 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Patbox committed Feb 12, 2024
1 parent 110e909 commit 1978f1f
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.1.+'
id 'fabric-loom' version '1.4.+'
id 'maven-publish'
}

Expand Down Expand Up @@ -30,7 +30,7 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

modImplementation "xyz.nucleoid:plasmid:0.5+1.20.1-SNAPSHOT"
modImplementation "xyz.nucleoid:plasmid:0.5.102-SNAPSHOT+1.20.4"
modImplementation "xyz.nucleoid:substrate:0.2.1+1.19.4"

implementation include("kdotjpg:open-simplex:2.0")
Expand All @@ -57,7 +57,7 @@ tasks.withType(JavaCompile) {
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
//classifier = "sources"
from sourceSets.main.allSource
}

Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.jvmargs=-Xmx2G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.9
loader_version=0.14.21
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.1
loader_version=0.15.6
# Mod Properties
mod_version=0.2.0
mod_version=0.2.1
maven_group=supercoder79
archives_base_name=wavedefense
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.85.0+1.20.1
fabric_version=0.91.1+1.20.4
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void setAttributes() {
}

@Override
public void attack(LivingEntity target, float pullProgress) {
public void shootAt(LivingEntity target, float pullProgress) {
ItemStack itemStack = this.getProjectileType(this.getStackInHand(ProjectileUtil.getHandPossiblyHolding(this, Items.BOW)));
PersistentProjectileEntity arrowProjectile = this.createArrowProjectile(itemStack, pullProgress);
arrowProjectile.setDamage(arrowProjectile.getDamage() * this.getMonsterClass().damageScale());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void setAttributes() {
}

@Override
public void attack(LivingEntity target, float pullProgress) {
public void shootAt(LivingEntity target, float pullProgress) {
ItemStack itemStack = this.getProjectileType(this.getStackInHand(ProjectileUtil.getHandPossiblyHolding(this, Items.BOW)));
PersistentProjectileEntity arrowProjectile = this.createArrowProjectile(itemStack, pullProgress);
arrowProjectile.setDamage(arrowProjectile.getDamage() * this.getMonsterClass().damageScale());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void setAttributes() {
}

@Override
public void attack(LivingEntity target, float pullProgress) {
public void shootAt(LivingEntity target, float pullProgress) {
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/supercoder79/wavedefense/game/WdActive.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private void tick() {
if (this.world.getBlockState(local).isOf(Blocks.CHEST)) {
if (!this.openedChests.contains(local)) {
this.participants.forEach((participant) -> {
participant.sendMessage(Text.literal(player.getEntityName() + " has found a loot chest!"), false);
participant.sendMessage(Text.literal(player.getNameForScoreboard() + " has found a loot chest!"), false);

if (new Random().nextInt(4) == 0) {
participant.sendMessage(Text.literal("You recieved 6 iron and 1 gold!"), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ private void tickActive(long time, WdWave wave) {
PlayerSet players = game.space.getPlayers();
players.sendMessage(Text.literal("The wave has ended!")
.styled(style ->
style.withColor(TextColor.parse("green"))
style.withColor(TextColor.parse("green").result().get())
));
int survivalBonus = 3 + wave.ordinal;
int survivalGold = wave.ordinal % 5 == 0 ? MathHelper.ceil(wave.ordinal / 20d) : 0;

if (survivalGold == 0)
players.sendMessage(Text.literal("You earned " + survivalBonus + " iron for surviving this wave!")
.styled(style ->
style.withColor(TextColor.parse("yellow"))
style.withColor(TextColor.parse("yellow").result().get())
));
else
players.sendMessage(Text.literal("You earned " + survivalBonus + " iron and " + survivalGold + " gold for surviving this wave!")
.styled(style ->
style.withColor(TextColor.parse("yellow"))
style.withColor(TextColor.parse("yellow").result().get())
));

for (PlayerEntity player : game.getParticipants()) {
Expand Down Expand Up @@ -84,7 +84,7 @@ private void openWave(WdWave wave) {
PlayerSet players = game.space.getPlayers();
players.sendMessage(Text.literal("Wave #" + wave.ordinal + " with " + wave.monsterCount + " monsters is coming!")
.styled(style ->
style.withColor(TextColor.parse("light_purple"))
style.withColor(TextColor.parse("light_purple").result().get())
));

game.averageGroupSize = (game.averageGroupSize + game.getParticipants().size()) / 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ else if (currentProgress - progress < 1d / length)
color = "gray";

String finalColor = color;
bar.append(Text.literal("█").styled(style -> style.withColor(TextColor.parse(finalColor))));
bar.append(Text.literal("█").styled(style -> style.withColor(TextColor.parse(finalColor).result().get())));
}

return bar;
Expand Down

0 comments on commit 1978f1f

Please sign in to comment.