Search in sources :

Example 1 with ShaderRegistryEntry

use of blusunrize.immersiveengineering.api.shader.ShaderRegistry.ShaderRegistryEntry in project ImmersiveEngineering by BluSunrize.

the class BotaniaHelper method init.

@Override
public void init() {
    BlueprintCraftingRecipe.addRecipe("specialBullet", BulletHandler.getBulletStack("terrasteel"), new ItemStack(IEContent.itemBullet, 1, 0), Items.GUNPOWDER, "nuggetTerrasteel", "nuggetTerrasteel");
    try {
        Class c_BotaniaAPI = Class.forName("vazkii.botania.api.BotaniaAPI");
        Method m_blacklistBlockFromMagnet = c_BotaniaAPI.getDeclaredMethod("blacklistBlockFromMagnet", Block.class, int.class);
        m_blacklistBlockFromMagnet.invoke(null, IEContent.blockConveyor, 0);
    } catch (Exception e) {
        IELogger.error("[Botania] Failed to protect IE conveyors against Botania's magnets");
        e.printStackTrace();
    }
    rariryRelic = EnumRarity.valueOf("RELIC");
    if (rariryRelic != null) {
        ShaderRegistry.rarityWeightMap.put(rariryRelic, 2);
        makeShaderRelic("The Kindled");
        makeShaderRelic("Dark Fire");
        ShaderRegistryEntry entry = ItemShader.addShader("Terra", 1, rariryRelic, 0xff3e2d14, 0xff2b1108, 0xff41bd1a, 0xff2e120a).setInfo(null, "Botania", "terra");
        entry.getCase("immersiveengineering:revolver").addLayers(new ShaderLayer(new ResourceLocation("botania:blocks/livingwood5"), 0xffffffff).setTextureBounds(17 / 128d, 24 / 128d, 33 / 128d, 40 / 128d));
        entry.getCase("immersiveengineering:drill").addLayers(new ShaderLayer(new ResourceLocation("botania:blocks/alfheimPortalInside"), 0xffffffff).setTextureBounds(14 / 64d, 10 / 64d, 26 / 64d, 22 / 64d));
        entry.getCase("immersiveengineering:railgun").addLayers(new ShaderLayer(new ResourceLocation("botania:blocks/storage1"), 0xff9e83eb).setTextureBounds(55 / 64d, 42 / 64d, 1, 58 / 64d).setCutoutBounds(.1875, 0, .75, 1));
    }
    if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
        MinecraftForge.EVENT_BUS.register(this);
}
Also used : ShaderRegistryEntry(blusunrize.immersiveengineering.api.shader.ShaderRegistry.ShaderRegistryEntry) ShaderLayer(blusunrize.immersiveengineering.api.shader.ShaderCase.ShaderLayer) ResourceLocation(net.minecraft.util.ResourceLocation) Method(java.lang.reflect.Method) ItemStack(net.minecraft.item.ItemStack)

Example 2 with ShaderRegistryEntry

use of blusunrize.immersiveengineering.api.shader.ShaderRegistry.ShaderRegistryEntry in project ImmersiveEngineering by BluSunrize.

the class BotaniaHelper method makeShaderRelic.

void makeShaderRelic(String shader) {
    ShaderRegistryEntry entry = ShaderRegistry.shaderRegistry.get(shader);
    entry.rarity = rariryRelic;
    entry.setReplicationCost(ShaderRegistry.defaultReplicationCost.copyWithMultipliedSize(10 - 2));
}
Also used : ShaderRegistryEntry(blusunrize.immersiveengineering.api.shader.ShaderRegistry.ShaderRegistryEntry)

Aggregations

ShaderRegistryEntry (blusunrize.immersiveengineering.api.shader.ShaderRegistry.ShaderRegistryEntry)2 ShaderLayer (blusunrize.immersiveengineering.api.shader.ShaderCase.ShaderLayer)1 Method (java.lang.reflect.Method)1 ItemStack (net.minecraft.item.ItemStack)1 ResourceLocation (net.minecraft.util.ResourceLocation)1