This commit is contained in:
Vos
2025-11-11 15:40:34 -06:00
parent 145c86aa2f
commit 734ff0e7d9
22 changed files with 182 additions and 31 deletions
+7 -7
View File
@@ -4,15 +4,15 @@ org.gradle.parallel=true
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/develop # check these on https://fabricmc.net/develop
minecraft_version=1.21 minecraft_version=1.21.1
yarn_mappings=1.21+build.9 yarn_mappings=1.21.1+build.3
loader_version=0.16.14 loader_version=0.17.3
loom_version=1.10-SNAPSHOT loom_version=1.13-SNAPSHOT
# Fabric API
fabric_version=0.116.7+1.21.1
# Mod Properties # Mod Properties
mod_version=1.0.0 mod_version=1.0.0
maven_group=com.acethewildfire.acesbs maven_group=com.acethewildfire.acesbs
archives_base_name=acesbs archives_base_name=acesbs
# Dependencies
fabric_version=0.102.0+1.21
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
@@ -13,7 +13,7 @@
}, },
"has_the_recipe": { "has_the_recipe": {
"conditions": { "conditions": {
"recipe": "minecraft:prisma_steel" "recipe": "acesbs:prisma_steel"
}, },
"trigger": "minecraft:recipe_unlocked" "trigger": "minecraft:recipe_unlocked"
} }
@@ -26,7 +26,7 @@
], ],
"rewards": { "rewards": {
"recipes": [ "recipes": [
"minecraft:prisma_steel" "acesbs:prisma_steel"
] ]
} }
} }
@@ -13,7 +13,7 @@
}, },
"has_the_recipe": { "has_the_recipe": {
"conditions": { "conditions": {
"recipe": "minecraft:raw_entropy" "recipe": "acesbs:raw_entropy"
}, },
"trigger": "minecraft:recipe_unlocked" "trigger": "minecraft:recipe_unlocked"
} }
@@ -26,7 +26,7 @@
], ],
"rewards": { "rewards": {
"recipes": [ "recipes": [
"minecraft:raw_entropy" "acesbs:raw_entropy"
] ]
} }
} }
@@ -13,7 +13,7 @@
}, },
"has_the_recipe": { "has_the_recipe": {
"conditions": { "conditions": {
"recipe": "minecraft:stable_entropy" "recipe": "acesbs:stable_entropy"
}, },
"trigger": "minecraft:recipe_unlocked" "trigger": "minecraft:recipe_unlocked"
} }
@@ -26,7 +26,7 @@
], ],
"rewards": { "rewards": {
"recipes": [ "recipes": [
"minecraft:stable_entropy" "acesbs:stable_entropy"
] ]
} }
} }
@@ -13,7 +13,7 @@
}, },
"has_the_recipe": { "has_the_recipe": {
"conditions": { "conditions": {
"recipe": "minecraft:entropy_block" "recipe": "acesbs:entropy_block"
}, },
"trigger": "minecraft:recipe_unlocked" "trigger": "minecraft:recipe_unlocked"
} }
@@ -26,7 +26,7 @@
], ],
"rewards": { "rewards": {
"recipes": [ "recipes": [
"minecraft:entropy_block" "acesbs:entropy_block"
] ]
} }
} }
@@ -13,7 +13,7 @@
}, },
"has_the_recipe": { "has_the_recipe": {
"conditions": { "conditions": {
"recipe": "minecraft:prisma_steel_block" "recipe": "acesbs:prisma_steel_block"
}, },
"trigger": "minecraft:recipe_unlocked" "trigger": "minecraft:recipe_unlocked"
} }
@@ -26,7 +26,7 @@
], ],
"rewards": { "rewards": {
"recipes": [ "recipes": [
"minecraft:prisma_steel_block" "acesbs:prisma_steel_block"
] ]
} }
} }
@@ -13,7 +13,7 @@
}, },
"has_the_recipe": { "has_the_recipe": {
"conditions": { "conditions": {
"recipe": "minecraft:stable_entropy_block" "recipe": "acesbs:stable_entropy_block"
}, },
"trigger": "minecraft:recipe_unlocked" "trigger": "minecraft:recipe_unlocked"
} }
@@ -26,7 +26,7 @@
], ],
"rewards": { "rewards": {
"recipes": [ "recipes": [
"minecraft:stable_entropy_block" "acesbs:stable_entropy_block"
] ]
} }
} }
@@ -13,7 +13,7 @@
}, },
"has_the_recipe": { "has_the_recipe": {
"conditions": { "conditions": {
"recipe": "minecraft:cooked_lemon_from_campfire_cooking" "recipe": "acesbs:cooked_lemon_from_campfire_cooking"
}, },
"trigger": "minecraft:recipe_unlocked" "trigger": "minecraft:recipe_unlocked"
} }
@@ -26,7 +26,7 @@
], ],
"rewards": { "rewards": {
"recipes": [ "recipes": [
"minecraft:cooked_lemon_from_campfire_cooking" "acesbs:cooked_lemon_from_campfire_cooking"
] ]
} }
} }
@@ -13,7 +13,7 @@
}, },
"has_the_recipe": { "has_the_recipe": {
"conditions": { "conditions": {
"recipe": "minecraft:cooked_lemon_from_smelting" "recipe": "acesbs:cooked_lemon_from_smelting"
}, },
"trigger": "minecraft:recipe_unlocked" "trigger": "minecraft:recipe_unlocked"
} }
@@ -26,7 +26,7 @@
], ],
"rewards": { "rewards": {
"recipes": [ "recipes": [
"minecraft:cooked_lemon_from_smelting" "acesbs:cooked_lemon_from_smelting"
] ]
} }
} }
@@ -13,7 +13,7 @@
}, },
"has_the_recipe": { "has_the_recipe": {
"conditions": { "conditions": {
"recipe": "minecraft:cooked_lemon_from_smoking" "recipe": "acesbs:cooked_lemon_from_smoking"
}, },
"trigger": "minecraft:recipe_unlocked" "trigger": "minecraft:recipe_unlocked"
} }
@@ -26,7 +26,7 @@
], ],
"rewards": { "rewards": {
"recipes": [ "recipes": [
"minecraft:cooked_lemon_from_smoking" "acesbs:cooked_lemon_from_smoking"
] ]
} }
} }
@@ -13,7 +13,7 @@
}, },
"has_the_recipe": { "has_the_recipe": {
"conditions": { "conditions": {
"recipe": "minecraft:stable_entropy_from_blasting_entropy_ore" "recipe": "acesbs:stable_entropy_from_blasting_entropy_ore"
}, },
"trigger": "minecraft:recipe_unlocked" "trigger": "minecraft:recipe_unlocked"
} }
@@ -26,7 +26,7 @@
], ],
"rewards": { "rewards": {
"recipes": [ "recipes": [
"minecraft:stable_entropy_from_blasting_entropy_ore" "acesbs:stable_entropy_from_blasting_entropy_ore"
] ]
} }
} }
@@ -13,7 +13,7 @@
}, },
"has_the_recipe": { "has_the_recipe": {
"conditions": { "conditions": {
"recipe": "minecraft:stable_entropy_from_blasting_raw_entropy" "recipe": "acesbs:stable_entropy_from_blasting_raw_entropy"
}, },
"trigger": "minecraft:recipe_unlocked" "trigger": "minecraft:recipe_unlocked"
} }
@@ -26,7 +26,7 @@
], ],
"rewards": { "rewards": {
"recipes": [ "recipes": [
"minecraft:stable_entropy_from_blasting_raw_entropy" "acesbs:stable_entropy_from_blasting_raw_entropy"
] ]
} }
} }
@@ -0,0 +1,32 @@
{
"anvil_cost": 2,
"description": {
"translate": "enchantment.acesbs.lightning_strike"
},
"effects": {
"minecraft:post_attack": [
{
"affected": "victim",
"effect": {
"type": "acesbs:lighting_strike"
},
"enchanted": "attacker"
}
]
},
"max_cost": {
"base": 25,
"per_level_above_first": 9
},
"max_level": 2,
"min_cost": {
"base": 5,
"per_level_above_first": 7
},
"primary_items": "#minecraft:enchantable/bow",
"slots": [
"mainhand"
],
"supported_items": "#minecraft:enchantable/weapon",
"weight": 5
}
@@ -3,6 +3,7 @@ package com.acethewildfire.acesbs;
import com.acethewildfire.acesbs.block.ModBlocks; import com.acethewildfire.acesbs.block.ModBlocks;
import com.acethewildfire.acesbs.component.ModDataComponentTypes; import com.acethewildfire.acesbs.component.ModDataComponentTypes;
import com.acethewildfire.acesbs.effect.ModEffects; import com.acethewildfire.acesbs.effect.ModEffects;
import com.acethewildfire.acesbs.enchantment.ModEnchantmentEffects;
import com.acethewildfire.acesbs.item.ModItemGroups; import com.acethewildfire.acesbs.item.ModItemGroups;
import com.acethewildfire.acesbs.item.ModItems; import com.acethewildfire.acesbs.item.ModItems;
import com.acethewildfire.acesbs.potion.ModPotions; import com.acethewildfire.acesbs.potion.ModPotions;
@@ -41,6 +42,8 @@ public class AcesBS implements ModInitializer {
ModBlocks.registerModBlocks(); ModBlocks.registerModBlocks();
ModSounds.registerSounds(); ModSounds.registerSounds();
ModEffects.registerEffects(); ModEffects.registerEffects();
ModPotions.registerPotions();
ModEnchantmentEffects.registerModEnchantments();
ModDataComponentTypes.registerDataComponentsTypes(); ModDataComponentTypes.registerDataComponentsTypes();
@@ -1,6 +1,7 @@
package com.acethewildfire.acesbs; package com.acethewildfire.acesbs;
import com.acethewildfire.acesbs.datagen.*; import com.acethewildfire.acesbs.datagen.*;
import com.acethewildfire.acesbs.enchantment.ModEnchantments;
import com.acethewildfire.acesbs.trim.ModTrimMaterials; import com.acethewildfire.acesbs.trim.ModTrimMaterials;
import com.acethewildfire.acesbs.trim.ModTrimPatterns; import com.acethewildfire.acesbs.trim.ModTrimPatterns;
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint; import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
@@ -25,5 +26,6 @@ public class AcesBSDataGenerator implements DataGeneratorEntrypoint {
public void buildRegistry(RegistryBuilder registryBuilder) { public void buildRegistry(RegistryBuilder registryBuilder) {
registryBuilder.addRegistry(RegistryKeys.TRIM_MATERIAL, ModTrimMaterials::bootstrap); registryBuilder.addRegistry(RegistryKeys.TRIM_MATERIAL, ModTrimMaterials::bootstrap);
registryBuilder.addRegistry(RegistryKeys.TRIM_PATTERN, ModTrimPatterns::bootstrap); registryBuilder.addRegistry(RegistryKeys.TRIM_PATTERN, ModTrimPatterns::bootstrap);
registryBuilder.addRegistry(RegistryKeys.ENCHANTMENT, ModEnchantments::bootstrap);
} }
} }
@@ -16,6 +16,7 @@ public class ModRegistryDataGenerator extends FabricDynamicRegistryProvider {
protected void configure(RegistryWrapper.WrapperLookup registries, Entries entries) { protected void configure(RegistryWrapper.WrapperLookup registries, Entries entries) {
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.TRIM_MATERIAL)); entries.addAll(registries.getWrapperOrThrow(RegistryKeys.TRIM_MATERIAL));
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.TRIM_PATTERN)); entries.addAll(registries.getWrapperOrThrow(RegistryKeys.TRIM_PATTERN));
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.ENCHANTMENT));
} }
@Override @Override
@@ -0,0 +1,25 @@
package com.acethewildfire.acesbs.enchantment;
import com.acethewildfire.acesbs.AcesBS;
import com.acethewildfire.acesbs.enchantment.custom.LightningStrikeEnchantmentEffect;
import com.mojang.serialization.MapCodec;
import net.minecraft.enchantment.effect.EnchantmentEntityEffect;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
public class ModEnchantmentEffects {
public static final MapCodec<? extends EnchantmentEntityEffect> LIGHTNING_STRIKE =
registerEntityEffect("lighting_strike", LightningStrikeEnchantmentEffect.CODEC);
private static MapCodec<? extends EnchantmentEntityEffect> registerEntityEffect (String name,
MapCodec<? extends EnchantmentEntityEffect> codec){
return Registry.register(Registries.ENCHANTMENT_ENTITY_EFFECT_TYPE, Identifier.of(AcesBS.MOD_ID, name), codec);
}
public static void registerModEnchantments(){
AcesBS.LOGGER.info("Registering Mod Enchantment Effects for " + AcesBS.MOD_ID);
}
}
@@ -0,0 +1,48 @@
package com.acethewildfire.acesbs.enchantment;
import com.acethewildfire.acesbs.AcesBS;
import com.acethewildfire.acesbs.enchantment.custom.LightningStrikeEnchantmentEffect;
import net.minecraft.component.EnchantmentEffectComponentTypes;
import net.minecraft.component.type.AttributeModifierSlot;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.enchantment.effect.EnchantmentEffectTarget;
import net.minecraft.registry.Registerable;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.tag.EnchantmentTags;
import net.minecraft.registry.tag.ItemTags;
import net.minecraft.util.Identifier;
public class ModEnchantments {
public static final RegistryKey<Enchantment> LIGHTNING_STRIKE =
RegistryKey.of(RegistryKeys.ENCHANTMENT, Identifier.of(AcesBS.MOD_ID, "lightning_strike"));
public static void bootstrap(Registerable<Enchantment> registerable){
var enchantments = registerable.getRegistryLookup(RegistryKeys.ENCHANTMENT);
var items = registerable.getRegistryLookup(RegistryKeys.ITEM);
register(registerable, LIGHTNING_STRIKE, Enchantment.builder(Enchantment.definition(
items.getOrThrow(ItemTags.BOW_ENCHANTABLE),
5,
2,
Enchantment.leveledCost(5, 7),
Enchantment.leveledCost(25, 9),
2,
AttributeModifierSlot.MAINHAND
)).addEffect(
EnchantmentEffectComponentTypes.PROJECTILE_SPAWNED,
new LightningStrikeEnchantmentEffect()));
}
private static void register(Registerable<Enchantment> registry, RegistryKey<Enchantment> key, Enchantment.Builder builder){
registry.register(key, builder.build(key.getValue()));
}
// public static void registerModEnchantments(){
// AcesBS.LOGGER.info("Registering Mod Enchantments for " + AcesBS.MOD_ID);
// }
}
@@ -0,0 +1,32 @@
package com.acethewildfire.acesbs.enchantment.custom;
import com.mojang.serialization.MapCodec;
import net.minecraft.enchantment.EnchantmentEffectContext;
import net.minecraft.enchantment.effect.EnchantmentEntityEffect;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnReason;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.Vec3i;
public record LightningStrikeEnchantmentEffect() implements EnchantmentEntityEffect {
public static final MapCodec<LightningStrikeEnchantmentEffect> CODEC = MapCodec.unit(LightningStrikeEnchantmentEffect::new);
@Override
public void apply(ServerWorld world, int level, EnchantmentEffectContext context, Entity user, Vec3d pos) {
if(level == 1){
EntityType.LIGHTNING_BOLT.spawn(world, user.getBlockPos(), SpawnReason.TRIGGERED);
}
if(level == 2){
EntityType.LIGHTNING_BOLT.spawn(world, user.getBlockPos(), SpawnReason.TRIGGERED);
EntityType.LIGHTNING_BOLT.spawn(world, user.getBlockPos(), SpawnReason.TRIGGERED);
}
}
@Override
public MapCodec<? extends EnchantmentEntityEffect> getCodec() {
return CODEC;
}
}
@@ -96,5 +96,7 @@
"tooltip.acesbs.thanks_sov": "§7§oTextures by Sovaeris§r", "tooltip.acesbs.thanks_sov": "§7§oTextures by Sovaeris§r",
"sounds.acesbs.lizard": "Lizard!", "sounds.acesbs.lizard": "Lizard!",
"sounds.acesbs.crab_rave": "Jukebox plays Crab Rave" "sounds.acesbs.crab_rave": "Jukebox plays Crab Rave",
"enchantment.acesbs.lightning_strike": "Lightning Strike"
} }
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"acesbs:lightning_strike"
]
}