finish later
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package net.arcmods.ryantlg.items.metalItems;
|
package net.arcmods.ryantlg.items.metalItems;
|
||||||
|
|
||||||
import net.arcmods.ryantlg.gamermod;
|
import net.arcmods.ryantlg.gamermod;
|
||||||
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
|
import net.minecraft.item.FoodComponent;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.Rarity;
|
import net.minecraft.util.Rarity;
|
||||||
@@ -8,7 +10,23 @@ import net.minecraft.util.registry.Registry;
|
|||||||
|
|
||||||
public class jeremiumMetals {
|
public class jeremiumMetals {
|
||||||
|
|
||||||
public static final Item JEREMIUM = new Item(new Item.Settings().fireproof().group(gamermod.CHING).maxCount(128).rarity(Rarity.EPIC));
|
public static final Item JEREMIUM = new Item(new Item.Settings().fireproof().group(gamermod.CHING).maxCount(64).rarity(Rarity.UNCOMMON));
|
||||||
|
public static final Item RAW_JEREMIUM = new Item(new Item.Settings()
|
||||||
|
.fireproof()
|
||||||
|
.group(gamermod.CHING)
|
||||||
|
.maxCount(64)
|
||||||
|
.rarity(Rarity.UNCOMMON)
|
||||||
|
.food(
|
||||||
|
new FoodComponent
|
||||||
|
.Builder()
|
||||||
|
.hunger(11)
|
||||||
|
.saturationModifier(013f)
|
||||||
|
.alwaysEdible()
|
||||||
|
.meat()
|
||||||
|
.snack()
|
||||||
|
.statusEffect(new StatusEffectInstance(StatusEffects.LEVITATION, 20*7), 1f)
|
||||||
|
.build()
|
||||||
|
));
|
||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
Registry.register(Registry.ITEM, new Identifier("gamermod", "jeremium_ingot"), JEREMIUM);
|
Registry.register(Registry.ITEM, new Identifier("gamermod", "jeremium_ingot"), JEREMIUM);
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package net.arcmods.ryantlg.statusEffects.effectClasses;
|
||||||
|
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
import net.minecraft.entity.effect.StatusEffect;
|
||||||
|
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
|
||||||
|
public class jeremydStatusEffect extends StatusEffect{
|
||||||
|
|
||||||
|
public jeremydStatusEffect() {
|
||||||
|
super(
|
||||||
|
StatusEffectCategory.BENEFICIAL,
|
||||||
|
0x3dad51
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canApplyUpdateEffect(int duration, int amplifier) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void applyUpdateEffect(LivingEntity entity, int amplifier) {
|
||||||
|
if (entity instanceof PlayerEntity) {
|
||||||
|
((PlayerEntity) entity).addExperience(0 << amplifier);
|
||||||
|
((PlayerEntity) entity).getFallSounds();
|
||||||
|
((PlayerEntity) entity).disableShield(true);
|
||||||
|
((PlayerEntity) entity).dismountVehicle();
|
||||||
|
((PlayerEntity) entity).damage(DamageSource.FALL, (float) 0.01);
|
||||||
|
((PlayerEntity) entity).heal(3 << amplifier);
|
||||||
|
((PlayerEntity) entity).getFallSounds();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user