Skip to content

Commit

Permalink
add support for CosmeticArmorReworked (resolves #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
benblank committed Feb 21, 2016
1 parent 72cf779 commit 81fdb1e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ targetCompatibility = 1.8

dependencies {
compile files("../Baubles-1.8.9-1.1.3.0-deobf.jar")
compile files("../CosmeticArmorReworked-1.8.9-v1b-deobf.jar")
}

minecraft {
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/five35/minecraft/ice/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public void preInit(final FMLPreInitializationEvent event) {
this.inventoryManagerRegistry.register(new BaublesInventoryManager());
}

if (Loader.isModLoaded("cosmeticarmorreworked")) {
this.logger.info("Integrating with CosmeticArmorReworked.");
this.inventoryManagerRegistry.register(new CosmeticArmorReworkedInventoryManager());
}

this.logger.debug("Registering block.");
GameRegistry.registerBlock(CommonProxy.BLOCK, "deathmarker");
GameRegistry.registerTileEntity(DeathMarkerTileEntity.class, "deathmarker");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.five35.minecraft.ice;

import lain.mods.cos.PlayerUtils;
import lain.mods.cos.CosmeticArmorReworked;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import com.five35.minecraft.ice.api.GeneralInventoryManager;

final class CosmeticArmorReworkedInventoryManager extends GeneralInventoryManager {
@Override
protected IInventory getInventory(EntityPlayer player) {
return CosmeticArmorReworked.invMan.getCosArmorInventory(PlayerUtils.getPlayerID(player));
}

@Override
public String getName() {
return "CosmeticArmorReworked";
}

}
2 changes: 1 addition & 1 deletion src/main/java/com/five35/minecraft/ice/Ice.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

@Mod(modid = "Ice", dependencies = "after:Baubles", updateJSON = "https://raw.githubusercontent.com/benblank/Ice/master/update.json")
@Mod(modid = "Ice", dependencies = "after:Baubles;after:cosmeticarmorreworked", updateJSON = "https://raw.githubusercontent.com/benblank/Ice/master/update.json")
public class Ice {
@Instance
private static Ice instance;
Expand Down

0 comments on commit 81fdb1e

Please sign in to comment.