Compare commits

...

3 commits

Author SHA1 Message Date
Flanks255
9cfbb61739 Merge remote-tracking branch 'origin/1.21' into 1.21 2024-10-19 17:08:58 -05:00
Flanks255
9a418c1c6d Fixed all in one tools not having damage. 2024-10-19 17:08:46 -05:00
Mrbysco
b68cfecdf9 Add missing XP Solidifier recipe 2024-10-19 23:01:53 +02:00
4 changed files with 49 additions and 7 deletions

View file

@ -1,4 +1,4 @@
// 1.21.1 2024-08-11T19:30:01.8298188 Recipes // 1.21.1 2024-10-19T22:58:03.6472462 Recipes
b44fee42c2b2b3f56256fe76b2d9f529dc87350a data/actuallyadditions/recipe/atomic_reconstructor.json b44fee42c2b2b3f56256fe76b2d9f529dc87350a data/actuallyadditions/recipe/atomic_reconstructor.json
b1c937b75ba7f8e02dfac4db5253271f2de502e5 data/actuallyadditions/recipe/battery_box.json b1c937b75ba7f8e02dfac4db5253271f2de502e5 data/actuallyadditions/recipe/battery_box.json
660b96730a8ef88b4b44e4ce67fde0945c13ae7f data/actuallyadditions/recipe/bio_reactor.json 660b96730a8ef88b4b44e4ce67fde0945c13ae7f data/actuallyadditions/recipe/bio_reactor.json
@ -73,3 +73,4 @@ a5bbea36e4e66a6c1aed2b618b6b2782b334963c data/actuallyadditions/recipe/smooth_bl
f0a6cbd14eac4a35f31b17818a10c3052d848e32 data/actuallyadditions/recipe/tiny_torch.json f0a6cbd14eac4a35f31b17818a10c3052d848e32 data/actuallyadditions/recipe/tiny_torch.json
417bba7527a62cea44fd900ce3882000ada36a2c data/actuallyadditions/recipe/vertical_digger.json 417bba7527a62cea44fd900ce3882000ada36a2c data/actuallyadditions/recipe/vertical_digger.json
207a2f79e0b0c94905c385aaa0dd843c26fcfa6d data/actuallyadditions/recipe/wood_casing.json 207a2f79e0b0c94905c385aaa0dd843c26fcfa6d data/actuallyadditions/recipe/wood_casing.json
c5dae80ac00ec9829c80d6e453adcb488e775005 data/actuallyadditions/recipe/xp_solidifier.json

View file

@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"A": {
"item": "actuallyadditions:advanced_coil"
},
"E": {
"item": "actuallyadditions:empowered_diamatine_crystal_block"
},
"S": {
"item": "actuallyadditions:solidified_experience"
}
},
"pattern": [
"SSS",
"EAE",
"SSS"
],
"result": {
"count": 1,
"id": "actuallyadditions:xp_solidifier"
}
}

View file

@ -507,6 +507,14 @@ public class BlockRecipeGenerator extends RecipeProvider {
.define('A', ActuallyBlocks.BREAKER.get()) .define('A', ActuallyBlocks.BREAKER.get())
.define('V', ActuallyItems.VOID_CRYSTAL) .define('V', ActuallyItems.VOID_CRYSTAL)
.save(recipeOutput); .save(recipeOutput);
// Experience Solidifier
Recipe.shaped(ActuallyBlocks.XP_SOLIDIFIER.getItem())
.pattern("SSS", "EAE", "SSS")
.define('S', ActuallyItems.SOLIDIFIED_EXPERIENCE)
.define('E', ActuallyBlocks.EMPOWERED_DIAMATINE_CRYSTAL.getItem())
.define('A', ActuallyItems.ADVANCED_COIL)
.save(recipeOutput);
} }
public static class Recipe { public static class Recipe {

View file

@ -3,10 +3,14 @@ package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.api.ActuallyTags; import de.ellpeck.actuallyadditions.api.ActuallyTags;
import net.minecraft.core.component.DataComponents; import net.minecraft.core.component.DataComponents;
import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.EquipmentSlotGroup;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.item.DiggerItem; import net.minecraft.world.item.DiggerItem;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items; import net.minecraft.world.item.Items;
import net.minecraft.world.item.Tier; import net.minecraft.world.item.Tier;
import net.minecraft.world.item.component.ItemAttributeModifiers;
import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.item.context.UseOnContext;
import net.neoforged.neoforge.common.ItemAbilities; import net.neoforged.neoforge.common.ItemAbilities;
import net.neoforged.neoforge.common.ItemAbility; import net.neoforged.neoforge.common.ItemAbility;
@ -27,17 +31,22 @@ public class AllInOneTool extends DiggerItem {
); );
public AllInOneTool(Tier tier) { public AllInOneTool(Tier tier) {
super( super(tier,
/* 4.0f,
-2f,*/
tier,
ActuallyTags.Blocks.MINEABLE_WITH_AIO, ActuallyTags.Blocks.MINEABLE_WITH_AIO,
new Properties() new Properties()
.durability(tier.getUses() * 4) .durability(tier.getUses() * 4)
.component(DataComponents.TOOL, tier.createToolProperties(ActuallyTags.Blocks.MINEABLE_WITH_AIO)) .component(DataComponents.TOOL, tier.createToolProperties(ActuallyTags.Blocks.MINEABLE_WITH_AIO))
.attributes(createAttributes())
); );
} }
private static ItemAttributeModifiers createAttributes() {
ItemAttributeModifiers.Builder builder = ItemAttributeModifiers.builder();
builder.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_ID,4.0f, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND);
builder.add(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_ID, -2.0f, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND);
return builder.build();
}
@Override @Override
public boolean canPerformAction(@Nonnull ItemStack stack, @Nonnull ItemAbility toolAction) { public boolean canPerformAction(@Nonnull ItemStack stack, @Nonnull ItemAbility toolAction) {
if (ACTIONS.contains(toolAction)) if (ACTIONS.contains(toolAction))