Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Added JEI integration - closes #6
Browse files Browse the repository at this point in the history
Removed NEI integration, will re-add once available.
Moved the achievement to a less crowded hole.
  • Loading branch information
renevo committed Feb 15, 2016
1 parent dcaac6f commit f2aeb60
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 39 deletions.
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ minecraft {
mappings = config.mappings
runDir = "run"
replace '${version}', project.version
useDepAts = true
}

compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

dependencies {
deobfCompile "mezz.jei:jei_" + config.minecraft_version + ":" + config.jei_version
}

processResources
Expand Down
4 changes: 3 additions & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
mod_version=1.5.0
minecraft_version=1.8.9
forge_version=11.15.1.1722
mappings=snapshot_20151212
mappings=snapshot_20151212

jei_version=2.26.0.154
6 changes: 0 additions & 6 deletions src/main/java/com/renevo/pcb/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@

public class ClientProxy extends CommonProxy {

@Override
public void postInitialization() {
// NeiIntegration.registerCraftingContainers(GuiPortableCraftBench.class); // TODO: re-enable once NEI is available again

}

@Override
public void initialization() {
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ItemPortableCraftBench.portableCraftBench, 0, new ModelResourceLocation(PortableCraftBenchMod.MODID + ":" + "portableCraftBench", "inventory"));
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/renevo/pcb/PortableCraftBenchMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class PortableCraftBenchMod {

public static final String MODID = "pcb";
public static final String VERSION = "1.5";
public static final String VERSION = "1.5.0";

public static Achievement achievementPcb = null;

Expand All @@ -34,7 +34,7 @@ public void init(FMLInitializationEvent event) {
MinecraftForge.EVENT_BUS.register(this);

// 6 left, 0 up/down - since we are just adding a new achievement, we don't need an achievement page, this somehow just works...
achievementPcb = new Achievement("achievement.pcb", "pcb", 6, 0, ItemPortableCraftBench.portableCraftBench, net.minecraft.stats.AchievementList.buildWorkBench);
achievementPcb = new Achievement("achievement.pcb", "pcb", 5, -4, ItemPortableCraftBench.portableCraftBench, net.minecraft.stats.AchievementList.buildWorkBench);
achievementPcb.registerStat();

proxy.initialization();
Expand Down
30 changes: 0 additions & 30 deletions src/main/java/com/renevo/pcb/integration/NeiIntegration.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.renevo.pcb.integration;

import com.renevo.pcb.ContainerPortableCraftBench;
import com.renevo.pcb.GuiPortableCraftBench;

import mezz.jei.api.*;
import mezz.jei.api.recipe.VanillaRecipeCategoryUid;
import mezz.jei.api.recipe.transfer.IRecipeTransferRegistry;

@JEIPlugin
public class PortableCraftBenchPlugin implements IModPlugin {


@Override
public void onJeiHelpersAvailable(IJeiHelpers jeiHelpers) { }

@Override
public void onItemRegistryAvailable(IItemRegistry itemRegistry) { }

@Override
@Deprecated
public void onRecipeRegistryAvailable(IRecipeRegistry recipeRegistry) { }

@Override
public void onRuntimeAvailable(IJeiRuntime jeiRuntime) { }

@Override
public void register(IModRegistry registry) {
registry.addRecipeClickArea(GuiPortableCraftBench.class, 88, 32, 28, 23, VanillaRecipeCategoryUid.CRAFTING);

IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();
recipeTransferRegistry.addRecipeTransferHandler(ContainerPortableCraftBench.class, VanillaRecipeCategoryUid.CRAFTING, 1, 9, 10, 36);
}
}

0 comments on commit f2aeb60

Please sign in to comment.