mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
Colorable Drills~
This commit is contained in:
parent
f62b1ede79
commit
b57c8f03b9
6 changed files with 37 additions and 52 deletions
|
@ -131,7 +131,7 @@ public class InitBooklet{
|
|||
new BookletChapter("potionRings", entryItemsNonRF, new ItemStack(InitItems.itemPotionRing), potionRingPages.toArray(new BookletPage[potionRingPages.size()]));
|
||||
|
||||
//RF Using Items
|
||||
new BookletChapter("drill", entryItemsRF, new ItemStack(InitItems.itemDrill), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeDrill, ItemCrafting.recipeDrillEmerald, ItemCrafting.recipeDrillPurple).setPageStacksWildcard(), new PageCrafting(3, ItemCrafting.recipeDrillCore).setNoText(), new PageCrafting(4, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(12, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial();
|
||||
new BookletChapter("drill", entryItemsRF, new ItemStack(InitItems.itemDrill), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeDrill).setNoText(), new PageCrafting(3, ItemCrafting.recipesDrillColoring).setPageStacksWildcard(), new PageCrafting(4, ItemCrafting.recipeDrillCore).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(12, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(13, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial();
|
||||
new BookletChapter("staff", entryItemsRF, new ItemStack(InitItems.itemTeleStaff), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeStaff).setNoText()).setImportant();
|
||||
new BookletChapter("magnetRing", entryItemsRF, new ItemStack(InitItems.itemMagnetRing), new PageCrafting(1, ItemCrafting.recipeMagnetRing));
|
||||
new BookletChapter("growthRing", entryItemsRF, new ItemStack(InitItems.itemGrowthRing), new PageCrafting(1, ItemCrafting.recipeGrowthRing));
|
||||
|
|
|
@ -12,6 +12,7 @@ package ellpeck.actuallyadditions.crafting;
|
|||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import ellpeck.actuallyadditions.blocks.InitBlocks;
|
||||
import ellpeck.actuallyadditions.blocks.metalists.TheColoredLampColors;
|
||||
import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks;
|
||||
import ellpeck.actuallyadditions.config.ConfigValues;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigCrafting;
|
||||
|
@ -42,8 +43,7 @@ public class ItemCrafting{
|
|||
public static IRecipe recipeTinyChar;
|
||||
public static ArrayList<IRecipe> recipesMashedFood = new ArrayList<IRecipe>();
|
||||
public static IRecipe recipeDrill;
|
||||
public static IRecipe recipeDrillEmerald;
|
||||
public static IRecipe recipeDrillPurple;
|
||||
public static IRecipe[] recipesDrillColoring = new IRecipe[16];
|
||||
public static IRecipe recipeDrillSpeedI;
|
||||
public static IRecipe recipeDrillSpeedII;
|
||||
public static IRecipe recipeDrillSpeedIII;
|
||||
|
@ -146,7 +146,8 @@ public class ItemCrafting{
|
|||
|
||||
//Drill
|
||||
if(ConfigCrafting.DRILL.isEnabled()){
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrill),
|
||||
ItemStack lightBlueDrill = new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal());
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(lightBlueDrill.copy(),
|
||||
"DDD", "CRC", "III",
|
||||
'D', "crystalLightBlue",
|
||||
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
|
||||
|
@ -154,22 +155,10 @@ public class ItemCrafting{
|
|||
'I', "blockCrystalWhite"));
|
||||
recipeDrill = Util.GetRecipes.lastIRecipe();
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrill, 1, 1),
|
||||
"DDD", "CRC", "III",
|
||||
'D', "crystalGreen",
|
||||
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
|
||||
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()),
|
||||
'I', "blockCrystalWhite"));
|
||||
recipeDrillEmerald = Util.GetRecipes.lastIRecipe();
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrill, 1, 2),
|
||||
"DFD", "CRC", "III",
|
||||
'F', "blockCrystalRed",
|
||||
'D', "crystalLightBlue",
|
||||
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
|
||||
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()),
|
||||
'I', "blockCrystalWhite"));
|
||||
recipeDrillPurple = Util.GetRecipes.lastIRecipe();
|
||||
for(int i = 0; i < recipesDrillColoring.length; i++){
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemDrill, 1, i), lightBlueDrill.copy(), "dye"+TheColoredLampColors.values()[i].name));
|
||||
recipesDrillColoring[i] = Util.GetRecipes.lastIRecipe();
|
||||
}
|
||||
}
|
||||
|
||||
//Drill Core
|
||||
|
|
|
@ -51,21 +51,20 @@ import java.util.Set;
|
|||
public class ItemDrill extends ItemEnergy{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon emeraldIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon purpleIcon;
|
||||
private IIcon[] allDemDamnIconsMaan;
|
||||
|
||||
private static final int ENERGY_USE = 100;
|
||||
|
||||
public ItemDrill(){
|
||||
super(500000, 5000);
|
||||
this.setMaxDamage(0);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1){
|
||||
return par1 == 0 ? this.itemIcon : (par1 == 2 ? this.purpleIcon : this.emeraldIcon);
|
||||
return par1 >= this.allDemDamnIconsMaan.length ? null : this.allDemDamnIconsMaan[par1];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -77,10 +76,9 @@ public class ItemDrill extends ItemEnergy{
|
|||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list){
|
||||
super.getSubItems(item, tabs, list);
|
||||
|
||||
this.addDrillStack(list, 1);
|
||||
this.addDrillStack(list, 2);
|
||||
for(int i = 0; i < this.allDemDamnIconsMaan.length; i++){
|
||||
this.addDrillStack(list, i);
|
||||
}
|
||||
}
|
||||
|
||||
private void addDrillStack(List list, int meta){
|
||||
|
@ -232,9 +230,10 @@ public class ItemDrill extends ItemEnergy{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconReg){
|
||||
this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
|
||||
this.emeraldIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Emerald");
|
||||
this.purpleIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Purple");
|
||||
this.allDemDamnIconsMaan = new IIcon[16];
|
||||
for(int i = 0; i < this.allDemDamnIconsMaan.length; i++){
|
||||
this.allDemDamnIconsMaan[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+(i+1));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,7 +12,6 @@ package ellpeck.actuallyadditions.recipe;
|
|||
|
||||
import ellpeck.actuallyadditions.blocks.metalists.TheColoredLampColors;
|
||||
import ellpeck.actuallyadditions.config.values.ConfigCrafting;
|
||||
import ellpeck.actuallyadditions.util.AssetUtil;
|
||||
import ellpeck.actuallyadditions.util.Util;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -178,7 +177,7 @@ public class ReconstructorRecipeHandler{
|
|||
|
||||
public float[] getColor(){
|
||||
if(this == COLOR){
|
||||
float[] colors = AssetUtil.RGB_WOOL_COLORS[Util.RANDOM.nextInt(AssetUtil.RGB_WOOL_COLORS.length)];
|
||||
float[] colors = possibleColorLensColors[Util.RANDOM.nextInt(possibleColorLensColors.length)];
|
||||
return new float[]{colors[0]/255F, colors[1]/255F, colors[2]/255F};
|
||||
}
|
||||
else if(this == DETONATION){
|
||||
|
@ -197,6 +196,22 @@ public class ReconstructorRecipeHandler{
|
|||
public int getDistance(){
|
||||
return this == DETONATION ? 30 : (this == JUST_DAMAGE ? 15 : 10);
|
||||
}
|
||||
|
||||
//Thanks to xdjackiexd for this, as I couldn't be bothered
|
||||
private static final float[][] possibleColorLensColors = {
|
||||
{158F, 43F, 39F}, //Red
|
||||
{234F, 126F, 53F}, //Orange
|
||||
{194F, 181F, 28F}, //Yellow
|
||||
{57F, 186F, 46F}, //Lime Green
|
||||
{54F, 75F, 24F}, //Green
|
||||
{99F, 135F, 210F}, //Light Blue
|
||||
{38F, 113F, 145F}, //Cyan
|
||||
{37F, 49F, 147F}, //Blue
|
||||
{126F, 52F, 191F}, //Purple
|
||||
{190F, 73F, 201F}, //Magenta
|
||||
{217F, 129F, 153F}, //Pink
|
||||
{86F, 51F, 28F}, //Brown
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -38,24 +38,6 @@ public class AssetUtil{
|
|||
public static int laserRelayRenderId;
|
||||
public static int bookletStandRenderId;
|
||||
|
||||
/**
|
||||
* Thanks to xdjackiexd for this, as I couldn't be bothered
|
||||
*/
|
||||
public static final float[][] RGB_WOOL_COLORS = {
|
||||
{158F, 43F, 39F}, //Red
|
||||
{234F, 126F, 53F}, //Orange
|
||||
{194F, 181F, 28F}, //Yellow
|
||||
{57F, 186F, 46F}, //Lime Green
|
||||
{54F, 75F, 24F}, //Green
|
||||
{99F, 135F, 210F}, //Light Blue
|
||||
{38F, 113F, 145F}, //Cyan
|
||||
{37F, 49F, 147F}, //Blue
|
||||
{126F, 52F, 191F}, //Purple
|
||||
{190F, 73F, 201F}, //Magenta
|
||||
{217F, 129F, 153F}, //Pink
|
||||
{86F, 51F, 28F}, //Brown
|
||||
};
|
||||
|
||||
public static ResourceLocation getGuiLocation(String file){
|
||||
return new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/gui/"+file+".png");
|
||||
}
|
||||
|
|
|
@ -560,7 +560,7 @@ booklet.actuallyadditions.chapter.potionRings.text.1=The <item>Potion Rings<r> h
|
|||
|
||||
booklet.actuallyadditions.chapter.drill.name=Drills
|
||||
booklet.actuallyadditions.chapter.drill.text.1=The <item>Drill<r> works like a Pickaxe and a Shovel. It uses <imp>RF<r> per block. It can be <imp>charged in an Energizer<r> and upgraded by <imp>right-clicking<r> with it in your hand. There is <imp>a lot of upgrades<r>, but here is an explanation of some of them: <n>The <item>Mining Uprgades<r> enlarge the hole which the Drill digs. <n>The <item>Placement Upgrade<r>, after you right-click it in any slot of your hotbar, will make the Drill able to <imp>place a block from that slot by right-clicking<r>. You can also put a <item>Battery<r> inside the Drill to give it more charge.
|
||||
booklet.actuallyadditions.chapter.drill.text.2=The <item>Drill<r> can be crafted from either <imp>Diamond<r>, <imp>Emerald<r> or <imp>Redstone and Diamond<r>. Its color will change accordingly.
|
||||
booklet.actuallyadditions.chapter.drill.text.3=The <item>Drill<r> can also be <imp>dyed<r> in Minecraft's 16 colors. <n>It's only cosmetic and won't have any effect other than it looking different, however.
|
||||
|
||||
booklet.actuallyadditions.chapter.staff.name=Staff
|
||||
booklet.actuallyadditions.chapter.staff.text.1=The <item>Teleport Staff<r>, when charged in an Energizer, can be <imp>right-clicked<r> to <imp>teleport you to where you're looking<r>. When you are looking at a block, it will teleport you there, however, when you aren't looking at a block, you can only be looking upwards up to <imp>5 degrees<r>, otherwise the teleport will fail.
|
||||
|
|
Loading…
Reference in a new issue