aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/common/Recipes.java4
-rw-r--r--src/main/java/common/blocks/Block_IchorJar.java67
-rw-r--r--src/main/java/common/blocks/Block_ThaumiumReinforcedJar.java67
-rw-r--r--src/main/java/kekztech/KekzCore.java5
-rw-r--r--src/main/resources/assets/kekztech/lang/en_US.lang5
5 files changed, 88 insertions, 60 deletions
diff --git a/src/main/java/common/Recipes.java b/src/main/java/common/Recipes.java
index 15516ecc88..8462405fef 100644
--- a/src/main/java/common/Recipes.java
+++ b/src/main/java/common/Recipes.java
@@ -399,12 +399,12 @@ public class Recipes {
15, aspects_jarichor, ItemApi.getBlock("blockJar", 0), recipe_jarichor));
final ItemStack[] recipe_jarthaumiumreinforced = {
- GameRegistry.makeItemStack("Thaumcraft:ItemResource", 15, 0, null),
+ GameRegistry.makeItemStack("Thaumcraft:ItemResource", 15, 1, null),
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1),
new ItemStack(net.minecraft.init.Blocks.glass_pane),
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1),
new ItemStack(net.minecraft.init.Blocks.glass_pane),
- GameRegistry.makeItemStack("Thaumcraft:ItemResource", 15, 0, null),
+ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Titanium, 1),
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1),
new ItemStack(net.minecraft.init.Blocks.glass_pane),
GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Thaumium, 1),
diff --git a/src/main/java/common/blocks/Block_IchorJar.java b/src/main/java/common/blocks/Block_IchorJar.java
index cd3df9aa04..c64770485b 100644
--- a/src/main/java/common/blocks/Block_IchorJar.java
+++ b/src/main/java/common/blocks/Block_IchorJar.java
@@ -8,17 +8,16 @@ import common.tileentities.TE_IchorVoidJar;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import items.Item_IchorJarFilled;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.Explosion;
import net.minecraft.world.World;
-import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.blocks.BlockJar;
+import thaumcraft.common.config.ConfigBlocks;
public class Block_IchorJar extends BlockJar {
@@ -26,6 +25,9 @@ public class Block_IchorJar extends BlockJar {
private Block_IchorJar() {
super();
+
+ super.setHardness(20.0F);
+ super.setResistance(3.0f);
}
public static Block registerBlock() {
@@ -71,36 +73,47 @@ public class Block_IchorJar extends BlockJar {
}
@Override
- public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) {
- final ArrayList<ItemStack> drops = new ArrayList<>();
-
- ItemStack drop;
-
+ public void breakBlock(World world, int x, int y, int z, Block par5, int par6) {
final TileEntity te = world.getTileEntity(x, y, z);
if(te != null && te instanceof TE_IchorJar) {
- drop = new ItemStack(Item_IchorJarFilled.getInstance());
- // Empty and no label
- if(((TE_IchorJar) te).amount <= 0 && ((TE_IchorJar) te).aspectFilter == null) {
- drop = new ItemStack(this);
- }
- // If is void jar, set meta
- if(te instanceof TE_IchorVoidJar) {
- drop.setItemDamage(3);
- }
- // Non empty, generate filled jar item with contents
if(((TE_IchorJar) te).amount > 0) {
- ((Item_IchorJarFilled) drop.getItem()).setAspects(drop,
- (new AspectList()).add(((TE_IchorJar) te).aspect, ((TE_IchorJar) te).amount));
- }
- // has label
- if(((TE_IchorJar) te).aspectFilter != null) {
- if(!drop.hasTagCompound()) {
- drop.setTagCompound(new NBTTagCompound());
+ // Create a decent explosion in the center of the block (TNT has strength 4.0F)
+ world.createExplosion(null, x + 0.5D, y + 0.5D, z + 0.5D, 6.0F, false);
+
+ // Place a lot of Flux in the area
+ final int limit = ((TE_IchorJar) te).amount / 16;
+ int created = 0;
+ for(int i = 0; i < 200; i++) {
+ final int xf = x + world.rand.nextInt(7) - world.rand.nextInt(7);
+ final int yf = x + world.rand.nextInt(7) - world.rand.nextInt(7);
+ final int zf = x + world.rand.nextInt(7) - world.rand.nextInt(7);
+ if(world.isAirBlock(xf, yf, zf)) {
+ if(yf > y) {
+ world.setBlock(xf, yf, zf, ConfigBlocks.blockFluxGas, 8, 3);
+ } else {
+ world.setBlock(xf, yf, zf, ConfigBlocks.blockFluxGoo, 8, 3);
+ }
+
+ if(created++ > limit) {
+ break;
+ }
+ }
}
- drop.stackTagCompound.setString("AspectFilter", ((TE_IchorJar) te).aspectFilter.getTag());
}
- drops.add(drop);
}
+
+ super.breakBlock(world, x, y, z, par5, par6);
+ }
+
+ @Override
+ public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) {
+ final ArrayList<ItemStack> drops = new ArrayList<>();
+ drops.add(new ItemStack(this, 1, (meta == 3) ? 3 : 0));
return drops;
}
+
+ @Override
+ public boolean canDropFromExplosion(Explosion e) {
+ return false;
+ }
}
diff --git a/src/main/java/common/blocks/Block_ThaumiumReinforcedJar.java b/src/main/java/common/blocks/Block_ThaumiumReinforcedJar.java
index 421e1d2c2b..2317646c53 100644
--- a/src/main/java/common/blocks/Block_ThaumiumReinforcedJar.java
+++ b/src/main/java/common/blocks/Block_ThaumiumReinforcedJar.java
@@ -8,17 +8,16 @@ import common.tileentities.TE_ThaumiumReinforcedVoidJar;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import items.Item_ThaumiumReinforcedJarFilled;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.Explosion;
import net.minecraft.world.World;
-import thaumcraft.api.aspects.AspectList;
import thaumcraft.common.blocks.BlockJar;
+import thaumcraft.common.config.ConfigBlocks;
public class Block_ThaumiumReinforcedJar extends BlockJar {
@@ -26,6 +25,9 @@ public class Block_ThaumiumReinforcedJar extends BlockJar {
private Block_ThaumiumReinforcedJar() {
super();
+
+ super.setHardness(8.0F);
+ super.setResistance(6.0F);
}
public static Block registerBlock() {
@@ -71,36 +73,47 @@ public class Block_ThaumiumReinforcedJar extends BlockJar {
}
@Override
- public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) {
- final ArrayList<ItemStack> drops = new ArrayList<>();
-
- ItemStack drop;
-
+ public void breakBlock(World world, int x, int y, int z, Block par5, int par6) {
final TileEntity te = world.getTileEntity(x, y, z);
if(te != null && te instanceof TE_ThaumiumReinforcedJar) {
- drop = new ItemStack(Item_ThaumiumReinforcedJarFilled.getInstance());
- // Empty and no label
- if(((TE_ThaumiumReinforcedJar) te).amount <= 0 && ((TE_ThaumiumReinforcedJar) te).aspectFilter == null) {
- drop = new ItemStack(this);
- }
- // If is void jar, set meta
- if(te instanceof TE_ThaumiumReinforcedVoidJar) {
- drop.setItemDamage(3);
- }
- // Non empty, generate filled jar item with contents
if(((TE_ThaumiumReinforcedJar) te).amount > 0) {
- ((Item_ThaumiumReinforcedJarFilled) drop.getItem()).setAspects(drop,
- (new AspectList()).add(((TE_ThaumiumReinforcedJar) te).aspect, ((TE_ThaumiumReinforcedJar) te).amount));
- }
- // has label
- if(((TE_ThaumiumReinforcedJar) te).aspectFilter != null) {
- if(!drop.hasTagCompound()) {
- drop.setTagCompound(new NBTTagCompound());
+ // Create a small explosion in the center of the block (TNT has strength 4.0F)
+ world.createExplosion(null, x + 0.5D, y + 0.5D, z + 0.5D, 1.0F, false);
+
+ // Place some Flux in the area
+ final int limit = ((TE_ThaumiumReinforcedJar) te).amount / 16;
+ int created = 0;
+ for(int i = 0; i < 50; i++) {
+ final int xf = x + world.rand.nextInt(4) - world.rand.nextInt(4);
+ final int yf = x + world.rand.nextInt(4) - world.rand.nextInt(4);
+ final int zf = x + world.rand.nextInt(4) - world.rand.nextInt(4);
+ if(world.isAirBlock(xf, yf, zf)) {
+ if(yf > y) {
+ world.setBlock(xf, yf, zf, ConfigBlocks.blockFluxGas, 8, 3);
+ } else {
+ world.setBlock(xf, yf, zf, ConfigBlocks.blockFluxGoo, 8, 3);
+ }
+
+ if(created++ > limit) {
+ break;
+ }
+ }
}
- drop.stackTagCompound.setString("AspectFilter", ((TE_ThaumiumReinforcedJar) te).aspectFilter.getTag());
}
- drops.add(drop);
}
+
+ super.breakBlock(world, x, y, z, par5, par6);
+ }
+
+ @Override
+ public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) {
+ final ArrayList<ItemStack> drops = new ArrayList<>();
+ drops.add(new ItemStack(this, 1, (meta == 3) ? 3 : 0));
return drops;
}
+
+ @Override
+ public boolean canDropFromExplosion(Explosion e) {
+ return false;
+ }
}
diff --git a/src/main/java/kekztech/KekzCore.java b/src/main/java/kekztech/KekzCore.java
index ff677a3296..3c5617dcc8 100644
--- a/src/main/java/kekztech/KekzCore.java
+++ b/src/main/java/kekztech/KekzCore.java
@@ -101,8 +101,9 @@ public class KekzCore {
// Thaumcraft research
final ResearchItem jar_thaumiumreinforced = new ResearchItem("THAUMIUMREINFORCEDJAR", "ALCHEMY", new AspectList(), 3, -4, 2, new ItemStack(Blocks.jarThaumiumReinforced, 1));
jar_thaumiumreinforced.setPages(new ResearchPage[] {
- new ResearchPage("kekztech.research_page.THAUMIUMREINFORCEDJAR"),
- new ResearchPage(Recipes.infusionRecipes.get("THAUMIUMREINFORCEDJAR"))
+ new ResearchPage("kekztech.research_page.THAUMIUMREINFORCEDJAR.0"),
+ new ResearchPage(Recipes.infusionRecipes.get("THAUMIUMREINFORCEDJAR")),
+ new ResearchPage("kekztech.research_page.THAUMIUMREINFORCEDJAR.1")
});
jar_thaumiumreinforced.setParents(new String[] {"JARLABEL"});
jar_thaumiumreinforced.registerResearchItem();
diff --git a/src/main/resources/assets/kekztech/lang/en_US.lang b/src/main/resources/assets/kekztech/lang/en_US.lang
index 69ed77ae42..1ed0ad6561 100644
--- a/src/main/resources/assets/kekztech/lang/en_US.lang
+++ b/src/main/resources/assets/kekztech/lang/en_US.lang
@@ -107,7 +107,8 @@ item.kekztech_ichorjarfilled_item.name=Ichor Jar with Essentia
item.kekztech_ichorjarfilled_item.void.name=Ichor Void Jar with Essentia
tc.research_name.THAUMIUMREINFORCEDJAR=Thaumium Reinforced Jars
-kekztech.research_page.THAUMIUMREINFORCEDJAR=You have heard your fellow Thaumaturges talk about the benefits of digitized Essentia Storage.<BR><BR> Storing enough Essentia for your advanced infusions has indeed been an issue for you too, however those jars are simply too pleasing to look at to even consider the idea of replacing them with some compact technological construct.<BR><BR>Thanks to this new discovery, you have managed to quadruple the capacity of your jars by improving them with a thick Thaumium lining. This should buy you some more time to come up with a better solution. You imagine that you could get even more out of your jars if only you had some kind of material harder then even diamond or any of the other magical metal you have seen so far.
+kekztech.research_page.THAUMIUMREINFORCEDJAR.0=You have heard your fellow Thaumaturges talk about the benefits of digitized Essentia Storage.<BR><BR>Storing enough Essentia for your advanced infusions has indeed been an issue for you too. However those jars are simply too pleasing to look at to even consider the idea of replacing them with some compact technological construct.<BR><BR>Thanks to this new discovery, you have managed to quadruple the capacity of your jars by improving them with a thick Thaumium lining. This should buy you some more time to come up with a better solution.
+kekztech.research_page.THAUMIUMREINFORCEDJAR.1=Compressing this much Essentia in such a tiny space causes some volatility. Picking up reinforced jars is probably a bad idea...<BR><BR>You imagine that you could get even more out of your jars if only you had some kind of material harder than even diamond or any of the other magical metal you have seen so far.
tc.research_name.ICHORJAR=Ichor Jars
-kekztech.research_page.ICHORJAR=This is it!<BR><BR>By infusing a jar with just a single piece of Ichor you have created something to rival digitized Essentia storage without sacrificing any of the beauty that your array of warded jars offer.<BR><BR>Ichor Jars can hold an astounding 4096 Essentia and fit nicely into your recently aquired set of Ichor based achievements.
+kekztech.research_page.ICHORJAR=This is it!<BR><BR>By infusing a jar with just a single piece of Ichor you have created something to rival digitized Essentia storage without sacrificing any of the beauty of Warded Jars<BR><BR>Ichor Jars can hold an astounding 4096 Essentia and fit nicely into your recently aquired set of Ichor based achievements.<BR><BR>You definitely don't want to disturb these jars. Luckily Ichor is resilient enough to make accidentially destroying one unlikely.