skyboy / MineFactoryReloaded

104 stars 75 forks source link

Laser Drill entries for ReactorCraft Fluorite Ore #560

Closed amesgen closed 8 years ago

amesgen commented 8 years ago

The ores of Reika's ReactorCraft have reasonable and IMO appropriate weights and color codes (laser foci) in the MFR Laser Drill except Fluorite Ore, which is messed up (Blue Fluorite has a white code, the other ones arent even registered). Blue Fluorite has a weight of 20, which results in my modpack in a chance of 0.76%. It would be nice if the other Fluorite Ores could also have a MFR Laser Drill entry by default. Currentely I use the following MineTweaker/ModTweaker code to accomplish that result:

mods.mfr.MiningLaser.removePreferredOre(8, <ReactorCraft:reactorcraft_block_fluoriteore>);
mods.mfr.MiningLaser.addPreferredOre(11, <ReactorCraft:reactorcraft_block_fluoriteore>);
mods.mfr.MiningLaser.addOre(<ReactorCraft:reactorcraft_block_fluoriteore:1>.weight(20));
mods.mfr.MiningLaser.addPreferredOre(6, <ReactorCraft:reactorcraft_block_fluoriteore:1>);
mods.mfr.MiningLaser.addOre(<ReactorCraft:reactorcraft_block_fluoriteore:2>.weight(20));
mods.mfr.MiningLaser.addPreferredOre(1, <ReactorCraft:reactorcraft_block_fluoriteore:2>);
mods.mfr.MiningLaser.addOre(<ReactorCraft:reactorcraft_block_fluoriteore:3>.weight(20));
mods.mfr.MiningLaser.addPreferredOre(2, <ReactorCraft:reactorcraft_block_fluoriteore:3>);
mods.mfr.MiningLaser.addOre(<ReactorCraft:reactorcraft_block_fluoriteore:4>.weight(20));
mods.mfr.MiningLaser.addPreferredOre(13, <ReactorCraft:reactorcraft_block_fluoriteore:4>);
mods.mfr.MiningLaser.addOre(<ReactorCraft:reactorcraft_block_fluoriteore:5>.weight(20));
mods.mfr.MiningLaser.addPreferredOre(14, <ReactorCraft:reactorcraft_block_fluoriteore:5>);
mods.mfr.MiningLaser.addOre(<ReactorCraft:reactorcraft_block_fluoriteore:6>.weight(20));
mods.mfr.MiningLaser.addPreferredOre(0, <ReactorCraft:reactorcraft_block_fluoriteore:6>);
mods.mfr.MiningLaser.addOre(<ReactorCraft:reactorcraft_block_fluoriteore:7>.weight(20));
mods.mfr.MiningLaser.addPreferredOre(4, <ReactorCraft:reactorcraft_block_fluoriteore:7>);

An appropriate handling in https://github.com/skyboy/MineFactoryReloaded/blob/master/src/powercrystals/minefactoryreloaded/modhelpers/vanilla/Vanilla.java could be necessary.

This has also been reported to ReactorCraft.

skyboy commented 8 years ago

MFR's auto-recognition is just pulling whatever it finds first in the oredict, if these ores are not all the same then I should remove that entry.

amesgen commented 8 years ago

well, then it is reikas job to register his Fluorite Ores if he wants to do this (is it possible with IMC?)

skyboy commented 8 years ago

Yes.

     * addLaserPreferredOre             | NBTTag with an ItemStack saved on it, with the color on the "value" attribute,
ReikaKalseki commented 8 years ago

Is the color a string (and if so, in what format)? An int (and if so, dye meta, wool meta, RGB...)? Something else?

skyboy commented 8 years ago

It's an int and I need to go through my API's documentation and clarify data types.

I believe the values are the same as wool, but here's the listing:

black = 15;
red = 14;
green = 13;
brown = 12;
blue = 11;
purple = 10;
cyan = 9;
silver = 8;
gray = 7;
pink = 6;
lime = 5;
yellow = 4;
lightBlue = 3;
magenta = 2;
orange = 1;
white = 0;
ReikaKalseki commented 8 years ago

Done. You can close this.

    for (int i = 0; i < FluoriteTypes.colorList.length; i++) {
        FluoriteTypes f = FluoriteTypes.colorList[i];
        NBTTagCompound tag = new NBTTagCompound();
        tag.setInteger("value", f.getCorrespondingDyeType().getWoolMeta());
        f.getItem().writeToNBT(tag);
        FMLInterModComms.sendMessage(ModList.MINEFACTORY.modLabel, "addLaserPreferredOre", tag);
    }
amesgen commented 8 years ago

Thanks a lot.