mirror of
https://github.com/GTNewHorizons/ThaumicInsurgence.git
synced 2026-11-14 01:14:01 +00:00
[[Big shot]]
Adds in the new soap.
This commit is contained in:
1 parent
95b03808ce
commit
01da9d4592
9 files changed
+171
-1
No files matched your search
@@ -0,0 +1,126 @@
|
||||
package thaumicinsurgence.item;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.items.ItemSanitySoap;
|
||||
import thaumicinsurgence.main.utils.TabThaumicInsurgence;
|
||||
|
||||
public class ItemSanitySoapBeta extends ItemSanitySoap {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon icon;
|
||||
|
||||
public ItemSanitySoapBeta() {
|
||||
this.setCreativeTab(TabThaumicInsurgence.tabThaumicInsurgence);
|
||||
this.setHasSubtypes(false);
|
||||
setUnlocalizedName("ItemSanitySoapBeta");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("thaumicinsurgence:soap_beta_4");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
public int getMaxItemUseDuration(ItemStack p_77626_1_) {
|
||||
return 200;
|
||||
}
|
||||
|
||||
public EnumAction getItemUseAction(ItemStack p_77661_1_) {
|
||||
return EnumAction.block;
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
|
||||
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
|
||||
return p_77659_1_;
|
||||
}
|
||||
|
||||
public void onUsingTick(ItemStack stack, EntityPlayer player, int count) {
|
||||
int ticks = this.getMaxItemUseDuration(stack) - count;
|
||||
if (ticks > 40) {
|
||||
player.stopUsingItem();
|
||||
}
|
||||
|
||||
if (player.worldObj.isRemote) {
|
||||
if (player.worldObj.rand.nextFloat() < 0.2F) {
|
||||
player.worldObj.playSound(
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
"thaumcraft:roots",
|
||||
0.1F,
|
||||
1.5F + player.worldObj.rand.nextFloat() * 0.2F,
|
||||
false);
|
||||
}
|
||||
|
||||
for (int a = 0; a < Thaumcraft.proxy.particleCount(5); ++a) {
|
||||
Thaumcraft.proxy.crucibleBubble(
|
||||
Thaumcraft.proxy.getClientWorld(),
|
||||
(float) player.posX - 0.5F + player.worldObj.rand.nextFloat(),
|
||||
(float) player.boundingBox.minY + player.worldObj.rand.nextFloat() * player.height,
|
||||
(float) player.posZ - 0.5F + player.worldObj.rand.nextFloat(),
|
||||
1.0F,
|
||||
0.8F,
|
||||
0.9F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer player, int par4) {
|
||||
int qq = this.getMaxItemUseDuration(stack) - par4;
|
||||
if (qq > 40) {
|
||||
--stack.stackSize;
|
||||
if (!world.isRemote) {
|
||||
float chance = 0.10F;
|
||||
if (player.isPotionActive(Config.potionWarpWardID)) {
|
||||
chance += 0.15F;
|
||||
}
|
||||
|
||||
int i = MathHelper.floor_double(player.posX);
|
||||
int j = MathHelper.floor_double(player.posY);
|
||||
int k = MathHelper.floor_double(player.posZ);
|
||||
if (world.getBlock(i, j, k) == ConfigBlocks.blockFluidPure) {
|
||||
chance += 0.15F;
|
||||
}
|
||||
|
||||
if (world.rand.nextFloat() < chance
|
||||
&& Thaumcraft.proxy.getPlayerKnowledge().getWarpPerm(player.getCommandSenderName()) > 0) {
|
||||
Thaumcraft.proxy.getPlayerKnowledge().addWarpPerm(player.getCommandSenderName(), -1);
|
||||
Thaumcraft.addStickyWarpToPlayer(player, 2);
|
||||
}
|
||||
|
||||
if (Thaumcraft.proxy.getPlayerKnowledge().getWarpTemp(player.getCommandSenderName()) > 0) {
|
||||
Thaumcraft.addWarpToPlayer(player, 2, true);
|
||||
}
|
||||
} else {
|
||||
player.worldObj.playSound(
|
||||
player.posX, player.posY, player.posZ, "thaumcraft:craftstart", 0.25F, 1.0F, false);
|
||||
|
||||
for (int a = 0; a < Thaumcraft.proxy.particleCount(20); ++a) {
|
||||
Thaumcraft.proxy.crucibleBubble(
|
||||
Thaumcraft.proxy.getClientWorld(),
|
||||
(float) player.posX - 0.5F + player.worldObj.rand.nextFloat() * 1.5F,
|
||||
(float) player.boundingBox.minY + player.worldObj.rand.nextFloat() * player.height,
|
||||
(float) player.posZ - 0.5F + player.worldObj.rand.nextFloat() * 1.5F,
|
||||
1.0F,
|
||||
0.7F,
|
||||
0.9F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import thaumicinsurgence.block.*;
|
||||
import thaumicinsurgence.block.BlockInfusionFucker;
|
||||
import thaumicinsurgence.item.ItemMiscResources;
|
||||
import thaumicinsurgence.item.ItemSanitySoapAlpha;
|
||||
import thaumicinsurgence.item.ItemSanitySoapBeta;
|
||||
import thaumicinsurgence.item.armor.ItemEightBitRedCrown;
|
||||
import thaumicinsurgence.item.armor.ItemRedCrown;
|
||||
import thaumicinsurgence.item.tools.ItemAlastorsWand;
|
||||
@@ -42,6 +43,7 @@ public class Config {
|
||||
public static Item thaumicInterfacer;
|
||||
public static Item alastorsWand;
|
||||
public static Item soapAlpha;
|
||||
public static Item soapBetaBitch;
|
||||
|
||||
public static BlockInfusionFucker infusionIntercepter;
|
||||
public static BlockInfusionMatrixAlpha matrixAlpha;
|
||||
@@ -106,6 +108,9 @@ public class Config {
|
||||
|
||||
soapAlpha = new ItemSanitySoapAlpha();
|
||||
GameRegistry.registerItem(soapAlpha, soapAlpha.getUnlocalizedName());
|
||||
|
||||
soapBetaBitch = new ItemSanitySoapBeta();
|
||||
GameRegistry.registerItem(soapBetaBitch, soapBetaBitch.getUnlocalizedName());
|
||||
}
|
||||
|
||||
private static void processConfigFile() {
|
||||
|
||||
@@ -220,6 +220,7 @@ public class ThaumcraftHelper implements IModHelper {
|
||||
public static InfusionRecipe infusionIntercepter;
|
||||
public static InfusionRecipe thaumicInterfacer;
|
||||
public static CrucibleRecipe soapAlpha;
|
||||
public static CrucibleRecipe soapBeta;
|
||||
|
||||
public static void getBlocks() {
|
||||
plant = BlockInterface.getBlock(Name, "blockCustomPlant");
|
||||
@@ -285,6 +286,15 @@ public class ThaumcraftHelper implements IModHelper {
|
||||
new ItemStack(Config.soapAlpha),
|
||||
new ItemStack(ConfigItems.itemSanitySoap),
|
||||
new AspectList().add(Aspect.HEAL, 32).add(Aspect.ORDER, 64));
|
||||
|
||||
soapBeta = ThaumcraftApi.addCrucibleRecipe(
|
||||
"TI_SanitizingSoapBeta",
|
||||
new ItemStack(Config.soapBetaBitch),
|
||||
new ItemStack(Config.soapAlpha),
|
||||
new AspectList()
|
||||
.add(Aspect.ELDRITCH, 32)
|
||||
.add(Aspect.EXCHANGE, 64)
|
||||
.add(Aspect.HEAL, 64));
|
||||
}
|
||||
|
||||
public static void setupResearch() {
|
||||
@@ -307,6 +317,10 @@ public class ThaumcraftHelper implements IModHelper {
|
||||
ResearchPage soapAlpha1;
|
||||
ResearchPage soapAlpha2;
|
||||
|
||||
ResearchItem soapBetaPage;
|
||||
ResearchPage soapBeta1;
|
||||
ResearchPage soapBeta2;
|
||||
|
||||
soapAlphaPage = new ResearchItem(
|
||||
"TI_SanitizingSoapAlpha",
|
||||
category,
|
||||
@@ -316,6 +330,15 @@ public class ThaumcraftHelper implements IModHelper {
|
||||
2,
|
||||
new ItemStack(Config.soapAlpha));
|
||||
|
||||
soapBetaPage = new ResearchItem(
|
||||
"TI_SanitizingSoapBeta",
|
||||
category,
|
||||
new AspectList().add(Aspect.ELDRITCH, 1).add(Aspect.EXCHANGE, 1).add(Aspect.HEAL, 1),
|
||||
-2,
|
||||
2,
|
||||
2,
|
||||
new ItemStack(Config.soapBetaBitch));
|
||||
|
||||
infusionIntercepterPage = new ResearchItem(
|
||||
"TI_InfusionIntercepter",
|
||||
category,
|
||||
@@ -352,7 +375,9 @@ public class ThaumcraftHelper implements IModHelper {
|
||||
thaumicInterface2 = new ResearchPage(thaumicInterfacer);
|
||||
|
||||
soapAlpha1 = new ResearchPage("SoapAlpha.1");
|
||||
soapAlpha2 = new ResearchPage(soapAlpha);
|
||||
soapAlpha2 = new ResearchPage(soapBeta);
|
||||
soapBeta1 = new ResearchPage("SoapBeta.1");
|
||||
soapBeta2 = new ResearchPage(soapBeta);
|
||||
|
||||
infusionIntercepterPage.setPages(intercepter1, intercepter2);
|
||||
infusionIntercepterPage.setParents("INFUSION");
|
||||
@@ -366,11 +391,15 @@ public class ThaumcraftHelper implements IModHelper {
|
||||
soapAlphaPage.setPages(soapAlpha1, soapAlpha2);
|
||||
soapAlphaPage.setParents("SANESOAP");
|
||||
|
||||
soapBetaPage.setPages(soapBeta1, soapBeta2);
|
||||
soapBetaPage.setParents("TI_SanitizingSoapAlpha");
|
||||
|
||||
ThaumcraftApi.addWarpToResearch("TI_InfusionIntercepter", 4);
|
||||
ResearchCategories.addResearch(infusionIntercepterPage);
|
||||
ResearchCategories.addResearch(redCrownPage);
|
||||
ResearchCategories.addResearch(thaumicInterfacerPage);
|
||||
ResearchCategories.addResearch(soapAlphaPage);
|
||||
ResearchCategories.addResearch(soapBetaPage);
|
||||
}
|
||||
|
||||
public static ResearchPage getResearchPage(String ident) {
|
||||
|
||||
@@ -24,6 +24,9 @@ InfusionInterceptor.1=Do you hate how slow infusion is? Are you sick and tired o
|
||||
tc.research_name.TI_SanitizingSoapAlpha=Sanitizing Soap Alpha
|
||||
tc.research_text.TI_SanitizingSoapAlpha=Every day we inch closer to replacing Azanor.
|
||||
|
||||
tc.research_name.TI_SanitizingSoapBeta=Alastor's Soap
|
||||
tc.research_text.TI_SanitizingSoapBeta=Made from Azanor's tears
|
||||
|
||||
#Tiles
|
||||
|
||||
#Items
|
||||
@@ -33,6 +36,8 @@ item.ItemRedCrown.name=Red Crown
|
||||
item.ItemEightBitRedCrown.name=Red Crown
|
||||
item.ItemAlastorsWand.name=Alastor's First Wand
|
||||
item.ItemSanitySoapAlpha.name=Trosma Sláintíochta Soap
|
||||
item.ItemSanitySoapBeta.name=Alastor's Soap
|
||||
|
||||
|
||||
itemGroup.Thaumic Insurgence=Thaumic Insurgence
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 663 B |
Binary file not shown.
|
After Width: | Height: | Size: 639 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation":{
|
||||
"frametime":8
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user