Infernal Beef
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "acesbs:item/infernal_beef"
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,7 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "acesbs:raw_entropy"
|
||||
"name": "acesbs:raw_endtropy"
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "acesbs:raw_entropy"
|
||||
"name": "acesbs:infernal_ashes"
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
|
||||
@@ -72,6 +72,7 @@ public class ModModelProvider extends FabricModelProvider {
|
||||
public void generateItemModels(ItemModelGenerator itemModelGenerator) {
|
||||
itemModelGenerator.register(ModItems.COOKED_LEMON, Models.GENERATED);
|
||||
itemModelGenerator.register(ModItems.LEMON, Models.GENERATED);
|
||||
itemModelGenerator.register(ModItems.INFERNAL_BEEF, Models.GENERATED);
|
||||
itemModelGenerator.register(ModItems.TOBACCO, Models.GENERATED);
|
||||
itemModelGenerator.register(ModItems.RAW_ENTROPY, Models.GENERATED);
|
||||
itemModelGenerator.register(ModItems.STABLE_ENTROPY, Models.GENERATED);
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.acethewildfire.acesbs.effect;
|
||||
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.effect.StatusEffect;
|
||||
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class InfernalFireEffect extends StatusEffect {
|
||||
protected InfernalFireEffect(StatusEffectCategory category, int color) {
|
||||
super(category, color);
|
||||
}
|
||||
|
||||
Random r = new Random();
|
||||
|
||||
@Override
|
||||
public boolean applyUpdateEffect(LivingEntity entity, int amplifier) {
|
||||
entity.setOnFireFor(1);
|
||||
|
||||
if (entity.isTouchingWater()){
|
||||
double randomVelocityX = r.nextDouble(-0.5, 0.5);
|
||||
double randomVelocityY = r.nextDouble(0.5, 1.0);
|
||||
double randomVelocityZ = r.nextDouble(-0.5, 0.5);
|
||||
entity.addVelocity(randomVelocityX, randomVelocityY, randomVelocityZ);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyUpdateEffect(int duration, int amplifier) {
|
||||
return duration >= 19;
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,10 @@ public class ModEffects {
|
||||
new LemonEffect(StatusEffectCategory.HARMFUL, 0xfae640)
|
||||
.addAttributeModifier(EntityAttributes.GENERIC_MOVEMENT_SPEED, Identifier.of(AcesBS.MOD_ID, "lemon"),
|
||||
-0.75F, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL));
|
||||
public static final RegistryEntry<StatusEffect> INFERNAL_FIRE = registerStatusEffect("infernal_fire",
|
||||
new InfernalFireEffect(StatusEffectCategory.HARMFUL, 0x963830)
|
||||
.addAttributeModifier(EntityAttributes.GENERIC_MOVEMENT_SPEED, Identifier.of(AcesBS.MOD_ID, "infernal_fire"),
|
||||
1F, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL));
|
||||
|
||||
private static RegistryEntry<StatusEffect> registerStatusEffect (String name, StatusEffect effect){
|
||||
return Registry.registerReference(Registries.STATUS_EFFECT, Identifier.of(AcesBS.MOD_ID, name), effect);
|
||||
|
||||
@@ -16,4 +16,11 @@ public class ModFoodComponent {
|
||||
.nutrition(6)
|
||||
.saturationModifier(0.5f)
|
||||
.build();
|
||||
|
||||
public static final FoodComponent INFERNAL_BEEF = new FoodComponent.Builder()
|
||||
.nutrition(20)
|
||||
.saturationModifier(0.5f)
|
||||
.statusEffect(new StatusEffectInstance(ModEffects.INFERNAL_FIRE, 200), 0.2f)
|
||||
.alwaysEdible()
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ public class ModItemGroups {
|
||||
entries.add(ModItems.PRISMA_STEEL);
|
||||
entries.add(ModItems.LEMON);
|
||||
entries.add(ModItems.COOKED_LEMON);
|
||||
entries.add(ModItems.INFERNAL_BEEF);
|
||||
entries.add(ModItems.ORACLE_LEMON);
|
||||
entries.add(ModItems.GREEN_BRICKS);
|
||||
entries.add(ModItems.CRAB_RAVE_MUSIC_DISC);
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.acethewildfire.acesbs.item;
|
||||
|
||||
import com.acethewildfire.acesbs.AcesBS;
|
||||
import com.acethewildfire.acesbs.block.ModBlocks;
|
||||
import com.acethewildfire.acesbs.effect.ModEffects;
|
||||
import com.acethewildfire.acesbs.entity.ModEntities;
|
||||
import com.acethewildfire.acesbs.item.custom.HammerItem;
|
||||
import com.acethewildfire.acesbs.item.custom.ModArmorItem;
|
||||
@@ -11,10 +12,7 @@ import com.acethewildfire.acesbs.potion.ModPotions;
|
||||
import com.acethewildfire.acesbs.sounds.ModSounds;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.component.DataComponentTypes;
|
||||
import net.minecraft.component.type.AttributeModifierSlot;
|
||||
import net.minecraft.component.type.AttributeModifiersComponent;
|
||||
import net.minecraft.component.type.FoodComponent;
|
||||
import net.minecraft.component.type.PotionContentsComponent;
|
||||
import net.minecraft.component.type.*;
|
||||
import net.minecraft.entity.attribute.EntityAttribute;
|
||||
import net.minecraft.entity.attribute.EntityAttributeModifier;
|
||||
import net.minecraft.entity.attribute.EntityAttributes;
|
||||
@@ -28,6 +26,7 @@ import net.minecraft.registry.Registry;
|
||||
import net.minecraft.registry.entry.RegistryEntry;
|
||||
import net.minecraft.resource.featuretoggle.FeatureFlags;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import java.util.List;
|
||||
@@ -40,6 +39,17 @@ public class ModItems {
|
||||
public static final Item RAW_ENDTROPY = registerItem("raw_endtropy", new Item(new Item.Settings()));
|
||||
public static final Item STABLE_ENDTROPY = registerItem("stable_endtropy", new Item(new Item.Settings()));
|
||||
public static final Item INFERNAL_ASHES = registerItem("infernal_ashes", new Item(new Item.Settings()));
|
||||
public static final Item INFERNAL_BEEF = registerItem("infernal_beef",
|
||||
new Item(new Item.Settings()
|
||||
.food(ModFoodComponent.INFERNAL_BEEF)
|
||||
.fireproof()
|
||||
.component(DataComponentTypes.LORE, new LoreComponent(
|
||||
List.of(
|
||||
Text.literal("Brimstone fed").formatted(Formatting.DARK_RED, Formatting.ITALIC),
|
||||
Text.literal("Non-holy").formatted(Formatting.DARK_RED, Formatting.ITALIC)
|
||||
)
|
||||
))
|
||||
));
|
||||
public static final Item LEMON = registerItem("lemon", new Item(new Item.Settings().food(ModFoodComponent.LEMON)));
|
||||
public static final Item COOKED_LEMON = registerItem("cooked_lemon", new Item(new Item.Settings().food(ModFoodComponent.COOKED_LEMON)));
|
||||
public static final Item GREEN_BRICKS = registerItem("green_bricks", new Item(new Item.Settings()) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"item.acesbs.raw_endtropy": "Raw Endtropy",
|
||||
"item.acesbs.stable_endtropy": "Stabilized Endtropy",
|
||||
"item.acesbs.lemon": "Odd Lemon",
|
||||
"item.acesbs.infernal_beef": "Infernal Beef",
|
||||
"item.acesbs.cooked_lemon": "Cooked Odd Lemon",
|
||||
"item.acesbs.green_bricks": "Green Bricks",
|
||||
"item.acesbs.wand": "Entropy Wand",
|
||||
@@ -15,6 +16,7 @@
|
||||
"item.minecraft.lingering_potion.effect.blindness": "Lingering Potion of Blindness",
|
||||
"item.minecraft.tipped_arrow.effect.blindness": "Arrow of Blindness",
|
||||
|
||||
"effect.acesbs.infernal_fire": "Infernal Fire",
|
||||
"effect.acesbs.lemon": "Puckered",
|
||||
"item.minecraft.potion.effect.lemon": "Potion of Puckered",
|
||||
"item.minecraft.splash_potion.effect.lemon": "Splash Potion of Puckered",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
Reference in New Issue
Block a user