Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package mod.mcreator;
- import net.minecraft.world.World;
- import net.minecraft.item.ItemStack;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.item.EntityItem;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.entity.Entity;
- import java.util.HashMap;
- public class mcreator_generalMobDropP extends testenvironmentmod.ModElement {
- public static void executeProcedure(java.util.HashMap<String, Object> dependencies) {
- if (dependencies.get("entity") == null) {
- System.err.println("Failed to load dependency entity for procedure generalMobDropP!");
- return;
- }
- if (dependencies.get("x") == null) {
- System.err.println("Failed to load dependency x for procedure generalMobDropP!");
- return;
- }
- if (dependencies.get("y") == null) {
- System.err.println("Failed to load dependency y for procedure generalMobDropP!");
- return;
- }
- if (dependencies.get("z") == null) {
- System.err.println("Failed to load dependency z for procedure generalMobDropP!");
- return;
- }
- if (dependencies.get("world") == null) {
- System.err.println("Failed to load dependency world for procedure generalMobDropP!");
- 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 ((Math.random() < 0.005)) {
- if (!world.isRemote) {
- EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(mcreator_redOrb.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(mcreator_orangeOrb.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(mcreator_yellowOrb.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(mcreator_greenOrb.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(mcreator_lightBlueOrb.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(mcreator_blueOrb.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(mcreator_purpleOrb.block, (int) (1)));
- entityToSpawn.setPickupDelay(10);
- world.spawnEntity(entityToSpawn);
- }
- }
- if (((entity instanceof EntityLivingBase)
- ? ((EntityPlayer) entity).inventory.hasItemStack(new ItemStack(mcreator_orbRadar.block, (int) (1)))
- : false)) {
- if ((Math.random() < 0.01)) {
- if (!world.isRemote) {
- EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(mcreator_redOrb.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(mcreator_orangeOrb.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(mcreator_yellowOrb.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(mcreator_greenOrb.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(mcreator_lightBlueOrb.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(mcreator_blueOrb.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(mcreator_purpleOrb.block, (int) (1)));
- entityToSpawn.setPickupDelay(10);
- world.spawnEntity(entityToSpawn);
- }
- }
- }
- if (((entity instanceof EntityLivingBase) ? ((EntityPlayer) entity).inventory.hasItemStack(new ItemStack(mcreator_orbRadarCosmos.block,
- (int) (1))) : false)) {
- if ((Math.random() < 0.05)) {
- if (!world.isRemote) {
- EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(mcreator_redOrb.block, (int) (1)));
- entityToSpawn.setPickupDelay(10);
- world.spawnEntity(entityToSpawn);
- }
- }
- if ((Math.random() < 0.05)) {
- if (!world.isRemote) {
- EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(mcreator_orangeOrb.block, (int) (1)));
- entityToSpawn.setPickupDelay(10);
- world.spawnEntity(entityToSpawn);
- }
- }
- if ((Math.random() < 0.05)) {
- if (!world.isRemote) {
- EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(mcreator_yellowOrb.block, (int) (1)));
- entityToSpawn.setPickupDelay(10);
- world.spawnEntity(entityToSpawn);
- }
- }
- if ((Math.random() < 0.05)) {
- if (!world.isRemote) {
- EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(mcreator_greenOrb.block, (int) (1)));
- entityToSpawn.setPickupDelay(10);
- world.spawnEntity(entityToSpawn);
- }
- }
- if ((Math.random() < 0.05)) {
- if (!world.isRemote) {
- EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(mcreator_lightBlueOrb.block, (int) (1)));
- entityToSpawn.setPickupDelay(10);
- world.spawnEntity(entityToSpawn);
- }
- }
- if ((Math.random() < 0.05)) {
- if (!world.isRemote) {
- EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(mcreator_blueOrb.block, (int) (1)));
- entityToSpawn.setPickupDelay(10);
- world.spawnEntity(entityToSpawn);
- }
- }
- if ((Math.random() < 0.05)) {
- if (!world.isRemote) {
- EntityItem entityToSpawn = new EntityItem(world, x, y, z, new ItemStack(mcreator_purpleOrb.block, (int) (1)));
- entityToSpawn.setPickupDelay(10);
- world.spawnEntity(entityToSpawn);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement