mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
Lens of certain death
This commit is contained in:
parent
85ea472b1d
commit
37a08aeab7
9 changed files with 31 additions and 14 deletions
|
@ -62,7 +62,7 @@ public class InitBooklet{
|
|||
new BookletChapter("craftingIngs", entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeStoneCase).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(7, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(8, ItemCrafting.recipeRing).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(11, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(12, ItemCrafting.recipeDough).setNoText(), new PageCrafting(13, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(14, BlockCrafting.recipeIronCase).setNoText()).setImportant();
|
||||
|
||||
//Miscellaneous
|
||||
new BookletChapter("reconstructorLenses", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLens).setNoText(), new PageReconstructor(3, ReconstructorRecipeHandler.recipeColorLens), new PageReconstructor(4, ReconstructorRecipeHandler.colorConversionRecipes).setNoText(), new PageReconstructor(5, ReconstructorRecipeHandler.recipeExplosionLens)).setImportant();
|
||||
new BookletChapter("reconstructorLenses", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLens).setNoText(), new PageReconstructor(3, ReconstructorRecipeHandler.recipeColorLens), new PageReconstructor(4, ReconstructorRecipeHandler.colorConversionRecipes).setNoText(), new PageReconstructor(5, ReconstructorRecipeHandler.recipeExplosionLens), new PageReconstructor(6, ReconstructorRecipeHandler.recipeDamageLens)).setImportant();
|
||||
new BookletChapter("miscDecorStuffsAndThings", entryMisc, new ItemStack(InitBlocks.blockTestifiBucksGreenWall), new PageTextOnly(1), new PageReconstructor(2, ReconstructorRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, ReconstructorRecipeHandler.recipeGreenWall).setNoText());
|
||||
new BookletChapter("bookStand", entryMisc, new ItemStack(InitBlocks.blockBookletStand), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBookStand));
|
||||
new BookletChapter("quartz", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", OreGen.QUARTZ_MIN).addTextReplacement("<highest>", OreGen.QUARTZ_MAX), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
|
||||
|
|
|
@ -112,7 +112,7 @@ public class InterModCommunications{
|
|||
|
||||
if(ReconstructorRecipeHandler.LensType.values().length > lensType && input != null && output != null){
|
||||
ReconstructorRecipeHandler.LensType type = ReconstructorRecipeHandler.LensType.values()[lensType];
|
||||
if(type.canAddRecipesFor){
|
||||
if(type.hasRecipes){
|
||||
ReconstructorRecipeHandler.addRecipe(input, output, energyUse, type);
|
||||
ModUtil.LOGGER.info("Reconstructor Recipe that was sent from Mod "+message.getSender()+" has been registered successfully: "+input+" -> "+output+" @ "+energyUse+" with LensType "+lensType);
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ public class CreativeTab extends CreativeTabs{
|
|||
|
||||
add(InitItems.itemColorLens);
|
||||
add(InitItems.itemExplosionLens);
|
||||
add(InitItems.itemDamageLens);
|
||||
add(InitItems.itemLaserWrench);
|
||||
add(InitItems.itemChestToCrateUpgrade);
|
||||
|
||||
|
|
|
@ -132,6 +132,7 @@ public class InitItems{
|
|||
public static Item itemCrystal;
|
||||
public static Item itemColorLens;
|
||||
public static Item itemExplosionLens;
|
||||
public static Item itemDamageLens;
|
||||
|
||||
public static void init(){
|
||||
ModUtil.LOGGER.info("Initializing Items...");
|
||||
|
@ -142,6 +143,9 @@ public class InitItems{
|
|||
itemExplosionLens = new ItemLens("itemExplosionLens", ReconstructorRecipeHandler.LensType.DETONATION);
|
||||
ItemUtil.register(itemExplosionLens);
|
||||
|
||||
itemDamageLens = new ItemLens("itemDamageLens", ReconstructorRecipeHandler.LensType.JUST_DAMAGE);
|
||||
ItemUtil.register(itemDamageLens);
|
||||
|
||||
itemCrystal = new ItemCrystal();
|
||||
ItemUtil.register(itemCrystal);
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ public class InitOreDict{
|
|||
|
||||
addOre(InitItems.itemColorLens, "itemColorLens");
|
||||
addOre(InitItems.itemExplosionLens, "itemExplosionLens");
|
||||
addOre(InitItems.itemDamageLens, "itemDamageLens");
|
||||
addOre(InitItems.itemMisc, TheMiscItems.LENS.ordinal(), "itemLens");
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ public class ReconstructorRecipeHandler{
|
|||
public static Recipe recipeGreenWall;
|
||||
public static Recipe recipeWhiteWall;
|
||||
public static Recipe recipeExplosionLens;
|
||||
public static Recipe recipeDamageLens;
|
||||
public static ArrayList<Recipe> colorConversionRecipes = new ArrayList<Recipe>();
|
||||
|
||||
public static void init(){
|
||||
|
@ -68,7 +69,9 @@ public class ReconstructorRecipeHandler{
|
|||
recipeColorLens = Util.GetRecipes.lastReconstructorRecipe();
|
||||
addRecipe("itemColorLens", "itemExplosionLens", 5000);
|
||||
recipeExplosionLens = Util.GetRecipes.lastReconstructorRecipe();
|
||||
addRecipe("itemExplosionLens", "itemLens", 5000);
|
||||
addRecipe("itemExplosionLens", "itemDamageLens", 5000);
|
||||
recipeDamageLens = Util.GetRecipes.lastReconstructorRecipe();
|
||||
addRecipe("itemDamageLens", "itemLens", 5000);
|
||||
|
||||
//Misc
|
||||
if(ConfigCrafting.RECONSTRUCTOR_MISC.isEnabled()){
|
||||
|
@ -106,7 +109,7 @@ public class ReconstructorRecipeHandler{
|
|||
}
|
||||
|
||||
public static void addRecipe(String input, String output, int energyUse, LensType type){
|
||||
if(type.canAddRecipesFor){
|
||||
if(type.hasRecipes){
|
||||
recipes.add(new Recipe(input, output, energyUse, type));
|
||||
}
|
||||
}
|
||||
|
@ -153,13 +156,14 @@ public class ReconstructorRecipeHandler{
|
|||
|
||||
NONE(true),
|
||||
COLOR(true),
|
||||
DETONATION(false);
|
||||
DETONATION(false),
|
||||
JUST_DAMAGE(false);
|
||||
|
||||
public ItemStack lens;
|
||||
public boolean canAddRecipesFor;
|
||||
public boolean hasRecipes;
|
||||
|
||||
LensType(boolean canAddRecipesFor){
|
||||
this.canAddRecipesFor = canAddRecipesFor;
|
||||
LensType(boolean hasRecipes){
|
||||
this.hasRecipes = hasRecipes;
|
||||
}
|
||||
|
||||
public float[] getColor(){
|
||||
|
@ -170,6 +174,9 @@ public class ReconstructorRecipeHandler{
|
|||
else if(this == DETONATION){
|
||||
return new float[]{158F/255F, 43F/255F, 39F/255F};
|
||||
}
|
||||
else if(this == JUST_DAMAGE){
|
||||
return new float[]{188F/255F, 222F/255F, 1F};
|
||||
}
|
||||
else return new float[]{27F/255F, 109F/255F, 1F};
|
||||
}
|
||||
|
||||
|
@ -178,7 +185,7 @@ public class ReconstructorRecipeHandler{
|
|||
}
|
||||
|
||||
public int getDistance(){
|
||||
return this == DETONATION ? 30 : 10;
|
||||
return this == DETONATION ? 30 : (this == JUST_DAMAGE ? 15 : 10);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,9 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
|||
int distance = currentLens.getDistance();
|
||||
for(int i = 0; i < distance; i++){
|
||||
WorldPos hitBlock = WorldUtil.getCoordsFromSide(sideToManipulate, worldObj, xCoord, yCoord, zCoord, i);
|
||||
this.damagePlayer(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ());
|
||||
|
||||
float damage = currentLens == ReconstructorRecipeHandler.LensType.JUST_DAMAGE ? 20F : 5F;
|
||||
this.damagePlayer(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), damage);
|
||||
|
||||
if(hitBlock != null){
|
||||
if(!hitBlock.getBlock().isAir(hitBlock.getWorld(), hitBlock.getX(), hitBlock.getY(), hitBlock.getZ())){
|
||||
|
@ -77,7 +79,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
|||
}
|
||||
}
|
||||
//Conversion Recipes
|
||||
else{
|
||||
else if(currentLens.hasRecipes){
|
||||
int range = 2;
|
||||
|
||||
//Converting the Blocks
|
||||
|
@ -164,10 +166,10 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
|
|||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void damagePlayer(int x, int y, int z){
|
||||
public void damagePlayer(int x, int y, int z, float damage){
|
||||
ArrayList<EntityLivingBase> entities = (ArrayList<EntityLivingBase>)worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x, y, z, x+1, y+1, z+1));
|
||||
for(EntityLivingBase entity : entities){
|
||||
entity.attackEntityFrom(DamageSources.DAMAGE_ATOMIC_RECONSTRUCTOR, 16F);
|
||||
entity.attackEntityFrom(DamageSources.DAMAGE_ATOMIC_RECONSTRUCTOR, damage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -310,6 +310,7 @@ item.actuallyadditions.itemCrystalWhite.name=Enori Crystal
|
|||
item.actuallyadditions.itemMiscLens.name=Lens
|
||||
item.actuallyadditions.itemColorLens.name=Lens of Color
|
||||
item.actuallyadditions.itemExplosionLens.name=Lens of Detonation
|
||||
item.actuallyadditions.itemDamageLens.name=Lens of Certain Death
|
||||
|
||||
#Tooltips
|
||||
tooltip.actuallyadditions.onSuffix.desc=On
|
||||
|
@ -618,7 +619,8 @@ booklet.actuallyadditions.chapter.bookStand.text.2=<n><n><n><i>Stand on it
|
|||
booklet.actuallyadditions.chapter.reconstructorLenses.name=Reconstructor Lenses
|
||||
booklet.actuallyadditions.chapter.reconstructorLenses.text.1=The <item>Atomic Reconstructor<r>, by default, can only convert some blocks. <n>This can be changed, however, with <item>Lenses<r>. They can be, once crafted, attached to the Reconstructor via <imp>right-clicking<r> the Reconstructor with them in hand. To remove them, right-click it with an empty hand. <n><item>Lenses<r> have lots of different features and uses, as you can see on <imp>the following pages<r>.
|
||||
booklet.actuallyadditions.chapter.reconstructorLenses.text.3=The <item>Lens of Color<r> can mainly be used to change the colors of <item>Wool<r>, <item>Stained Clay<r>, <item>Stained Glass<r> and <item>Dye<r>, as you can see on the following pages. <n>It has some other uses, too, though.
|
||||
booklet.actuallyadditions.chapter.reconstructorLenses.text.4=The <item>Lens of Detonation<r> will create a firey explosion <imp>around the block the laser hits<r>. <n>Be careful with this. Seriously. <n>(With this lens, the laser also goes 3 times as far!)
|
||||
booklet.actuallyadditions.chapter.reconstructorLenses.text.5=The <item>Lens of Detonation<r> will create a firey explosion <imp>around the block the laser hits<r>. <n>Be careful with this. Seriously. <n>(With this lens, the laser also goes 3 times as far!)
|
||||
booklet.actuallyadditions.chapter.reconstructorLenses.text.6=The <item>Lens of Certain Death<r> will, instead of converting or exploding blocks, do nothing to the environment, but <imp>deal lots of damage<r>, enough, in fact, to kill a player <imp>in a single hit<r>.
|
||||
|
||||
booklet.actuallyadditions.chapter.miscDecorStuffsAndThings.name=Some Decor
|
||||
booklet.actuallyadditions.chapter.miscDecorStuffsAndThings.text.1=Sometimes, when you build, you notice there is just <imp>not enough decor blocks<r>. Well, we present to you: <item>Ethetic Blocks<r>! <n>These are some quartz-like decor blocks with lovely patterns that can also be <imp>converted<r> into <imp>Stairs<r>, <imp>Slabs<r> and <imp>Walls<r> using the usual, well-known recipe patterns.
|
Binary file not shown.
After Width: | Height: | Size: 467 B |
Loading…
Reference in a new issue