nosingleplayer 1.1.1: fond custom via blit + log debug widgets
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureAngelicWaterMobplayerCollidesBlock extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureAngelicWaterMobplayerCollidesBlock(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 166);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure AngelicWaterMobplayerCollidesBlock!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if ((entity instanceof EntityPlayer)) {
|
||||
if ((Math.random() < 0.5)) {
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity)
|
||||
.setHealth((float) (((entity instanceof EntityLivingBase) ? ((EntityLivingBase) entity).getHealth() : -1) + 1.5));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemKiwanoSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemKiwano;
|
||||
import net.paladrill.paladrillmod.block.BlockKiwanoStage4;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureBreakBlockUnderCrops extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureBreakBlockUnderCrops(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 192);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure BreakBlockUnderCrops!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure BreakBlockUnderCrops!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure BreakBlockUnderCrops!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure BreakBlockUnderCrops!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockKiwanoStage4.block.getDefaultState().getBlock())
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwano.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
if ((!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState()
|
||||
.getBlock()))) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwanoSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemFikutsiSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemEggPlantFruit;
|
||||
import net.paladrill.paladrillmod.block.BlockFikutsiStage3;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureBreakBlockUnderCropsForFikutsi extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureBreakBlockUnderCropsForFikutsi(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 261);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure BreakBlockUnderCropsForFikutsi!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure BreakBlockUnderCropsForFikutsi!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure BreakBlockUnderCropsForFikutsi!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure BreakBlockUnderCropsForFikutsi!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockFikutsiStage3.block.getDefaultState().getBlock())
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemEggPlantFruit.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
if ((!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState()
|
||||
.getBlock()))) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemFikutsiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemKiwanoSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemKiwano;
|
||||
import net.paladrill.paladrillmod.block.BlockKiwanoStage4;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureBreakBlockUnderCropsForKiwano extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureBreakBlockUnderCropsForKiwano(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 225);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure BreakBlockUnderCropsForKiwano!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure BreakBlockUnderCropsForKiwano!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure BreakBlockUnderCropsForKiwano!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure BreakBlockUnderCropsForKiwano!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockKiwanoStage4.block.getDefaultState().getBlock())
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwano.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
if ((!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState()
|
||||
.getBlock()))) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwanoSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiFruit;
|
||||
import net.paladrill.paladrillmod.block.BlockOkamiStage3;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureBreakBlockUnderCropsForOkami extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureBreakBlockUnderCropsForOkami(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 276);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure BreakBlockUnderCropsForOkami!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure BreakBlockUnderCropsForOkami!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure BreakBlockUnderCropsForOkami!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure BreakBlockUnderCropsForOkami!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockOkamiStage3.block.getDefaultState().getBlock())
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiFruit.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
if ((!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState()
|
||||
.getBlock()))) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemOrangeBlueSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemOrangeBlueFruit;
|
||||
import net.paladrill.paladrillmod.block.BlockOrangeBlueStage4;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureBreakBlockUnderCropsForOrangeBlue extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureBreakBlockUnderCropsForOrangeBlue(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 209);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure BreakBlockUnderCropsForOrangeBlue!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure BreakBlockUnderCropsForOrangeBlue!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure BreakBlockUnderCropsForOrangeBlue!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure BreakBlockUnderCropsForOrangeBlue!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockOrangeBlueStage4.block.getDefaultState().getBlock())
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOrangeBlueFruit.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOrangeBlueSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
if ((!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState()
|
||||
.getBlock()))) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOrangeBlueSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureDurability extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureDurability(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 169);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("itemstack") == null) {
|
||||
System.err.println("Failed to load dependency itemstack for procedure Durability!");
|
||||
return;
|
||||
}
|
||||
ItemStack itemstack = (ItemStack) dependencies.get("itemstack");
|
||||
{
|
||||
ItemStack _ist = (itemstack);
|
||||
if (_ist.attemptDamageItem((int) 1, new Random(), null)) {
|
||||
_ist.shrink(1);
|
||||
_ist.setItemDamage(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureDynamiteBulletHitsBlock extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureDynamiteBulletHitsBlock(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 234);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure DynamiteBulletHitsBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure DynamiteBulletHitsBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure DynamiteBulletHitsBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure DynamiteBulletHitsBlock!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (!world.isRemote) {
|
||||
world.createExplosion(null, (int) x, (int) y, (int) z, (float) 2, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.Teleporter;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureEndCommandExecuted extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureEndCommandExecuted(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 243);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure EndCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure EndCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure EndCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure EndCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure EndCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((entity.canUseCommand((int) 4, ""))) {
|
||||
{
|
||||
Entity _ent = entity;
|
||||
if (!_ent.world.isRemote && !_ent.isRiding() && !_ent.isBeingRidden() && _ent instanceof EntityPlayerMP) {
|
||||
int dimensionID = 1;
|
||||
class TeleporterDirect extends Teleporter {
|
||||
public TeleporterDirect(WorldServer worldserver) {
|
||||
super(worldserver);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void placeInPortal(Entity entity, float yawrotation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean placeInExistingPortal(Entity entity, float yawrotation) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean makePortal(Entity entity) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
EntityPlayerMP _player = (EntityPlayerMP) _ent;
|
||||
_player.mcServer.getPlayerList().transferPlayerToDimension(_player, dimensionID, new TeleporterDirect(_player.getServerWorld()));
|
||||
_player.connection.setPlayerLocation(DimensionManager.getWorld(dimensionID).getSpawnPoint().getX(),
|
||||
DimensionManager.getWorld(dimensionID).getSpawnPoint().getY() + 1,
|
||||
DimensionManager.getWorld(dimensionID).getSpawnPoint().getZ(), _player.rotationYaw, _player.rotationPitch);
|
||||
}
|
||||
}
|
||||
world.playSound((EntityPlayer) null, x, y, z, (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY
|
||||
.getObject(new ResourceLocation("entity.endermen.teleport")), SoundCategory.NEUTRAL, (float) 1, (float) 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureEndiumArmorBodyTickEvent extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureEndiumArmorBodyTickEvent(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 161);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure EndiumArmorBodyTickEvent!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.STRENGTH, (int) 60, (int) 6, (false), (false)));
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.REGENERATION, (int) 60, (int) 4, (false), (false)));
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemEndiumArmor;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureEndiumArmorBootsTickEvent extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureEndiumArmorBootsTickEvent(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 163);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure EndiumArmorBootsTickEvent!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.HASTE, (int) 60, (int) 1, (false), (false)));
|
||||
if (((((entity instanceof EntityPlayer) ? ((EntityPlayer) entity).inventory.armorInventory.get(3) : ItemStack.EMPTY)
|
||||
.getItem() == new ItemStack(ItemEndiumArmor.helmet, (int) (1)).getItem())
|
||||
&& ((((entity instanceof EntityPlayer) ? ((EntityPlayer) entity).inventory.armorInventory.get(2) : ItemStack.EMPTY)
|
||||
.getItem() == new ItemStack(ItemEndiumArmor.body, (int) (1)).getItem())
|
||||
&& ((((entity instanceof EntityPlayer) ? ((EntityPlayer) entity).inventory.armorInventory.get(1) : ItemStack.EMPTY)
|
||||
.getItem() == new ItemStack(ItemEndiumArmor.legs, (int) (1)).getItem())
|
||||
&& (((entity instanceof EntityPlayer) ? ((EntityPlayer) entity).inventory.armorInventory.get(0) : ItemStack.EMPTY)
|
||||
.getItem() == new ItemStack(ItemEndiumArmor.boots, (int) (1)).getItem()))))) {
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.INVISIBILITY, (int) 60, (int) 1, (false), (false)));
|
||||
}
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureEndiumArmorHelmetTickEvent extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureEndiumArmorHelmetTickEvent(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 160);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure EndiumArmorHelmetTickEvent!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, (int) 860, (int) 4, (false), (false)));
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureEndiumArmorLeggingsTickEvent extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureEndiumArmorLeggingsTickEvent(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 162);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure EndiumArmorLeggingsTickEvent!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, (int) 60, (int) 6, (false), (false)));
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureEndiumDynamiteHit extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureEndiumDynamiteHit(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 235);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure EndiumDynamiteHit!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure EndiumDynamiteHit!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure EndiumDynamiteHit!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure EndiumDynamiteHit!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (!world.isRemote) {
|
||||
world.createExplosion(null, (int) x, (int) y, (int) z, (float) 5, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureExtrapolatedBucketRightClickedOnBlock extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureExtrapolatedBucketRightClickedOnBlock(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 168);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("itemstack") == null) {
|
||||
System.err.println("Failed to load dependency itemstack for procedure ExtrapolatedBucketRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure ExtrapolatedBucketRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure ExtrapolatedBucketRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure ExtrapolatedBucketRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure ExtrapolatedBucketRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
ItemStack itemstack = (ItemStack) dependencies.get("itemstack");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getMaterial() == Material.LAVA)) {
|
||||
{
|
||||
ItemStack _ist = (itemstack);
|
||||
if (_ist.attemptDamageItem((int) 1, new Random(), null)) {
|
||||
_ist.shrink(1);
|
||||
_ist.setItemDamage(0);
|
||||
}
|
||||
}
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getMaterial() == Material.WATER)) {
|
||||
{
|
||||
ItemStack _ist = (itemstack);
|
||||
if (_ist.attemptDamageItem((int) 1, new Random(), null)) {
|
||||
_ist.shrink(1);
|
||||
_ist.setItemDamage(0);
|
||||
}
|
||||
}
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureFakeWaterMobplayerCollidesBlock extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureFakeWaterMobplayerCollidesBlock(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 165);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure FakeWaterMobplayerCollidesBlock!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if ((entity instanceof EntityPlayer)) {
|
||||
if ((Math.random() < 0.5)) {
|
||||
entity.attackEntityFrom(DamageSource.GENERIC, (float) 1.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemFikutsiSeeds;
|
||||
import net.paladrill.paladrillmod.block.BlockFikutsiStage0;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureFikutsiRighClickedOnBlock extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureFikutsiRighClickedOnBlock(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 263);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure FikutsiRighClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure FikutsiRighClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure FikutsiRighClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure FikutsiRighClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure FikutsiRighClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((((entity instanceof EntityLivingBase) ? ((EntityLivingBase) entity).getHeldItemMainhand() : ItemStack.EMPTY)
|
||||
.getItem() == new ItemStack(ItemFikutsiSeeds.block, (int) (1)).getItem())
|
||||
&& (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState().getBlock())
|
||||
&& (((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR.getDefaultState()
|
||||
.getBlock())
|
||||
|| (((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR.getDefaultState()
|
||||
.getBlock())
|
||||
|| ((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR
|
||||
.getDefaultState().getBlock())))))) {
|
||||
world.setBlockState(new BlockPos((int) x, (int) (y + 1), (int) z), BlockFikutsiStage0.block.getDefaultState(), 3);
|
||||
if ((!((entity instanceof EntityPlayer) ? ((EntityPlayer) entity).capabilities.isCreativeMode : false))) {
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).inventory.clearMatchingItems(new ItemStack(ItemFikutsiSeeds.block, (int) (1)).getItem(), -1, (int) 1,
|
||||
null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemFikutsiSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemEggPlantFruit;
|
||||
import net.paladrill.paladrillmod.block.BlockFikutsiStage3;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureFikutsiStage0BlockDestroyByPlayer extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureFikutsiStage0BlockDestroyByPlayer(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 259);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure FikutsiStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure FikutsiStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure FikutsiStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure FikutsiStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockFikutsiStage3.block.getDefaultState().getBlock())) {
|
||||
world.destroyBlock(new BlockPos((int) x, (int) y, (int) z), false);
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemEggPlantFruit.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
world.destroyBlock(new BlockPos((int) x, (int) y, (int) z), false);
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemFikutsiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemFikutsiSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemEggPlantFruit;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureFikutsiStage0BlockDestroyByPlayerBlockDestroyedByPlayer extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureFikutsiStage0BlockDestroyByPlayerBlockDestroyedByPlayer(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 262);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure FikutsiStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure FikutsiStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure FikutsiStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure FikutsiStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((Math.random() < 0.3)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemFikutsiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemEggPlantFruit.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemFikutsiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.block.BlockFikutsiStage3;
|
||||
import net.paladrill.paladrillmod.block.BlockFikutsiStage2;
|
||||
import net.paladrill.paladrillmod.block.BlockFikutsiStage1;
|
||||
import net.paladrill.paladrillmod.block.BlockFikutsiStage0;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureFikutsiStage0UpdateTick extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureFikutsiStage0UpdateTick(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 258);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure FikutsiStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure FikutsiStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure FikutsiStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure FikutsiStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockFikutsiStage2.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockFikutsiStage3.block.getDefaultState(), 3);
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockFikutsiStage1.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockFikutsiStage2.block.getDefaultState(), 3);
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockFikutsiStage0.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockFikutsiStage1.block.getDefaultState(), 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemFikutsiSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemEggPlantFruit;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureFikutsiStage3Casser extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureFikutsiStage3Casser(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 264);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure FikutsiStage3Casser!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure FikutsiStage3Casser!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure FikutsiStage3Casser!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure FikutsiStage3Casser!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
world.destroyBlock(new BlockPos((int) x, (int) y, (int) z), false);
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemEggPlantFruit.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemFikutsiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureHangGliderRightClickedInAir extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureHangGliderRightClickedInAir(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 226);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure HangGliderRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.LEVITATION, (int) 5, (int) (-4), (false), (false)));
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, (int) 1, (int) 5, (false), (false)));
|
||||
}
|
||||
}
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemOrangeBlueSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemKiwanoSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemFikutsiSeeds;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureHaveKiwanoSeeds extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureHaveKiwanoSeeds(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 195);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure HaveKiwanoSeeds!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure HaveKiwanoSeeds!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure HaveKiwanoSeeds!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure HaveKiwanoSeeds!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == Blocks.TALLGRASS.getStateFromMeta(1).getBlock())) {
|
||||
if ((Math.random() < 0.004)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOrangeBlueSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
if ((Math.random() < 0.005)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwanoSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
if ((Math.random() < 0.02)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemFikutsiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
if ((Math.random() < 0.01)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == Blocks.DOUBLE_PLANT.getStateFromMeta(2).getBlock())) {
|
||||
if ((Math.random() < 0.005)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwanoSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
if ((Math.random() < 0.004)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOrangeBlueSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
if ((Math.random() < 0.02)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemFikutsiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
if ((Math.random() < 0.01)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == Blocks.AIR.getDefaultState().getBlock())) {
|
||||
if ((Math.random() < 0.005)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOrangeBlueSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
if ((Math.random() < 0.009)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwanoSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
if ((Math.random() < 0.02)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemFikutsiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
if ((Math.random() < 0.01)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBlockBreak(BlockEvent.BreakEvent event) {
|
||||
Entity entity = event.getPlayer();
|
||||
java.util.HashMap<String, Object> dependencies = new java.util.HashMap<>();
|
||||
dependencies.put("xpAmount", event.getExpToDrop());
|
||||
dependencies.put("x", (int) event.getPos().getX());
|
||||
dependencies.put("y", (int) event.getPos().getY());
|
||||
dependencies.put("z", (int) event.getPos().getZ());
|
||||
dependencies.put("px", (int) entity.posX);
|
||||
dependencies.put("py", (int) entity.posY);
|
||||
dependencies.put("pz", (int) entity.posZ);
|
||||
dependencies.put("world", event.getWorld());
|
||||
dependencies.put("entity", entity);
|
||||
dependencies.put("event", event);
|
||||
this.executeProcedure(dependencies);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureHealStickRightClickedInAir extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureHealStickRightClickedInAir(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 229);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure HealStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("itemstack") == null) {
|
||||
System.err.println("Failed to load dependency itemstack for procedure HealStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure HealStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure HealStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure HealStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure HealStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
ItemStack itemstack = (ItemStack) dependencies.get("itemstack");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).getCooldownTracker().setCooldown(((itemstack)).getItem(), (int) 100);
|
||||
{
|
||||
ItemStack _ist = (itemstack);
|
||||
if (_ist.attemptDamageItem((int) 1, new Random(), null)) {
|
||||
_ist.shrink(1);
|
||||
_ist.setItemDamage(0);
|
||||
}
|
||||
}
|
||||
if (world instanceof WorldServer)
|
||||
((WorldServer) world).spawnParticle(EnumParticleTypes.DRAGON_BREATH, x, y, z, (int) 60, 3, 3, 3, 1, new int[0]);
|
||||
if (world instanceof WorldServer)
|
||||
((WorldServer) world).spawnParticle(EnumParticleTypes.LAVA, x, y, z, (int) 60, 3, 3, 3, 1, new int[0]);
|
||||
world.playSound((EntityPlayer) null, x, y, z,
|
||||
(net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.enderdragon.ambient")),
|
||||
SoundCategory.NEUTRAL, (float) 1, (float) 1);
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.INSTANT_HEALTH, (int) 0, (int) 6, (false), (false)));
|
||||
}
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureHyperJumpStickRightClickedInAir extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureHyperJumpStickRightClickedInAir(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 230);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure HyperJumpStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("itemstack") == null) {
|
||||
System.err.println("Failed to load dependency itemstack for procedure HyperJumpStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure HyperJumpStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure HyperJumpStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure HyperJumpStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure HyperJumpStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
ItemStack itemstack = (ItemStack) dependencies.get("itemstack");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).getCooldownTracker().setCooldown(((itemstack)).getItem(), (int) 100);
|
||||
{
|
||||
ItemStack _ist = (itemstack);
|
||||
if (_ist.attemptDamageItem((int) 1, new Random(), null)) {
|
||||
_ist.shrink(1);
|
||||
_ist.setItemDamage(0);
|
||||
}
|
||||
}
|
||||
if (world instanceof WorldServer)
|
||||
((WorldServer) world).spawnParticle(EnumParticleTypes.DRAGON_BREATH, x, y, z, (int) 60, 3, 3, 3, 1, new int[0]);
|
||||
if (world instanceof WorldServer)
|
||||
((WorldServer) world).spawnParticle(EnumParticleTypes.LAVA, x, y, z, (int) 60, 3, 3, 3, 1, new int[0]);
|
||||
world.playSound((EntityPlayer) null, x, y, z,
|
||||
(net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.enderdragon.ambient")),
|
||||
SoundCategory.NEUTRAL, (float) 1, (float) 1);
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.JUMP_BOOST, (int) 80, (int) 40, (false), (false)));
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemKiwanoSeeds;
|
||||
import net.paladrill.paladrillmod.block.BlockKiwanoStage0;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureKiwanoRightClickedOnBlock extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureKiwanoRightClickedOnBlock(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 189);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure KiwanoRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure KiwanoRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure KiwanoRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure KiwanoRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure KiwanoRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((((entity instanceof EntityLivingBase) ? ((EntityLivingBase) entity).getHeldItemMainhand() : ItemStack.EMPTY)
|
||||
.getItem() == new ItemStack(ItemKiwanoSeeds.block, (int) (1)).getItem())
|
||||
&& (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState().getBlock())
|
||||
&& (((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR.getDefaultState()
|
||||
.getBlock())
|
||||
|| (((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR.getDefaultState()
|
||||
.getBlock())
|
||||
|| ((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR
|
||||
.getDefaultState().getBlock())))))) {
|
||||
world.setBlockState(new BlockPos((int) x, (int) (y + 1), (int) z), BlockKiwanoStage0.block.getDefaultState(), 3);
|
||||
if ((!((entity instanceof EntityPlayer) ? ((EntityPlayer) entity).capabilities.isCreativeMode : false))) {
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).inventory.clearMatchingItems(new ItemStack(ItemKiwanoSeeds.block, (int) (1)).getItem(), -1, (int) 1,
|
||||
null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemKiwanoSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemKiwano;
|
||||
import net.paladrill.paladrillmod.block.BlockKiwanoStage4;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureKiwanoStage0BlockDestroyByPlayer extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureKiwanoStage0BlockDestroyByPlayer(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 191);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure KiwanoStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure KiwanoStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure KiwanoStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure KiwanoStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockKiwanoStage4.block.getDefaultState().getBlock())) {
|
||||
world.destroyBlock(new BlockPos((int) x, (int) y, (int) z), false);
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwano.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
world.destroyBlock(new BlockPos((int) x, (int) y, (int) z), false);
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwanoSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemKiwanoSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemKiwano;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureKiwanoStage0BlockDestroyByPlayerBlockDestroyedByPlayer extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureKiwanoStage0BlockDestroyByPlayerBlockDestroyedByPlayer(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 237);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure KiwanoStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure KiwanoStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure KiwanoStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure KiwanoStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((Math.random() < 0.3)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwanoSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwano.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemKiwanoSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.block.BlockKiwanoStage4;
|
||||
import net.paladrill.paladrillmod.block.BlockKiwanoStage3;
|
||||
import net.paladrill.paladrillmod.block.BlockKiwanoStage2;
|
||||
import net.paladrill.paladrillmod.block.BlockKiwanoStage1;
|
||||
import net.paladrill.paladrillmod.block.BlockKiwanoStage0;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureKiwanoStage0UpdateTick extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureKiwanoStage0UpdateTick(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 190);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure KiwanoStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure KiwanoStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure KiwanoStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure KiwanoStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockKiwanoStage3.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockKiwanoStage4.block.getDefaultState(), 3);
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockKiwanoStage2.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockKiwanoStage3.block.getDefaultState(), 3);
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockKiwanoStage1.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockKiwanoStage2.block.getDefaultState(), 3);
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockKiwanoStage0.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockKiwanoStage1.block.getDefaultState(), 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureLegendaryStoneOfPowerRightClickedInAir extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureLegendaryStoneOfPowerRightClickedInAir(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 265);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure LegendaryStoneOfPowerRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("itemstack") == null) {
|
||||
System.err.println("Failed to load dependency itemstack for procedure LegendaryStoneOfPowerRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
ItemStack itemstack = (ItemStack) dependencies.get("itemstack");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.REGENERATION, (int) 240, (int) 3, (true), (true)));
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, (int) 240, (int) 4, (true), (true)));
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).getCooldownTracker().setCooldown(((itemstack)).getItem(), (int) 192000);
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureLengendaryStoneOfTeleportationRightClickedInAir extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureLengendaryStoneOfTeleportationRightClickedInAir(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 267);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.Teleporter;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureNetherCommandExecuted extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureNetherCommandExecuted(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 241);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure NetherCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure NetherCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure NetherCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure NetherCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure NetherCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((entity.canUseCommand((int) 4, ""))) {
|
||||
{
|
||||
Entity _ent = entity;
|
||||
if (!_ent.world.isRemote && !_ent.isRiding() && !_ent.isBeingRidden() && _ent instanceof EntityPlayerMP) {
|
||||
int dimensionID = -1;
|
||||
class TeleporterDirect extends Teleporter {
|
||||
public TeleporterDirect(WorldServer worldserver) {
|
||||
super(worldserver);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void placeInPortal(Entity entity, float yawrotation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean placeInExistingPortal(Entity entity, float yawrotation) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean makePortal(Entity entity) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
EntityPlayerMP _player = (EntityPlayerMP) _ent;
|
||||
_player.mcServer.getPlayerList().transferPlayerToDimension(_player, dimensionID, new TeleporterDirect(_player.getServerWorld()));
|
||||
_player.connection.setPlayerLocation(DimensionManager.getWorld(dimensionID).getSpawnPoint().getX(),
|
||||
DimensionManager.getWorld(dimensionID).getSpawnPoint().getY() + 1,
|
||||
DimensionManager.getWorld(dimensionID).getSpawnPoint().getZ(), _player.rotationYaw, _player.rotationPitch);
|
||||
}
|
||||
}
|
||||
world.playSound((EntityPlayer) null, x, y, z, (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY
|
||||
.getObject(new ResourceLocation("entity.endermen.teleport")), SoundCategory.NEUTRAL, (float) 1, (float) 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiSeeds;
|
||||
import net.paladrill.paladrillmod.block.BlockOkamiStage0;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureOkamiRightClickedOnBlock extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureOkamiRightClickedOnBlock(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 278);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure OkamiRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure OkamiRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure OkamiRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure OkamiRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure OkamiRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((((entity instanceof EntityLivingBase) ? ((EntityLivingBase) entity).getHeldItemMainhand() : ItemStack.EMPTY)
|
||||
.getItem() == new ItemStack(ItemOkamiSeeds.block, (int) (1)).getItem())
|
||||
&& (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState().getBlock())
|
||||
&& (((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR.getDefaultState()
|
||||
.getBlock())
|
||||
|| (((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR.getDefaultState()
|
||||
.getBlock())
|
||||
|| ((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR
|
||||
.getDefaultState().getBlock())))))) {
|
||||
world.setBlockState(new BlockPos((int) x, (int) (y + 1), (int) z), BlockOkamiStage0.block.getDefaultState(), 3);
|
||||
if ((!((entity instanceof EntityPlayer) ? ((EntityPlayer) entity).capabilities.isCreativeMode : false))) {
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).inventory.clearMatchingItems(new ItemStack(ItemOkamiSeeds.block, (int) (1)).getItem(), -1, (int) 1, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiFruit;
|
||||
import net.paladrill.paladrillmod.block.BlockOkamiStage3;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureOkamiStage0BlockDestroyByPlayer extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureOkamiStage0BlockDestroyByPlayer(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 275);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure OkamiStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure OkamiStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure OkamiStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure OkamiStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockOkamiStage3.block.getDefaultState().getBlock())) {
|
||||
world.destroyBlock(new BlockPos((int) x, (int) y, (int) z), false);
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiFruit.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
world.destroyBlock(new BlockPos((int) x, (int) y, (int) z), false);
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiFruit;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureOkamiStage0BlockDestroyByPlayerBlockDestroyedByPlayer extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureOkamiStage0BlockDestroyByPlayerBlockDestroyedByPlayer(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 277);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure OkamiStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure OkamiStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure OkamiStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure OkamiStage0BlockDestroyByPlayerBlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((Math.random() < 0.3)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiFruit.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.block.BlockOkamiStage3;
|
||||
import net.paladrill.paladrillmod.block.BlockOkamiStage2;
|
||||
import net.paladrill.paladrillmod.block.BlockOkamiStage1;
|
||||
import net.paladrill.paladrillmod.block.BlockOkamiStage0;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureOkamiStage0UpdateTick extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureOkamiStage0UpdateTick(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 274);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure OkamiStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure OkamiStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure OkamiStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure OkamiStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockOkamiStage2.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockOkamiStage3.block.getDefaultState(), 3);
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockOkamiStage1.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockOkamiStage2.block.getDefaultState(), 3);
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockOkamiStage0.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockOkamiStage1.block.getDefaultState(), 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiFruit;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureOkamiStage3Casser extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureOkamiStage3Casser(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 279);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure OkamiStage3Casser!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure OkamiStage3Casser!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure OkamiStage3Casser!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure OkamiStage3Casser!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
world.destroyBlock(new BlockPos((int) x, (int) y, (int) z), false);
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiFruit.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOkamiSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemOrangeBlueSeeds;
|
||||
import net.paladrill.paladrillmod.block.BlockOrangeBlueStage0;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureOrangeBlueRightClickedOnBlock extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureOrangeBlueRightClickedOnBlock(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 207);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure OrangeBlueRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure OrangeBlueRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure OrangeBlueRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure OrangeBlueRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure OrangeBlueRightClickedOnBlock!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((((entity instanceof EntityLivingBase) ? ((EntityLivingBase) entity).getHeldItemMainhand() : ItemStack.EMPTY)
|
||||
.getItem() == new ItemStack(ItemOrangeBlueSeeds.block, (int) (1)).getItem())
|
||||
&& (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == Blocks.FARMLAND.getDefaultState().getBlock())
|
||||
&& (((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR.getDefaultState()
|
||||
.getBlock())
|
||||
|| (((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR.getDefaultState()
|
||||
.getBlock())
|
||||
|| ((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.AIR
|
||||
.getDefaultState().getBlock())))))) {
|
||||
world.setBlockState(new BlockPos((int) x, (int) (y + 1), (int) z), BlockOrangeBlueStage0.block.getDefaultState(), 3);
|
||||
if ((!((entity instanceof EntityPlayer) ? ((EntityPlayer) entity).capabilities.isCreativeMode : false))) {
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).inventory.clearMatchingItems(new ItemStack(ItemOrangeBlueSeeds.block, (int) (1)).getItem(), -1, (int) 1,
|
||||
null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemOrangeBlueSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemOrangeBlueFruit;
|
||||
import net.paladrill.paladrillmod.block.BlockOrangeBlueStage4;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureOrangeBlueStage0BlockDestroyByPlayer extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureOrangeBlueStage0BlockDestroyByPlayer(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 205);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure OrangeBlueStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure OrangeBlueStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure OrangeBlueStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure OrangeBlueStage0BlockDestroyByPlayer!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
{
|
||||
Map<String, Object> $_dependencies = new HashMap<>();
|
||||
$_dependencies.put("x", x);
|
||||
$_dependencies.put("y", y);
|
||||
$_dependencies.put("z", z);
|
||||
$_dependencies.put("world", world);
|
||||
ProcedureOrangeBlueStage4BlockDestroyedByPlayer.executeProcedure($_dependencies);
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockOrangeBlueStage4.block.getDefaultState().getBlock())) {
|
||||
world.destroyBlock(new BlockPos((int) x, (int) y, (int) z), false);
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOrangeBlueFruit.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
world.destroyBlock(new BlockPos((int) x, (int) y, (int) z), false);
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOrangeBlueSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.block.BlockOrangeBlueStage4;
|
||||
import net.paladrill.paladrillmod.block.BlockOrangeBlueStage3;
|
||||
import net.paladrill.paladrillmod.block.BlockOrangeBlueStage2;
|
||||
import net.paladrill.paladrillmod.block.BlockOrangeBlueStage1;
|
||||
import net.paladrill.paladrillmod.block.BlockOrangeBlueStage0;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureOrangeBlueStage0UpdateTick extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureOrangeBlueStage0UpdateTick(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 208);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure OrangeBlueStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure OrangeBlueStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure OrangeBlueStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure OrangeBlueStage0UpdateTick!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockOrangeBlueStage3.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockOrangeBlueStage4.block.getDefaultState(), 3);
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockOrangeBlueStage2.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockOrangeBlueStage3.block.getDefaultState(), 3);
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockOrangeBlueStage1.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockOrangeBlueStage2.block.getDefaultState(), 3);
|
||||
}
|
||||
if (((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock() == BlockOrangeBlueStage0.block.getDefaultState().getBlock())) {
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) z));
|
||||
world.setBlockState(new BlockPos((int) x, (int) y, (int) z), BlockOrangeBlueStage1.block.getDefaultState(), 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemEndiumNugget;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureOrangeBlueStage4BlockDestroyedByPlayer extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureOrangeBlueStage4BlockDestroyedByPlayer(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 201);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure OrangeBlueStage4BlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure OrangeBlueStage4BlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure OrangeBlueStage4BlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure OrangeBlueStage4BlockDestroyedByPlayer!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((Math.random() < 0.05)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemEndiumNugget.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemOrangeBlueSeeds;
|
||||
import net.paladrill.paladrillmod.item.ItemOrangeBlueFruit;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureOrangeBlueStage4BlockDestroyedByPlayer2 extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureOrangeBlueStage4BlockDestroyedByPlayer2(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 238);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure OrangeBlueStage4BlockDestroyedByPlayer2!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure OrangeBlueStage4BlockDestroyedByPlayer2!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure OrangeBlueStage4BlockDestroyedByPlayer2!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure OrangeBlueStage4BlockDestroyedByPlayer2!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((Math.random() < 0.3)) {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOrangeBlueSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOrangeBlueFruit.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
} else {
|
||||
if (!world.isRemote) {
|
||||
EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(ItemOrangeBlueSeeds.block, (int) (1)));
|
||||
entityToSpawn.setPickupDelay(10);
|
||||
world.spawnEntity(entityToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.Teleporter;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureOverworldCommandExecuted extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureOverworldCommandExecuted(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 245);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure OverworldCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure OverworldCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure OverworldCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure OverworldCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure OverworldCommandExecuted!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((entity.canUseCommand((int) 4, ""))) {
|
||||
{
|
||||
Entity _ent = entity;
|
||||
if (!_ent.world.isRemote && !_ent.isRiding() && !_ent.isBeingRidden() && _ent instanceof EntityPlayerMP) {
|
||||
int dimensionID = 0;
|
||||
class TeleporterDirect extends Teleporter {
|
||||
public TeleporterDirect(WorldServer worldserver) {
|
||||
super(worldserver);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void placeInPortal(Entity entity, float yawrotation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean placeInExistingPortal(Entity entity, float yawrotation) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean makePortal(Entity entity) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
EntityPlayerMP _player = (EntityPlayerMP) _ent;
|
||||
_player.mcServer.getPlayerList().transferPlayerToDimension(_player, dimensionID, new TeleporterDirect(_player.getServerWorld()));
|
||||
_player.connection.setPlayerLocation(DimensionManager.getWorld(dimensionID).getSpawnPoint().getX(),
|
||||
DimensionManager.getWorld(dimensionID).getSpawnPoint().getY() + 1,
|
||||
DimensionManager.getWorld(dimensionID).getSpawnPoint().getZ(), _player.rotationYaw, _player.rotationPitch);
|
||||
}
|
||||
}
|
||||
world.playSound((EntityPlayer) null, x, y, z, (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY
|
||||
.getObject(new ResourceLocation("entity.endermen.teleport")), SoundCategory.NEUTRAL, (float) 1, (float) 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedurePalaAppleFoodEaten extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedurePalaAppleFoodEaten(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 164);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure PalaAppleFoodEaten!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.INSTANT_HEALTH, (int) 90, (int) 1, (false), (false)));
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.STRENGTH, (int) 80, (int) 1, (false), (false)));
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedurePaladiumArmorBodyTickEvent extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedurePaladiumArmorBodyTickEvent(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 148);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure PaladiumArmorBodyTickEvent!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.STRENGTH, (int) 70, (int) 3, (false), (false)));
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedurePaladiumArmorBootsTickEvent extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedurePaladiumArmorBootsTickEvent(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 150);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure PaladiumArmorBootsTickEvent!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.REGENERATION, (int) 80, (int) 1, (false), (false)));
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedurePaladiumArmorHelmetTickEvent extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedurePaladiumArmorHelmetTickEvent(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 147);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure PaladiumArmorHelmetTickEvent!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, (int) 860, (int) 1, (false), (false)));
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedurePaladiumArmorLeggingsTickEvent extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedurePaladiumArmorLeggingsTickEvent(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 149);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure PaladiumArmorLeggingsTickEvent!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, (int) 90, (int) 3, (false), (false)));
|
||||
}
|
||||
}
|
||||
+264
@@ -0,0 +1,264 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemTitaneIngot;
|
||||
import net.paladrill.paladrillmod.item.ItemPaladiumIngot;
|
||||
import net.paladrill.paladrillmod.item.ItemOrangeBlueFruit;
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiFruit;
|
||||
import net.paladrill.paladrillmod.item.ItemKiwano;
|
||||
import net.paladrill.paladrillmod.item.ItemEndiumNugget;
|
||||
import net.paladrill.paladrillmod.item.ItemEggPlantFruit;
|
||||
import net.paladrill.paladrillmod.item.ItemAmethystIngot;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.tileentity.TileEntityLockableLoot;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedurePaladiumCrusherGenerateButton extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedurePaladiumCrusherGenerateButton(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 204);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure PaladiumCrusherGenerateButton!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure PaladiumCrusherGenerateButton!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure PaladiumCrusherGenerateButton!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure PaladiumCrusherGenerateButton!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (0))).getItem() == new ItemStack(ItemOrangeBlueFruit.block, (int) (1))
|
||||
.getItem())) {
|
||||
if ((Math.random() < (new Object() {
|
||||
public double getValue(BlockPos pos, String tag) {
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
if (tileEntity != null)
|
||||
return tileEntity.getTileData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(new BlockPos((int) x, (int) y, (int) z), "luck")))) {
|
||||
{
|
||||
TileEntity inv = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (inv != null && (inv instanceof TileEntityLockableLoot)) {
|
||||
ItemStack _setstack = new ItemStack(ItemEndiumNugget.block, (int) (1));
|
||||
_setstack.setCount(((new Object() {
|
||||
public int getAmount(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot) {
|
||||
ItemStack stack = ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (2))) + 1));
|
||||
((TileEntityLockableLoot) inv).setInventorySlotContents((int) (2), _setstack);
|
||||
}
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
BlockPos _bp = new BlockPos((int) x, (int) y, (int) z);
|
||||
TileEntity _tileEntity = world.getTileEntity(_bp);
|
||||
IBlockState _bs = world.getBlockState(_bp);
|
||||
if (_tileEntity != null)
|
||||
_tileEntity.getTileData().setDouble("luck", 0);
|
||||
world.notifyBlockUpdate(_bp, _bs, _bs, 3);
|
||||
}
|
||||
} else {
|
||||
if (!world.isRemote) {
|
||||
BlockPos _bp = new BlockPos((int) x, (int) y, (int) z);
|
||||
TileEntity _tileEntity = world.getTileEntity(_bp);
|
||||
IBlockState _bs = world.getBlockState(_bp);
|
||||
if (_tileEntity != null)
|
||||
_tileEntity.getTileData().setDouble("luck", 0);
|
||||
world.notifyBlockUpdate(_bp, _bs, _bs, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (0))).getItem() == new ItemStack(ItemKiwano.block, (int) (1)).getItem())) {
|
||||
if ((Math.random() < (new Object() {
|
||||
public double getValue(BlockPos pos, String tag) {
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
if (tileEntity != null)
|
||||
return tileEntity.getTileData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(new BlockPos((int) x, (int) y, (int) z), "luck")))) {
|
||||
{
|
||||
TileEntity inv = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (inv != null && (inv instanceof TileEntityLockableLoot)) {
|
||||
ItemStack _setstack = new ItemStack(ItemPaladiumIngot.block, (int) (1));
|
||||
_setstack.setCount(((new Object() {
|
||||
public int getAmount(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot) {
|
||||
ItemStack stack = ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (2))) + 1));
|
||||
((TileEntityLockableLoot) inv).setInventorySlotContents((int) (2), _setstack);
|
||||
}
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
BlockPos _bp = new BlockPos((int) x, (int) y, (int) z);
|
||||
TileEntity _tileEntity = world.getTileEntity(_bp);
|
||||
IBlockState _bs = world.getBlockState(_bp);
|
||||
if (_tileEntity != null)
|
||||
_tileEntity.getTileData().setDouble("luck", 0);
|
||||
world.notifyBlockUpdate(_bp, _bs, _bs, 3);
|
||||
}
|
||||
} else {
|
||||
if (!world.isRemote) {
|
||||
BlockPos _bp = new BlockPos((int) x, (int) y, (int) z);
|
||||
TileEntity _tileEntity = world.getTileEntity(_bp);
|
||||
IBlockState _bs = world.getBlockState(_bp);
|
||||
if (_tileEntity != null)
|
||||
_tileEntity.getTileData().setDouble("luck", 0);
|
||||
world.notifyBlockUpdate(_bp, _bs, _bs, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (0))).getItem() == new ItemStack(ItemEggPlantFruit.block, (int) (1))
|
||||
.getItem())) {
|
||||
if ((Math.random() < (new Object() {
|
||||
public double getValue(BlockPos pos, String tag) {
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
if (tileEntity != null)
|
||||
return tileEntity.getTileData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(new BlockPos((int) x, (int) y, (int) z), "luck")))) {
|
||||
{
|
||||
TileEntity inv = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (inv != null && (inv instanceof TileEntityLockableLoot)) {
|
||||
ItemStack _setstack = new ItemStack(ItemAmethystIngot.block, (int) (1));
|
||||
_setstack.setCount(((new Object() {
|
||||
public int getAmount(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot) {
|
||||
ItemStack stack = ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (2))) + 1));
|
||||
((TileEntityLockableLoot) inv).setInventorySlotContents((int) (2), _setstack);
|
||||
}
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
BlockPos _bp = new BlockPos((int) x, (int) y, (int) z);
|
||||
TileEntity _tileEntity = world.getTileEntity(_bp);
|
||||
IBlockState _bs = world.getBlockState(_bp);
|
||||
if (_tileEntity != null)
|
||||
_tileEntity.getTileData().setDouble("luck", 0);
|
||||
world.notifyBlockUpdate(_bp, _bs, _bs, 3);
|
||||
}
|
||||
} else {
|
||||
if (!world.isRemote) {
|
||||
BlockPos _bp = new BlockPos((int) x, (int) y, (int) z);
|
||||
TileEntity _tileEntity = world.getTileEntity(_bp);
|
||||
IBlockState _bs = world.getBlockState(_bp);
|
||||
if (_tileEntity != null)
|
||||
_tileEntity.getTileData().setDouble("luck", 0);
|
||||
world.notifyBlockUpdate(_bp, _bs, _bs, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (0))).getItem() == new ItemStack(ItemOkamiFruit.block, (int) (1)).getItem())) {
|
||||
if ((Math.random() < (new Object() {
|
||||
public double getValue(BlockPos pos, String tag) {
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
if (tileEntity != null)
|
||||
return tileEntity.getTileData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(new BlockPos((int) x, (int) y, (int) z), "luck")))) {
|
||||
{
|
||||
TileEntity inv = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (inv != null && (inv instanceof TileEntityLockableLoot)) {
|
||||
ItemStack _setstack = new ItemStack(ItemTitaneIngot.block, (int) (1));
|
||||
_setstack.setCount(((new Object() {
|
||||
public int getAmount(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot) {
|
||||
ItemStack stack = ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (2))) + 1));
|
||||
((TileEntityLockableLoot) inv).setInventorySlotContents((int) (2), _setstack);
|
||||
}
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
BlockPos _bp = new BlockPos((int) x, (int) y, (int) z);
|
||||
TileEntity _tileEntity = world.getTileEntity(_bp);
|
||||
IBlockState _bs = world.getBlockState(_bp);
|
||||
if (_tileEntity != null)
|
||||
_tileEntity.getTileData().setDouble("luck", 0);
|
||||
world.notifyBlockUpdate(_bp, _bs, _bs, 3);
|
||||
}
|
||||
} else {
|
||||
if (!world.isRemote) {
|
||||
BlockPos _bp = new BlockPos((int) x, (int) y, (int) z);
|
||||
TileEntity _tileEntity = world.getTileEntity(_bp);
|
||||
IBlockState _bs = world.getBlockState(_bp);
|
||||
if (_tileEntity != null)
|
||||
_tileEntity.getTileData().setDouble("luck", 0);
|
||||
world.notifyBlockUpdate(_bp, _bs, _bs, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemPalaMixedCoal;
|
||||
import net.paladrill.paladrillmod.item.ItemOrangeBlueFruit;
|
||||
import net.paladrill.paladrillmod.item.ItemOkamiFruit;
|
||||
import net.paladrill.paladrillmod.item.ItemKiwano;
|
||||
import net.paladrill.paladrillmod.item.ItemEggPlantFruit;
|
||||
import net.paladrill.paladrillmod.item.ItemCreativeMixedCoal;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.tileentity.TileEntityLockableLoot;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedurePaladiumCrusherUpdateTick extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedurePaladiumCrusherUpdateTick(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 203);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure PaladiumCrusherUpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure PaladiumCrusherUpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure PaladiumCrusherUpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure PaladiumCrusherUpdateTick!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
double fuelAmount = 0;
|
||||
double orangeBlueAmount = 0;
|
||||
double chance = 0;
|
||||
if (((((new Object() {
|
||||
public int getAmount(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot) {
|
||||
ItemStack stack = ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (0))) >= 1) && ((new Object() {
|
||||
public int getAmount(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot) {
|
||||
ItemStack stack = ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (1))) >= 1)) && ((((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (0))).getItem() == new ItemStack(ItemOrangeBlueFruit.block, (int) (1))
|
||||
.getItem()) || (((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (0))).getItem() == new ItemStack(ItemKiwano.block, (int) (1)).getItem())
|
||||
|| (((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (0)))
|
||||
.getItem() == new ItemStack(ItemOkamiFruit.block, (int) (1)).getItem()) || ((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (0)))
|
||||
.getItem() == new ItemStack(ItemEggPlantFruit.block, (int) (1)).getItem()))))
|
||||
&& ((((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (1))).getItem() == new ItemStack(ItemPalaMixedCoal.block, (int) (1))
|
||||
.getItem()) || ((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (1)))
|
||||
.getItem() == new ItemStack(ItemCreativeMixedCoal.block, (int) (1)).getItem()))
|
||||
&& ((new Object() {
|
||||
public double getValue(BlockPos pos, String tag) {
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
if (tileEntity != null)
|
||||
return tileEntity.getTileData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(new BlockPos((int) x, (int) y, (int) z), "luck")) < 1))))) {
|
||||
{
|
||||
TileEntity inv = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
((TileEntityLockableLoot) inv).decrStackSize((int) (0), (int) (1));
|
||||
}
|
||||
if (((!((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (1))).getItem() == new ItemStack(ItemCreativeMixedCoal.block, (int) (1))
|
||||
.getItem())) && (Math.random() < 0.2))) {
|
||||
{
|
||||
TileEntity inv = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
((TileEntityLockableLoot) inv).decrStackSize((int) (1), (int) (1));
|
||||
}
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
BlockPos _bp = new BlockPos((int) x, (int) y, (int) z);
|
||||
TileEntity _tileEntity = world.getTileEntity(_bp);
|
||||
IBlockState _bs = world.getBlockState(_bp);
|
||||
if (_tileEntity != null)
|
||||
_tileEntity.getTileData().setDouble("luck", ((new Object() {
|
||||
public double getValue(BlockPos pos, String tag) {
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
if (tileEntity != null)
|
||||
return tileEntity.getTileData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(new BlockPos((int) x, (int) y, (int) z), "luck")) + 0.0078125));
|
||||
world.notifyBlockUpdate(_bp, _bs, _bs, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemPaladiumIngot;
|
||||
import net.paladrill.paladrillmod.block.BlockPaladiumOre;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.tileentity.TileEntityLockableLoot;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedurePaladiumFurnaceUpdateTick extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedurePaladiumFurnaceUpdateTick(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 183);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure PaladiumFurnaceUpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure PaladiumFurnaceUpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure PaladiumFurnaceUpdateTick!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure PaladiumFurnaceUpdateTick!");
|
||||
return;
|
||||
}
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((((new Object() {
|
||||
public int getAmount(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot) {
|
||||
ItemStack stack = ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (2))) < 64) && ((((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (0))).getItem() == new ItemStack(BlockPaladiumOre.block, (int) (1)).getItem())
|
||||
&& ((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (1))).getItem() == new ItemStack(Items.COAL, (int) (1), 0).getItem()))
|
||||
&& ((((new Object() {
|
||||
public int getAmount(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot) {
|
||||
ItemStack stack = ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (16))) <= 63) && ((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (2))).getItem() == new ItemStack(ItemPaladiumIngot.block, (int) (1))
|
||||
.getItem())) || ((new Object() {
|
||||
public ItemStack getItemStack(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
return ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}.getItemStack(new BlockPos((int) x, (int) y, (int) z), (int) (2))).getItem() == new ItemStack(Blocks.AIR, (int) (1))
|
||||
.getItem()))))) {
|
||||
{
|
||||
TileEntity inv = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
((TileEntityLockableLoot) inv).decrStackSize((int) (0), (int) (1));
|
||||
}
|
||||
{
|
||||
TileEntity inv = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (inv instanceof TileEntityLockableLoot)
|
||||
((TileEntityLockableLoot) inv).decrStackSize((int) (1), (int) (1));
|
||||
}
|
||||
{
|
||||
TileEntity inv = world.getTileEntity(new BlockPos((int) x, (int) y, (int) z));
|
||||
if (inv != null && (inv instanceof TileEntityLockableLoot)) {
|
||||
ItemStack _setstack = new ItemStack(ItemPaladiumIngot.block, (int) (1));
|
||||
_setstack.setCount(((new Object() {
|
||||
public int getAmount(BlockPos pos, int sltid) {
|
||||
TileEntity inv = world.getTileEntity(pos);
|
||||
if (inv instanceof TileEntityLockableLoot) {
|
||||
ItemStack stack = ((TileEntityLockableLoot) inv).getStackInSlot(sltid);
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(new BlockPos((int) x, (int) y, (int) z), (int) (2))) + 1));
|
||||
((TileEntityLockableLoot) inv).setInventorySlotContents((int) (2), _setstack);
|
||||
}
|
||||
}
|
||||
world.playSound((EntityPlayer) null, x, y, z, (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY
|
||||
.getObject(new ResourceLocation("block.furnace.fire_crackle")), SoundCategory.NEUTRAL, (float) 1, (float) 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
+219
@@ -0,0 +1,219 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedurePaladiumHammerBlockDestroyedWithTool extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedurePaladiumHammerBlockDestroyedWithTool(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 167);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure PaladiumHammerBlockDestroyedWithTool!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure PaladiumHammerBlockDestroyedWithTool!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure PaladiumHammerBlockDestroyedWithTool!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure PaladiumHammerBlockDestroyedWithTool!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure PaladiumHammerBlockDestroyedWithTool!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if ((((entity.rotationPitch) > 40) || ((entity.rotationPitch) < (-40)))) {
|
||||
if ((((world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x + 1), (int) y, (int) z));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x - 1), (int) y, (int) z));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) (z + 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) (z + 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) (z + 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) (z + 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x + 1), (int) y, (int) (z + 1)));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) (z - 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) (z - 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) (z - 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) (z - 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x + 1), (int) y, (int) (z - 1)));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) (z - 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) (z - 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) (z - 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) (z - 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x - 1), (int) y, (int) (z - 1)));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) (z + 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) (z + 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) (z + 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) (z + 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x - 1), (int) y, (int) (z + 1)));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) y, (int) (z + 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) y, (int) (z + 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) y, (int) (z + 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) y, (int) (z + 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) (z + 1)));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) y, (int) (z - 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) y, (int) (z - 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) y, (int) (z - 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) y, (int) (z - 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) (z - 1)));
|
||||
}
|
||||
} else if ((((entity.getHorizontalFacing()) == EnumFacing.NORTH) || ((entity.getHorizontalFacing()) == EnumFacing.SOUTH))) {
|
||||
if ((((world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x + 1), (int) y, (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x + 1), (int) y, (int) z));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x - 1), (int) y, (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x - 1), (int) y, (int) z));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) (x + 1), (int) (y + 1), (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x + 1), (int) (y + 1), (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x + 1), (int) (y + 1), (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x + 1), (int) (y + 1), (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x + 1), (int) (y + 1), (int) z));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) (x + 1), (int) (y - 1), (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x + 1), (int) (y - 1), (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x + 1), (int) (y - 1), (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x + 1), (int) (y - 1), (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x + 1), (int) (y - 1), (int) z));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) (x - 1), (int) (y - 1), (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x - 1), (int) (y - 1), (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x - 1), (int) (y - 1), (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x - 1), (int) (y - 1), (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x - 1), (int) (y - 1), (int) z));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) (x - 1), (int) (y + 1), (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) (x - 1), (int) (y + 1), (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) (x - 1), (int) (y + 1), (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) (x - 1), (int) (y + 1), (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) (x - 1), (int) (y + 1), (int) z));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) (y + 1), (int) z));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) (y - 1), (int) z));
|
||||
}
|
||||
} else if ((((entity.getHorizontalFacing()) == EnumFacing.WEST) || ((entity.getHorizontalFacing()) == EnumFacing.EAST))) {
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) y, (int) (z + 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) y, (int) (z + 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) y, (int) (z + 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) y, (int) (z + 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) (z + 1)));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) y, (int) (z - 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) y, (int) (z - 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) y, (int) (z - 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) y, (int) (z - 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) y, (int) (z - 1)));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) (z + 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) (z + 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) (z + 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) (z + 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) (y + 1), (int) (z + 1)));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) (z + 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) (z + 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) (z + 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) (z + 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) (y - 1), (int) (z + 1)));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) (z - 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) (z - 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) (z - 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) (z - 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) (y - 1), (int) (z - 1)));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) (z - 1)))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) (z - 1)))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) (z - 1))).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) (z - 1))), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) (y + 1), (int) (z - 1)));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) (y + 1), (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) (y + 1), (int) z));
|
||||
}
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getMaterial() == Material.ROCK)
|
||||
&& (!((world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z))).getBlock() == Blocks.BEDROCK.getDefaultState()
|
||||
.getBlock())))) {
|
||||
world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z)).getBlock().dropBlockAsItem(world,
|
||||
new BlockPos((int) x, (int) y, (int) z), world.getBlockState(new BlockPos((int) x, (int) (y - 1), (int) z)), 1);
|
||||
world.setBlockToAir(new BlockPos((int) x, (int) (y - 1), (int) z));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1183
File diff suppressed because it is too large
Load Diff
+25
@@ -0,0 +1,25 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedurePickaxeOfTheGodLevel25BlockDestroyedWithTool extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedurePickaxeOfTheGodLevel25BlockDestroyedWithTool(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 308);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure PickaxeOfTheGodLevel25BlockDestroyedWithTool!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).addExperience((int) 1);
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedurePickaxeOfTheGodLevel25ToolInHandTick extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedurePickaxeOfTheGodLevel25ToolInHandTick(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 307);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure PickaxeOfTheGodLevel25ToolInHandTick!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.SPEED, (int) 8, (int) 2, (false), (false)));
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.HASTE, (int) 3, (int) 3, (false), (false)));
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureSlimePadEntityCollidesInTheBlock extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureSlimePadEntityCollidesInTheBlock(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 248);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure SlimePadEntityCollidesInTheBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure SlimePadEntityCollidesInTheBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure SlimePadEntityCollidesInTheBlock!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure SlimePadEntityCollidesInTheBlock!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
entity.setPositionAndUpdate(x, (y + 2), z);
|
||||
}
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureSpeedStickRightClickedInAir extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureSpeedStickRightClickedInAir(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 239);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure SpeedStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("itemstack") == null) {
|
||||
System.err.println("Failed to load dependency itemstack for procedure SpeedStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure SpeedStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure SpeedStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure SpeedStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure SpeedStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
ItemStack itemstack = (ItemStack) dependencies.get("itemstack");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).getCooldownTracker().setCooldown(((itemstack)).getItem(), (int) 100);
|
||||
{
|
||||
ItemStack _ist = (itemstack);
|
||||
if (_ist.attemptDamageItem((int) 1, new Random(), null)) {
|
||||
_ist.shrink(1);
|
||||
_ist.setItemDamage(0);
|
||||
}
|
||||
}
|
||||
if (world instanceof WorldServer)
|
||||
((WorldServer) world).spawnParticle(EnumParticleTypes.DRAGON_BREATH, x, y, z, (int) 60, 3, 3, 3, 1, new int[0]);
|
||||
if (world instanceof WorldServer)
|
||||
((WorldServer) world).spawnParticle(EnumParticleTypes.LAVA, x, y, z, (int) 60, 3, 3, 3, 1, new int[0]);
|
||||
world.playSound((EntityPlayer) null, x, y, z,
|
||||
(net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.enderdragon.ambient")),
|
||||
SoundCategory.NEUTRAL, (float) 1, (float) 1);
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.SPEED, (int) 80, (int) 40, (false), (false)));
|
||||
}
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureStickOfGodRightClickedInAir extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureStickOfGodRightClickedInAir(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 227);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure StickOfGodRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("itemstack") == null) {
|
||||
System.err.println("Failed to load dependency itemstack for procedure StickOfGodRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure StickOfGodRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure StickOfGodRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure StickOfGodRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure StickOfGodRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
ItemStack itemstack = (ItemStack) dependencies.get("itemstack");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).getCooldownTracker().setCooldown(((itemstack)).getItem(), (int) 100);
|
||||
{
|
||||
ItemStack _ist = (itemstack);
|
||||
if (_ist.attemptDamageItem((int) 1, new Random(), null)) {
|
||||
_ist.shrink(1);
|
||||
_ist.setItemDamage(0);
|
||||
}
|
||||
}
|
||||
if (world instanceof WorldServer)
|
||||
((WorldServer) world).spawnParticle(EnumParticleTypes.DRAGON_BREATH, x, y, z, (int) 60, 3, 3, 3, 1, new int[0]);
|
||||
if (world instanceof WorldServer)
|
||||
((WorldServer) world).spawnParticle(EnumParticleTypes.LAVA, x, y, z, (int) 60, 3, 3, 3, 1, new int[0]);
|
||||
world.playSound((EntityPlayer) null, x, y, z,
|
||||
(net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.enderdragon.ambient")),
|
||||
SoundCategory.NEUTRAL, (float) 1, (float) 1);
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.SPEED, (int) 60, (int) 5, (false), (false)));
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.STRENGTH, (int) 80, (int) 2, (false), (false)));
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.SATURATION, (int) 240, (int) 2, (false), (false)));
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.REGENERATION, (int) 60, (int) 1, (false), (false)));
|
||||
}
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureStrenghStickRightClickedInAir extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureStrenghStickRightClickedInAir(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 228);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure StrenghStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("itemstack") == null) {
|
||||
System.err.println("Failed to load dependency itemstack for procedure StrenghStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure StrenghStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure StrenghStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure StrenghStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure StrenghStickRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
ItemStack itemstack = (ItemStack) dependencies.get("itemstack");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).getCooldownTracker().setCooldown(((itemstack)).getItem(), (int) 100);
|
||||
{
|
||||
ItemStack _ist = (itemstack);
|
||||
if (_ist.attemptDamageItem((int) 1, new Random(), null)) {
|
||||
_ist.shrink(1);
|
||||
_ist.setItemDamage(0);
|
||||
}
|
||||
}
|
||||
if (world instanceof WorldServer)
|
||||
((WorldServer) world).spawnParticle(EnumParticleTypes.CRIT_MAGIC, x, y, z, (int) 60, 3, 3, 3, 1, new int[0]);
|
||||
if (world instanceof WorldServer)
|
||||
((WorldServer) world).spawnParticle(EnumParticleTypes.CRIT, x, y, z, (int) 60, 3, 3, 3, 1, new int[0]);
|
||||
world.playSound((EntityPlayer) null, x, y, z,
|
||||
(net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.wither.shoot")),
|
||||
SoundCategory.NEUTRAL, (float) 1, (float) 1);
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.STRENGTH, (int) 60, (int) 3, (false), (false)));
|
||||
}
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureWeightedBootsBootsTickEvent extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureWeightedBootsBootsTickEvent(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 250);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure WeightedBootsBootsTickEvent!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("itemstack") == null) {
|
||||
System.err.println("Failed to load dependency itemstack for procedure WeightedBootsBootsTickEvent!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("x") == null) {
|
||||
System.err.println("Failed to load dependency x for procedure WeightedBootsBootsTickEvent!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("y") == null) {
|
||||
System.err.println("Failed to load dependency y for procedure WeightedBootsBootsTickEvent!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("z") == null) {
|
||||
System.err.println("Failed to load dependency z for procedure WeightedBootsBootsTickEvent!");
|
||||
return;
|
||||
}
|
||||
if (dependencies.get("world") == null) {
|
||||
System.err.println("Failed to load dependency world for procedure WeightedBootsBootsTickEvent!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
ItemStack itemstack = (ItemStack) dependencies.get("itemstack");
|
||||
int x = (int) dependencies.get("x");
|
||||
int y = (int) dependencies.get("y");
|
||||
int z = (int) dependencies.get("z");
|
||||
World world = (World) dependencies.get("world");
|
||||
boolean logique = false;
|
||||
double number = 0;
|
||||
number = (double) 0;
|
||||
if ((((world.getBlockState(new BlockPos((int) x, (int) (y - 3), (int) z))).getMaterial() == Material.AIR)
|
||||
&& (entity instanceof EntityPlayer))) {
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, (int) 10, (int) 15, (false), (false)));
|
||||
if (entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.LEVITATION, (int) 10, (int) (-75), (false), (false)));
|
||||
number = (double) 0;
|
||||
} else {
|
||||
number = (double) 1;
|
||||
if (((!((world.getBlockState(new BlockPos((int) x, (int) (y - 2), (int) z))).getMaterial() == Material.AIR))
|
||||
&& (((number) == 1) && ((entity instanceof EntityPlayer) && ((entity.motionY) < (-2)))))) {
|
||||
if (!world.isRemote) {
|
||||
world.createExplosion(null, (int) x, (int) y, (int) z, (float) (Math.abs((entity.motionY)) + 0.25), true);
|
||||
}
|
||||
if (entity instanceof EntityPlayer && !entity.world.isRemote) {
|
||||
((EntityPlayer) entity).sendStatusMessage(new TextComponentString(("" + ("\u00A7l\u00A7cEXPLOSION !!!!"))), (true));
|
||||
}
|
||||
number = (double) 0;
|
||||
{
|
||||
ItemStack _ist = (itemstack);
|
||||
if (_ist.attemptDamageItem((int) 1, new Random(), null)) {
|
||||
_ist.shrink(1);
|
||||
_ist.setItemDamage(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemXpBerries;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureXpBerriesRightClickedInAir extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureXpBerriesRightClickedInAir(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 146);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure XpBerriesRightClickedInAir!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).addExperience((int) 38);
|
||||
if (entity instanceof EntityPlayer)
|
||||
((EntityPlayer) entity).inventory.clearMatchingItems(new ItemStack(ItemXpBerries.block, (int) (1)).getItem(), -1, (int) 1, null);
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package net.paladrill.paladrillmod.procedure;
|
||||
|
||||
import net.paladrill.paladrillmod.item.ItemXpBerries;
|
||||
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
||||
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ElementsPaladrillmodMod.ModElement.Tag
|
||||
public class ProcedureXpBushPlantRightClicked extends ElementsPaladrillmodMod.ModElement {
|
||||
public ProcedureXpBushPlantRightClicked(ElementsPaladrillmodMod instance) {
|
||||
super(instance, 145);
|
||||
}
|
||||
|
||||
public static void executeProcedure(Map<String, Object> dependencies) {
|
||||
if (dependencies.get("entity") == null) {
|
||||
System.err.println("Failed to load dependency entity for procedure XpBushPlantRightClicked!");
|
||||
return;
|
||||
}
|
||||
Entity entity = (Entity) dependencies.get("entity");
|
||||
if (entity instanceof EntityPlayer) {
|
||||
ItemStack _setstack = new ItemStack(ItemXpBerries.block, (int) (1));
|
||||
_setstack.setCount(1);
|
||||
ItemHandlerHelper.giveItemToPlayer(((EntityPlayer) entity), _setstack);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user