New client -> server packet handler, added key to allow using the Project: Omega's signature effects
This commit is contained in:
parent
ca74a33a12
commit
6cb1e06306
17 changed files with 800 additions and 37 deletions
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.omega;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -89,4 +90,14 @@ public class OmegaParadigm
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
package WayofTime.alchemicalWizardry.common.omega;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMimicBlock;
|
||||
|
||||
public class OmegaParadigmWater extends OmegaParadigm
|
||||
{
|
||||
|
@ -22,4 +31,44 @@ public class OmegaParadigmWater extends OmegaParadigm
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(World world, EntityPlayer player, ItemStack stack)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 3, 0, true));
|
||||
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionAmphibian.id, 3, 0, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z)
|
||||
{
|
||||
if(entity instanceof EntityLivingBase)
|
||||
{
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 100, 1));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack)
|
||||
{
|
||||
World world = player.worldObj;
|
||||
|
||||
int x = (int) Math.round(player.posX);
|
||||
int y = (int) Math.round(player.posY);
|
||||
int z = (int) Math.round(player.posZ);
|
||||
|
||||
int range = 3;
|
||||
|
||||
for(int i=-range; i<=range; i++)
|
||||
{
|
||||
for(int j=-range; j<=range; j++)
|
||||
{
|
||||
for(int k=-range; k<=range; k++)
|
||||
{
|
||||
TEMimicBlock.createMimicBlockAtLocation(world, x+i, y+j, z+k, 300, Blocks.water, 0, ReagentRegistry.aquasalusReagent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue