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

Soul Fire'd API integration (1.19.2) #443

Open
wants to merge 7 commits into
base: 1.19
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ mixin {

repositories {
maven { url = 'https://repo.spongepowered.org/maven/' }
maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}

jcenter()
mavenCentral()
Expand All @@ -94,6 +100,9 @@ repositories {
dependencies {
minecraft "net.minecraftforge:forge:${config.MINECRAFT_VERSION}-${config.FORGE_VERSION}"
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'

// Soul Fire'd dependency
implementation fg.deobf("curse.maven:soulfired-662413:4875142")
}

jar {
Expand Down
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION=2.5.1
MINECRAFT_VERSION=1.19.2
FORGE_VERSION=43.1.1
FORGE_VERSION=43.2.0
MAPPINGS_CHANNEL=official
MAPPINGS_VERSION=1.19.2
# Do not edit anything below this line, it contains base information for the project.
Expand Down

This file was deleted.

107 changes: 0 additions & 107 deletions src/main/java/org/infernalstudios/infernalexp/api/FireType.java

This file was deleted.

This file was deleted.

40 changes: 27 additions & 13 deletions src/main/java/org/infernalstudios/infernalexp/init/IEFireTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,35 @@

package org.infernalstudios.infernalexp.init;

import net.minecraft.resources.ResourceLocation;
import org.infernalstudios.infernalexp.InfernalExpansion;
import org.infernalstudios.infernalexp.api.FireType;

public class IEFireTypes {

public static final FireType FIRE = FireType.register(new ResourceLocation("fire"));
public static final FireType SOUL_FIRE = FireType.register(new ResourceLocation("soul_fire"));
public static final FireType GLOW_FIRE = FireType.register(new ResourceLocation(InfernalExpansion.MOD_ID, "glow_fire"));
public static final FireType ENDER_FIRE = FireType.register(new ResourceLocation("endergetic", "ender_fire"));
public static final FireType BORIC_FIRE = FireType.register(new ResourceLocation("byg", "boric_fire"));
public static final FireType CRYPTIC_FIRE = FireType.register(new ResourceLocation("byg", "cryptic_fire"));

public static void register() {}
import crystalspider.soulfired.api.FireBuilder;
import crystalspider.soulfired.api.FireManager;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.fml.ModList;

;
public class IEFireTypes {
public static final ResourceLocation GLOW_FIRE_TYPE = new ResourceLocation(InfernalExpansion.MOD_ID, "glow");
public static final ResourceLocation ENDER_FIRE_TYPE = new ResourceLocation("endergetic", "ender");

public static void register() {
FireBuilder fireBuilder = FireManager.fireBuilder(GLOW_FIRE_TYPE);
FireManager.registerFire(
fireBuilder
.setDamage(2)
.removeFireAspect()
.removeFlame()
.build()
);
if (ModList.get().isLoaded(ENDER_FIRE_TYPE.getNamespace())) {
FireManager.registerFire(
fireBuilder
.reset(ENDER_FIRE_TYPE)
.setDamage(3)
.removeFireAspect()
.removeFlame()
.build()
);
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,33 @@

package org.infernalstudios.infernalexp.mixin.client;

import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.client.resources.model.Material;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.ModList;
import org.infernalstudios.infernalexp.api.FireType;
import org.infernalstudios.infernalexp.init.IEFireTypes;
import java.util.Set;

import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;

import java.util.Set;
import crystalspider.soulfired.api.FireManager;
import crystalspider.soulfired.api.client.FireClientManager;
import net.minecraft.client.resources.model.Material;
import net.minecraft.client.resources.model.ModelBakery;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.ModList;

@OnlyIn(Dist.CLIENT)
@Mixin(ModelBakery.class)
public class MixinModelBakery {

@Shadow
@Final
protected static Set<Material> UNREFERENCED_TEXTURES;

static {
FireType.getFireTypes().forEach(fireType -> {
if (fireType != IEFireTypes.FIRE) {
if (ModList.get().isLoaded(fireType.getName().getNamespace())) {
UNREFERENCED_TEXTURES.add(fireType.getSprite0());
UNREFERENCED_TEXTURES.add(fireType.getSprite1());
}
FireManager.getFireTypes().forEach(fireType -> {
if (ModList.get().isLoaded(fireType.getNamespace())) {
UNREFERENCED_TEXTURES.add(FireClientManager.getMaterial0(fireType));
UNREFERENCED_TEXTURES.add(FireClientManager.getMaterial0(fireType));
}
});
}

}

This file was deleted.

Loading