Skip to content

Commit

Permalink
added a few things but not final
Browse files Browse the repository at this point in the history
  • Loading branch information
MelanX committed Jun 10, 2019
1 parent 77307d2 commit d456dd4
Show file tree
Hide file tree
Showing 44 changed files with 562 additions and 164 deletions.
Expand Up @@ -13,7 +13,7 @@ public ultimatoolsTab() {

@Override
public ItemStack getTabIconItem() {
return new ItemStack(ModItems.crystalGay);
return new ItemStack(ModItems.crystalUltimaGod);
}

}
76 changes: 51 additions & 25 deletions src/main/java/de/melanx/ultimatools/items/ModItems.java
@@ -1,35 +1,61 @@
package de.melanx.ultimatools.items;

import de.melanx.ultimatools.items.crystals.*;
import de.melanx.ultimatools.items.crystals.casual.*;
import de.melanx.ultimatools.items.crystals.krypto.*;

public class ModItems {

public static CrystalCyan crystalCyan;
public static CrystalLime crystalLime;
public static CrystalGreen crystalGreen;
public static CrystalBronze crystalBronze;
public static CrystalSilver crystalSilver;
public static CrystalGold crystalGold;
public static CrystalPurple crystalPurple;
public static CrystalPink crystalPink;
public static CrystalRainbow crystalRainbow;
public static CrystalBlack crystalBlack;
public static CrystalGay crystalGay;
public static CrystalGray crystalGray;
// casual
public static CrystalBeginner crystalBeginner;
public static CrystalScholar crystalScholar;
public static CrystalFarmer crystalFarmer;
public static CrystalForestRunner crystalForestRunner;
public static CrystalKnight crystalKnight;
public static CrystalLighter crystalLighter;
public static CrystalSoothsayer crystalSoothsayer;
public static CrystalBloodMagician crystalBloodMagician;
public static CrystalUltimaFighter crystalUltimaFighter;
public static CrystalCursedKnight crystalCursedKnight;
public static CrystalUltimaGod crystalUltimaGod;
public static CrystalOreBetter crystalOreBetter;

// krypto
public static KryptoBeginner kryptoBeginner;
public static KryptoScholar kryptoScholar;
public static KryptoFarmer kryptoFarmer;
// public static KryptoForestRunner kryptoForestRunner;
// public static KryptoKnight kryptoKnight;
// public static KryptoLighter kryptoLighter;
public static KryptoSoothsayer kryptoSoothsayer;
public static KryptoBloodMagician kryptoBloodMagician;
public static KryptoCursedKnight kryptoCursedKnight;

public static void init() {
crystalCyan = new CrystalCyan();
crystalLime = new CrystalLime();
crystalGreen = new CrystalGreen();
crystalBronze = new CrystalBronze();
crystalSilver = new CrystalSilver();
crystalGold = new CrystalGold();
crystalPurple = new CrystalPurple();
crystalPink = new CrystalPink();
crystalRainbow = new CrystalRainbow();
crystalBlack = new CrystalBlack();
crystalGay = new CrystalGay();
crystalGray = new CrystalGray();

// casual
crystalBeginner = new CrystalBeginner();
crystalScholar = new CrystalScholar();
crystalFarmer = new CrystalFarmer();
crystalForestRunner = new CrystalForestRunner();
crystalKnight = new CrystalKnight();
crystalLighter = new CrystalLighter();
crystalSoothsayer = new CrystalSoothsayer();
crystalBloodMagician = new CrystalBloodMagician();
crystalUltimaFighter = new CrystalUltimaFighter();
crystalCursedKnight = new CrystalCursedKnight();
crystalUltimaGod = new CrystalUltimaGod();
crystalOreBetter = new CrystalOreBetter();

// krypto
kryptoBeginner = new KryptoBeginner();
kryptoScholar = new KryptoScholar();
kryptoFarmer = new KryptoFarmer();
// kryptoForestRunner = new KryptoForestRunner();


kryptoSoothsayer = new KryptoSoothsayer();
kryptoBloodMagician = new KryptoBloodMagician();
kryptoCursedKnight = new KryptoCursedKnight();
}

}

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,5 +1,6 @@
package de.melanx.ultimatools.items.crystals;
package de.melanx.ultimatools.items.crystals.casual;

import de.melanx.ultimatools.items.crystals.CrystalBase;
import de.melanx.ultimatools.util.ToolUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
Expand All @@ -14,9 +15,9 @@

import javax.annotation.Nonnull;

public class CrystalCyan extends CrystalBase {
public class CrystalBeginner extends CrystalBase {

public CrystalCyan() {
public CrystalBeginner() {
super("beginner");
}

Expand All @@ -35,7 +36,8 @@ public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos
BlockPos placePos = hitPos.offset(mop.sideHit);
if(player.canPlayerEdit(placePos, mop.sideHit, stack)) {
if (((ItemBucket) Items.WATER_BUCKET).tryPlaceContainedLiquid(player, world, placePos)) {
player.getCooldownTracker().setCooldown(this, ToolUtil.COOLDOWN);
if(!player.isCreative())
player.getCooldownTracker().setCooldown(this, ToolUtil.COOLDOWN);
return EnumActionResult.SUCCESS;
}
}
Expand Down
@@ -1,5 +1,6 @@
package de.melanx.ultimatools.items.crystals;
package de.melanx.ultimatools.items.crystals.casual;

import de.melanx.ultimatools.items.crystals.CrystalBase;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.*;
import net.minecraft.entity.player.EntityPlayer;
Expand All @@ -12,9 +13,9 @@

import java.util.Random;

public class CrystalPink extends CrystalBase {
public class CrystalBloodMagician extends CrystalBase {

public CrystalPink() {
public CrystalBloodMagician() {
super("blood_magician");
}

Expand Down Expand Up @@ -76,7 +77,8 @@ public EnumActionResult onItemUse(EntityPlayer playerIn, World worldIn, BlockPos
entitySheep.setLocationAndAngles(pos.getX() + hitX, pos.getY() + hitY, pos.getZ() + hitZ, 0, 0);
worldIn.spawnEntity(entitySheep);
}
playerIn.getCooldownTracker().setCooldown(this, 6000);
if(!playerIn.isCreative())
playerIn.getCooldownTracker().setCooldown(this, 6000);
return EnumActionResult.SUCCESS;
}
}
Expand Down
@@ -1,15 +1,16 @@
package de.melanx.ultimatools.items.crystals;
package de.melanx.ultimatools.items.crystals.casual;

import de.melanx.ultimatools.items.crystals.CrystalBase;
import de.melanx.ultimatools.util.ToolUtil;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumHand;

public class CrystalBlack extends CrystalBase {
public class CrystalCursedKnight extends CrystalBase {

public CrystalBlack() {
public CrystalCursedKnight() {
super("cursed_knight");
}

Expand All @@ -20,7 +21,8 @@ public CrystalBlack() {
public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer player, EntityLivingBase living, EnumHand hand) {
if(living.isEntityAlive() && !player.getCooldownTracker().hasCooldown(this)) {
living.attackEntityFrom(DamageSource.MAGIC, DAMAGE);
player.getCooldownTracker().setCooldown(this, ToolUtil.COOLDOWN);
if(!player.isCreative())
player.getCooldownTracker().setCooldown(this, ToolUtil.COOLDOWN);
return true;
}
return false;
Expand Down
@@ -1,5 +1,6 @@
package de.melanx.ultimatools.items.crystals;
package de.melanx.ultimatools.items.crystals.casual;

import de.melanx.ultimatools.items.crystals.CrystalBase;
import de.melanx.ultimatools.util.ToolUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumActionResult;
Expand All @@ -8,9 +9,9 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class CrystalGreen extends CrystalBase {
public class CrystalFarmer extends CrystalBase {

public CrystalGreen() {
public CrystalFarmer() {
super("farmer");
}

Expand Down
@@ -0,0 +1,12 @@
package de.melanx.ultimatools.items.crystals.casual;

import de.melanx.ultimatools.items.crystals.CrystalBase;

public class CrystalForestRunner extends CrystalBase {

public CrystalForestRunner() {
super("forest_runner");
setContainerItem(this);
}

}
@@ -0,0 +1,12 @@
package de.melanx.ultimatools.items.crystals.casual;

import de.melanx.ultimatools.items.crystals.CrystalBase;

public class CrystalKnight extends CrystalBase {

public CrystalKnight() {
super("knight");
setContainerItem(this);
}

}
@@ -0,0 +1,12 @@
package de.melanx.ultimatools.items.crystals.casual;

import de.melanx.ultimatools.items.crystals.CrystalBase;

public class CrystalLighter extends CrystalBase {

public CrystalLighter() {
super("lighter");
setContainerItem(this);
}

}
@@ -1,21 +1,22 @@
package de.melanx.ultimatools.items.crystals;
package de.melanx.ultimatools.items.crystals.casual;

import de.melanx.ultimatools.util.ToolUtil;
import de.melanx.ultimatools.items.crystals.CrystalBase;
import de.melanx.ultimatools.util.ChangeBlocks;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class CrystalGray extends CrystalBase {
public class CrystalOreBetter extends CrystalBase {

public CrystalGray() {
public CrystalOreBetter() {
super("ore_better");
}

public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
return ToolUtil.upgradeOre(player, worldIn, pos, hand);
return ChangeBlocks.upgradeOre(player, worldIn, pos, hand);
}

}
@@ -1,6 +1,7 @@
package de.melanx.ultimatools.items.crystals;
package de.melanx.ultimatools.items.crystals.casual;

import de.melanx.ultimatools.util.ToolUtil;
import de.melanx.ultimatools.items.crystals.CrystalBase;
import de.melanx.ultimatools.util.ChangeBlocks;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
Expand All @@ -10,16 +11,16 @@

import javax.annotation.Nonnull;

public class CrystalLime extends CrystalBase {
public class CrystalScholar extends CrystalBase {

public CrystalLime() {
public CrystalScholar() {
super("scholar");
}

@Nonnull
@Override
public EnumActionResult onItemUse(EntityPlayer player, @Nonnull World world, BlockPos pos, @Nonnull EnumHand hand, @Nonnull EnumFacing side, float hitX, float hitY, float hitZ) {
return ToolUtil.replace(player, world, pos, hand);
return ChangeBlocks.dirtToGrass(player, world, pos, hand);
}

}
@@ -1,7 +1,7 @@
package de.melanx.ultimatools.items.crystals;
package de.melanx.ultimatools.items.crystals.casual;

import de.melanx.ultimatools.items.crystals.CrystalBase;
import de.melanx.ultimatools.util.ToolUtil;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
Expand All @@ -12,9 +12,9 @@

import java.util.Random;

public class CrystalPurple extends CrystalBase {
public class CrystalSoothsayer extends CrystalBase {

public CrystalPurple() {
public CrystalSoothsayer() {
super("soothsayer");
}

Expand All @@ -39,7 +39,8 @@ else if(x==3)
living.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, DURATION));
else if(x==4)
living.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, DURATION, 4));
player.getCooldownTracker().setCooldown(this, ToolUtil.COOLDOWN);
if(!player.isCreative())
player.getCooldownTracker().setCooldown(this, ToolUtil.COOLDOWN);
return true;
}
return false;
Expand Down
@@ -1,6 +1,7 @@
package de.melanx.ultimatools.items.crystals;
package de.melanx.ultimatools.items.crystals.casual;

import de.melanx.ultimatools.util.ToolUtil;
import de.melanx.ultimatools.items.crystals.CrystalBase;
import de.melanx.ultimatools.util.ChangeBlocks;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
Expand All @@ -10,16 +11,16 @@

import javax.annotation.Nonnull;

public class CrystalRainbow extends CrystalBase {
public class CrystalUltimaFighter extends CrystalBase {

public CrystalRainbow() {
public CrystalUltimaFighter() {
super("ultima_fighter");
}

@Nonnull
@Override
public EnumActionResult onItemUse(EntityPlayer player, @Nonnull World world, BlockPos pos, @Nonnull EnumHand hand, @Nonnull EnumFacing side, float hitX, float hitY, float hitZ) {
return ToolUtil.generateOre(player, world, pos, hand);
return ChangeBlocks.generateOre(player, world, pos, hand);
}

}

0 comments on commit d456dd4

Please sign in to comment.