fix notch delay
This commit is contained in:
parent
fc913a0f4e
commit
8ab4e6ba90
@ -8,9 +8,6 @@ import net.minecraft.util.ActionResult;
|
|||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.TypedActionResult;
|
import net.minecraft.util.TypedActionResult;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
@ -31,11 +28,6 @@ public class fragileHeartCharm extends Item {
|
|||||||
Playerentity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
|
Playerentity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
|
||||||
Playerentity.addStatusEffect(new StatusEffectInstance(StatusEffects.HEALTH_BOOST, 20*1000000, 2));
|
Playerentity.addStatusEffect(new StatusEffectInstance(StatusEffects.HEALTH_BOOST, 20*1000000, 2));
|
||||||
Playerentity.getMainHandStack().damage(50,Playerentity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
Playerentity.getMainHandStack().damage(50,Playerentity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
||||||
try {
|
|
||||||
TimeUnit.SECONDS.sleep(100);
|
|
||||||
} catch (InterruptedException e1) {
|
|
||||||
e1.printStackTrace();
|
|
||||||
}
|
|
||||||
availableSlots++;
|
availableSlots++;
|
||||||
|
|
||||||
} else if (availableSlots < 1) {
|
} else if (availableSlots < 1) {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
@ -29,11 +27,6 @@ public class fragileStrengthCharm extends Item{
|
|||||||
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
|
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
|
||||||
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, 20*1000000, 2));
|
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, 20*1000000, 2));
|
||||||
PlayerEntity.getMainHandStack().damage(50,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
PlayerEntity.getMainHandStack().damage(50,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
||||||
try {
|
|
||||||
TimeUnit.SECONDS.sleep(5);
|
|
||||||
} catch (InterruptedException e1) {
|
|
||||||
e1.printStackTrace();
|
|
||||||
}
|
|
||||||
availableSlots++;
|
availableSlots++;
|
||||||
|
|
||||||
} else if (availableSlots < 1) {
|
} else if (availableSlots < 1) {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@ -28,11 +26,6 @@ public class kingsoul extends Item {
|
|||||||
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
|
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
|
||||||
PlayerEntity.getHungerManager().add(1, 1);
|
PlayerEntity.getHungerManager().add(1, 1);
|
||||||
PlayerEntity.getMainHandStack().damage(1,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
PlayerEntity.getMainHandStack().damage(1,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
||||||
try {
|
|
||||||
TimeUnit.SECONDS.sleep(5);
|
|
||||||
} catch (InterruptedException e1) {
|
|
||||||
e1.printStackTrace();
|
|
||||||
}
|
|
||||||
availableSlots++;
|
availableSlots++;
|
||||||
|
|
||||||
} else if (availableSlots < 1) {
|
} else if (availableSlots < 1) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
@ -30,11 +27,6 @@ public class stalwartShell extends Item{
|
|||||||
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
|
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
|
||||||
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.RESISTANCE, 20, 5));
|
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.RESISTANCE, 20, 5));
|
||||||
PlayerEntity.getMainHandStack().damage(1,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
PlayerEntity.getMainHandStack().damage(1,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
||||||
try {
|
|
||||||
TimeUnit.SECONDS.sleep(15);
|
|
||||||
} catch (InterruptedException e1) {
|
|
||||||
e1.printStackTrace();
|
|
||||||
}
|
|
||||||
availableSlots++;
|
availableSlots++;
|
||||||
|
|
||||||
} else if (availableSlots < 1) {
|
} else if (availableSlots < 1) {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@ -17,6 +19,11 @@ public class totemOfEquivalency extends Item {
|
|||||||
@Override
|
@Override
|
||||||
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
|
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
|
||||||
PlayerEntity.kill();
|
PlayerEntity.kill();
|
||||||
|
try {
|
||||||
|
TimeUnit.SECONDS.sleep(10);
|
||||||
|
} catch (InterruptedException e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
@ -26,13 +24,8 @@ public class unbreakableHeartCharm extends Item {
|
|||||||
|
|
||||||
if (availableSlots > 0) {
|
if (availableSlots > 0) {
|
||||||
availableSlots--;
|
availableSlots--;
|
||||||
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
|
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + " charm notches left."), false);
|
||||||
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.HEALTH_BOOST, 20*1000000, 4));
|
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.HEALTH_BOOST, 20*1000000, 4));
|
||||||
try {
|
|
||||||
TimeUnit.SECONDS.sleep(5);
|
|
||||||
} catch (InterruptedException e1) {
|
|
||||||
e1.printStackTrace();
|
|
||||||
}
|
|
||||||
availableSlots++;
|
availableSlots++;
|
||||||
|
|
||||||
} else if (availableSlots < 1) {
|
} else if (availableSlots < 1) {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
@ -28,11 +26,6 @@ public class unbreakableStrengthCharm extends Item {
|
|||||||
availableSlots--;
|
availableSlots--;
|
||||||
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
|
PlayerEntity.sendMessage(new LiteralText("You have " + availableSlots + "charm notches left."), false);
|
||||||
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, 20*1000000, 3));
|
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, 20*1000000, 3));
|
||||||
try {
|
|
||||||
TimeUnit.SECONDS.sleep(5);
|
|
||||||
} catch (InterruptedException e1) {
|
|
||||||
e1.printStackTrace();
|
|
||||||
}
|
|
||||||
availableSlots++;
|
availableSlots++;
|
||||||
|
|
||||||
} else if (availableSlots < 1) {
|
} else if (availableSlots < 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user