Skip to content

Commit

Permalink
port work
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai committed Nov 25, 2024
1 parent a00c9c6 commit 196b382
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "fabric-loom" version "1.6.+"
id "fabric-loom" version "1.7.+"
id "com.github.johnrengelman.shadow" version "7.1.+"
id "me.modmuss50.mod-publish-plugin" version "0.5.2"
}
Expand Down
24 changes: 12 additions & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# increase gradle memory
org.gradle.jvmargs=-Xmx1G
org.gradle.jvmargs = -Xmx1G

# minecraft, mappings and loader dependencies
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.21.1
quilt_mappings=2
loader_version=0.15.11
kaleido_config_version=0.3.1+1.3.2
minecraft_version = 1.21.3
quilt_mappings = 6
loader_version = 0.16.7
kaleido_config_version = 0.3.1+1.3.2

# mod properties
mod_version=1.3.5+mc1.21.1
maven_group=rainglow
archives_base_name=rainglow
mod_version = 1.3.5+mc1.21.3
maven_group = rainglow
archives_base_name = rainglow

# other dependencies
java_version=21
mod_menu_version=11.0.1
fabric_api_version=0.102.0+1.21.1
java_version = 21
mod_menu_version = 12.0.0-beta.1
fabric_api_version = 0.107.0+1.21.3

pub.should_publish = true
pub.additional_versions = 1.21
pub.additional_versions = 1.21.2
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected void repositionElements() {

private static void sendNoColoursToast() {
Toast toast = new SystemToast(SystemToast.Id.PACK_LOAD_FAILURE, Rainglow.translatableText("config.no_custom_colours"), Rainglow.translatableText("config.no_custom_colours_description"));
MinecraftClient.getInstance().getToastManager().add(toast);
MinecraftClient.getInstance().method_1566().method_1999(toast);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/ix0rai/rainglow/mixin/DyeItemMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private void useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity
}

Rainglow.setColour(entity, colour);
cir.setReturnValue(ActionResult.success(user.getWorld().isClient()));
cir.setReturnValue(ActionResult.SUCCESS);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import io.ix0rai.rainglow.data.RainglowEntity;
import io.ix0rai.rainglow.data.GlowSquidVariantProvider;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.mob.WaterCreatureEntity;
import net.minecraft.entity.passive.WaterCreatureEntity;
import net.minecraft.entity.passive.GlowSquidEntity;
import net.minecraft.entity.passive.SquidEntity;
import net.minecraft.nbt.NbtCompound;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.ix0rai.rainglow.data.RainglowEntity;
import net.minecraft.client.render.entity.SlimeEntityRenderer;
import net.minecraft.entity.mob.SlimeEntity;
import net.minecraft.unmapped.C_oeatwgky;
import net.minecraft.util.Identifier;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -11,8 +12,8 @@

@Mixin(SlimeEntityRenderer.class)
public class SlimeEntityRendererMixin {
@Inject(method = "getTexture*", at = @At("HEAD"), cancellable = true)
public void getTexture(SlimeEntity entity, CallbackInfoReturnable<Identifier> cir) {
@Inject(method = "m_vhdjjpxx", at = @At("HEAD"), cancellable = true)
public void getTexture(C_oeatwgky c_oeatwgky, CallbackInfoReturnable<Identifier> cir) {
RainglowEntity.SLIME.overrideTexture(entity, cir);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.SpriteProvider;
import net.minecraft.client.particle.SquidInkParticle;
import net.minecraft.client.util.ColorUtil;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.particle.DefaultParticleType;
import net.minecraft.util.ArgbHelper;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
Expand Down Expand Up @@ -50,7 +50,7 @@ public void createParticle(DefaultParticleType defaultParticleType, ClientWorld
rgb = RainglowColour.WHITE.getInkRgb();
}

cir.setReturnValue(new SquidInkParticle(clientWorld, d, e, f, g, h, i, ColorUtil.Argb32.of(255, (int) rgb.r(), (int) rgb.g(), (int) rgb.b()), this.spriteProvider));
cir.setReturnValue(new SquidInkParticle(clientWorld, d, e, f, g, h, i, ArgbHelper.color(255, (int) rgb.r(), (int) rgb.g(), (int) rgb.b()), this.spriteProvider));
}
}
}
6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
},

"depends": {
"fabricloader": ">=0.15.11",
"fabricloader": ">=0.16.7",
"fabric-resource-loader-v0": "*",
"fabric-networking-api-v1": "*",
"minecraft": ">=1.21"
"minecraft": ">=1.21.2"
},

"suggests": {
"modmenu": ">=11.0.0-"
"modmenu": ">=12.0.0-"
},

"custom": {
Expand Down

0 comments on commit 196b382

Please sign in to comment.