mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 07:17:58 +01:00
Update dependencies, add JEI
This commit is contained in:
parent
4202723731
commit
3673e75363
6 changed files with 21 additions and 10 deletions
15
build.gradle
15
build.gradle
|
@ -43,6 +43,7 @@ repositories {
|
|||
maven { name 'minelp-snapshot'; url 'https://repo.minelittlepony-mod.com/maven/snapshot' }
|
||||
maven { name 'minelp-releases'; url 'https://repo.minelittlepony-mod.com/maven/release' }
|
||||
maven { name 'TerraformersMC'; url 'https://maven.terraformersmc.com/' }
|
||||
maven { name 'JEI'; url 'https://maven.blamejared.com/' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -62,8 +63,8 @@ dependencies {
|
|||
modApi "com.sollace:fabwork:${project.fabwork_version}"
|
||||
include "com.sollace:fabwork:${project.fabwork_version}"
|
||||
|
||||
compileOnly files('lib/Romanizer-1.0.0.jar')
|
||||
include files('lib/Romanizer-1.0.0.jar')
|
||||
compileOnly files('lib/Romanizer-1.0.1.jar')
|
||||
include files('lib/Romanizer-1.0.1.jar')
|
||||
|
||||
modCompileOnly "com.terraformersmc:modmenu:${project.modmenu_version}"
|
||||
modCompileOnly "dev.emi:trinkets:${project.trinkets_version}"
|
||||
|
@ -71,8 +72,14 @@ dependencies {
|
|||
modImplementation "com.terraformersmc.terraform-api:terraform-wood-api-v1:${project.terraformer_api_version}"
|
||||
include "com.terraformersmc.terraform-api:terraform-wood-api-v1:${project.terraformer_api_version}"
|
||||
|
||||
//modCompileOnly "dev.emi:emi:${project.emi_version}:api"
|
||||
modCompileOnly "dev.emi:emi:${project.emi_version}"
|
||||
if (project.tmi_type == 'jei') {
|
||||
modCompileOnly "dev.emi:emi-fabric:${project.emi_version}"
|
||||
modRuntimeOnly "mezz.jei:jei-${project.minecraft_version}-fabric:${project.jei_version}"
|
||||
} else {
|
||||
modCompileOnly "dev.emi:emi-fabric:${project.emi_version}"
|
||||
modCompileOnly "mezz.jei:jei-${project.minecraft_version}-common-api:${project.jei_version}"
|
||||
modCompileOnly "mezz.jei:jei-${project.minecraft_version}-fabric-api:${project.jei_version}"
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
|
|
@ -26,5 +26,9 @@ org.gradle.daemon=false
|
|||
kirin_version=1.13.2
|
||||
reach_attributes_version=2.3.1
|
||||
trinkets_version=3.5.0
|
||||
emi_version=0.7.3+1.19.3
|
||||
terraformer_api_version=5.0.0
|
||||
|
||||
# TMI Testing
|
||||
tmi_type=jei
|
||||
emi_version=1.0.0+1.19.3
|
||||
jei_version=12.4.0.22
|
Binary file not shown.
|
@ -34,6 +34,7 @@ import net.minecraft.client.item.ModelPredicateProviderRegistry;
|
|||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.particle.SpriteProvider;
|
||||
import net.minecraft.client.render.*;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRendererFactories;
|
||||
import net.minecraft.client.render.entity.FlyingItemEntityRenderer;
|
||||
import net.minecraft.client.render.item.ItemRenderer;
|
||||
import net.minecraft.client.render.model.json.ModelTransformation;
|
||||
|
@ -77,7 +78,7 @@ public interface URenderers {
|
|||
EntityRendererRegistry.register(UEntities.SPELLBOOK, SpellbookEntityRenderer::new);
|
||||
EntityRendererRegistry.register(UEntities.AIR_BALLOON, AirBalloonEntityRenderer::new);
|
||||
|
||||
BlockEntityRendererRegistry.register(UBlockEntities.WEATHER_VANE, WeatherVaneBlockEntityRenderer::new);
|
||||
BlockEntityRendererFactories.register(UBlockEntities.WEATHER_VANE, WeatherVaneBlockEntityRenderer::new);
|
||||
|
||||
ColorProviderRegistry.ITEM.register((stack, i) -> i > 0 ? -1 : ((DyeableItem)stack.getItem()).getColor(stack), UItems.FRIENDSHIP_BRACELET);
|
||||
BuiltinItemRendererRegistry.INSTANCE.register(UItems.FILLED_JAR, (stack, mode, matrices, vertexConsumers, light, overlay) -> {
|
||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.util.Identifier;
|
|||
public class Main implements EmiPlugin {
|
||||
static final EmiStack SPELL_BOOK_STATION = EmiStack.of(UItems.SPELLBOOK);
|
||||
static final EmiRecipeCategory SPELL_BOOK_CATEGORY = new EmiRecipeCategory(Unicopia.id("spellbook"), SPELL_BOOK_STATION, SPELL_BOOK_STATION);
|
||||
static final Comparison COMPARING_BOTH = Comparison.builder().nbt(true).build();
|
||||
|
||||
static final Identifier WIDGETS = Unicopia.id("textures/gui/widgets.png");
|
||||
static final EmiTexture EMPTY_ARROW = new EmiTexture(WIDGETS, 44, 0, 24, 17);
|
||||
|
@ -52,7 +51,7 @@ public class Main implements EmiPlugin {
|
|||
input(trait);
|
||||
this.getOutputs().addAll(
|
||||
Arrays.stream(enhancingRecipe.getBaseMaterial().getMatchingStacks())
|
||||
.map(stack -> EmiStack.of(SpellTraits.of(stack).add(new SpellTraits.Builder().with(trait, 1).build()).applyTo(stack)).comparison(c -> Comparison.builder().nbt(false).build()))
|
||||
.map(stack -> EmiStack.of(SpellTraits.of(stack).add(new SpellTraits.Builder().with(trait, 1).build()).applyTo(stack)).comparison(c -> Comparison.DEFAULT_COMPARISON))
|
||||
.toList()
|
||||
);
|
||||
}
|
||||
|
@ -70,7 +69,7 @@ public class Main implements EmiPlugin {
|
|||
});
|
||||
|
||||
Stream.of(UItems.GEMSTONE, UItems.BOTCHED_GEM, UItems.MAGIC_STAFF, UItems.FILLED_JAR).forEach(item -> {
|
||||
registry.setDefaultComparison(item, comparison -> COMPARING_BOTH);
|
||||
registry.setDefaultComparison(item, comparison -> Comparison.compareNbt());
|
||||
});
|
||||
|
||||
registry.getRecipeManager().listAllOfType(RecipeType.CRAFTING).stream()
|
||||
|
|
|
@ -86,7 +86,7 @@ class SpellbookEmiRecipe implements EmiRecipe, SpellbookRecipe.CraftingTreeBuild
|
|||
}
|
||||
}
|
||||
widgets.addSlot(inputs.get(0), gem.get(0).left(), gem.get(0).top()).drawBack(false);
|
||||
widgets.addSlot(getOutput(), 190, 60).output(true).recipeContext(this);
|
||||
widgets.addSlot(getOutput(), 190, 60).large(true).recipeContext(this);
|
||||
}
|
||||
|
||||
protected EmiIngredient getOutput() {
|
||||
|
|
Loading…
Reference in a new issue