Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.github.alexmodguy.alexscaves.server.item;

import com.github.alexmodguy.alexscaves.AlexsCaves;
import com.github.alexmodguy.alexscaves.server.enchantment.ACEnchantmentHelper;
import com.github.alexmodguy.alexscaves.server.enchantment.ACEnchantmentRegistry;
import com.github.alexmodguy.alexscaves.server.entity.ACEntityRegistry;
import com.github.alexmodguy.alexscaves.server.entity.item.DesolateDaggerEntity;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EquipmentSlotGroup;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
Expand All @@ -22,9 +20,11 @@ public DesolateDaggerItem() {
}

private static ItemAttributeModifiers createDaggerAttributes() {
//In 1.21+, Items can accept new ItemAttributeModifiers now when registered, which is done via .attributes() I didn't do that myself for this fix, but it is available
//To have proper in-game UI for items with damage & speed attributes, use BASE_ATTACK_DAMAGE_ID & BASE_ATTACK_SPEED_ID, which are public and from the base Item.class
return ItemAttributeModifiers.builder()
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "desolate_dagger_damage"), 4, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "desolate_dagger_speed"), -2F, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_ID, 4, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_ID, -2F, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.github.alexmodguy.alexscaves.server.entity.item.WaveEntity;
import com.github.alexmodguy.alexscaves.server.misc.ACSoundRegistry;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth;
import net.minecraft.world.InteractionHand;
Expand Down Expand Up @@ -35,9 +34,11 @@ public OrtholanceItem(Item.Properties properties) {
}

private static ItemAttributeModifiers createOrtholanceAttributes() {
//In 1.21+, Items can accept new ItemAttributeModifiers now when registered, which is done via .attributes() I didn't do that myself for this fix, but it is available
//To have proper in-game UI for items with damage & speed attributes, use BASE_ATTACK_DAMAGE_ID & BASE_ATTACK_SPEED_ID, which are public and from the base Item.class
return ItemAttributeModifiers.builder()
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "ortholance_attack_damage"), 5.0D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "ortholance_attack_speed"), -2.4D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_ID, 5.0D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_ID, -2.4D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.github.alexmodguy.alexscaves.server.misc.ACSoundRegistry;
import com.github.alexmodguy.alexscaves.server.potion.ACEffectRegistry;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.util.Mth;
import net.minecraft.world.effect.MobEffectInstance;
Expand All @@ -33,17 +32,19 @@ public PrimitiveClubItem(Item.Properties properties) {
}

private static ItemAttributeModifiers createDefaultAttributes() {
//In 1.21+, Items can accept new ItemAttributeModifiers now when registered, which is done via .attributes() I didn't do that myself for this fix, but it is available
//To have proper in-game UI for items with damage & speed attributes, use BASE_ATTACK_DAMAGE_ID & BASE_ATTACK_SPEED_ID, which are public and from the base Item.class
return ItemAttributeModifiers.builder()
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "primitive_club_attack_damage"), 8.0D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "primitive_club_attack_speed"), -3.75D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_ID, 8.0D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_ID, -3.75D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.build();
}

private static ItemAttributeModifiers createAttributesForSwiftwoodLevel(int swiftwoodLevel) {
double speedModifier = Math.min(0, -3.75D + 0.15D * swiftwoodLevel);
return ItemAttributeModifiers.builder()
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "primitive_club_attack_damage"), 8.0D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "primitive_club_attack_speed"), speedModifier, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_ID, 8.0D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_ID, speedModifier, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package com.github.alexmodguy.alexscaves.server.item;

import com.github.alexmodguy.alexscaves.AlexsCaves;
import net.minecraft.core.particles.ItemParticleOption;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.EquipmentSlotGroup;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
Expand All @@ -24,9 +21,11 @@ public SharpenedCandyCaneItem(Properties properties) {
}

private static ItemAttributeModifiers createCandyCaneAttributes() {
//In 1.21+, Items can accept new ItemAttributeModifiers now when registered, which is done via .attributes() I didn't do that myself for this fix, but it is available
//To have proper in-game UI for items with damage & speed attributes, use BASE_ATTACK_DAMAGE_ID & BASE_ATTACK_SPEED_ID, which are public and from the base Item.class
return ItemAttributeModifiers.builder()
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "candy_cane_attack_damage"), 3.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "candy_cane_attack_speed"), 4.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_ID, 3.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_ID, 4.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.github.alexmodguy.alexscaves.AlexsCaves;
import net.minecraft.core.BlockPos;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.EquipmentSlot;
Expand All @@ -29,9 +28,11 @@ public SpearItem(Properties properties, double damage) {
}

private static ItemAttributeModifiers createSpearAttributes(double damage) {
//In 1.21+, Items can accept new ItemAttributeModifiers now when registered, which is done via .attributes() I didn't do that myself for this fix, but it is available
//To have proper in-game UI for items with damage & speed attributes, use BASE_ATTACK_DAMAGE_ID & BASE_ATTACK_SPEED_ID, which are public and from the base Item.class
return ItemAttributeModifiers.builder()
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "spear_attack_damage"), damage, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(ResourceLocation.fromNamespaceAndPath(AlexsCaves.MODID, "spear_attack_speed"), -3.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_ID, damage, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_ID, -3.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,11 @@ public TotemOfPossessionItem() {
}

public static ItemAttributeModifiers createAttributes() {
//In 1.21+, Items can accept new ItemAttributeModifiers now when registered, which is done via .attributes() I didn't do that myself for this fix, but it is available
//To have proper in-game UI for items with damage & speed attributes, use BASE_ATTACK_DAMAGE_ID & BASE_ATTACK_SPEED_ID, which are public and from the base Item.class
return ItemAttributeModifiers.builder()
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(
ResourceLocation.fromNamespaceAndPath("alexscaves", "totem_attack_damage"),
2.0D, AttributeModifier.Operation.ADD_VALUE),
EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(
ResourceLocation.fromNamespaceAndPath("alexscaves", "totem_attack_speed"),
-2.4D, AttributeModifier.Operation.ADD_VALUE),
EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_ID, 2.0D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.add(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_ID, -2.4D, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"replace": false,
"values": [
"alexscaves:radiation",
"alexscaves:raygun",
"alexscaves:acid"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"replace": false,
"values": [
"alexscaves:arrow_inducting",
"alexscaves:astral_transferring",
"alexscaves:bonking",
"alexscaves:bouncing_bolt",
"alexscaves:bouncy_ball",
"alexscaves:charting_call",
"alexscaves:chomping_spirit",
"alexscaves:crystallization",
"alexscaves:dark_nock",
"alexscaves:dazing_sweep",
"alexscaves:detonating_death",
"alexscaves:double_stab",
"alexscaves:energy_efficiency",
"alexscaves:enveloping_bubble",
"alexscaves:explosive_flavor",
"alexscaves:far_flung",
"alexscaves:ferrous_haste",
"alexscaves:field_extension",
"alexscaves:flinging",
"alexscaves:gamma_ray",
"alexscaves:heavy_slam",
"alexscaves:herd_phalanx",
"alexscaves:humungous_hex",
"alexscaves:impending_stab",
"alexscaves:lasting_morale",
"alexscaves:multiple_mint",
"alexscaves:peppermint_punting",
"alexscaves:plummeting_flight",
"alexscaves:precise_volley",
"alexscaves:rapid_possession",
"alexscaves:relentless_darkness",
"alexscaves:sated_blade",
"alexscaves:sea_swing",
"alexscaves:seapairing",
"alexscaves:second_wave",
"alexscaves:seekcandy",
"alexscaves:shaded_respite",
"alexscaves:sharp_cane",
"alexscaves:sightless",
"alexscaves:soak_seeking",
"alexscaves:solar",
"alexscaves:spell_lasting",
"alexscaves:straight_hook",
"alexscaves:swiftwood",
"alexscaves:targeted_ricochet",
"alexscaves:taxing_bellow",
"alexscaves:triple_splash",
"alexscaves:triple_split",
"alexscaves:tsunami",
"alexscaves:twilight_perfection",
"alexscaves:x_ray"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"replace": false,
"values": [
"alexscaves:arrow_inducting",
"alexscaves:astral_transferring",
"alexscaves:bonking",
"alexscaves:bouncing_bolt",
"alexscaves:bouncy_ball",
"alexscaves:charting_call",
"alexscaves:chomping_spirit",
"alexscaves:crystallization",
"alexscaves:dark_nock",
"alexscaves:dazing_sweep",
"alexscaves:detonating_death",
"alexscaves:double_stab",
"alexscaves:energy_efficiency",
"alexscaves:enveloping_bubble",
"alexscaves:explosive_flavor",
"alexscaves:far_flung",
"alexscaves:ferrous_haste",
"alexscaves:field_extension",
"alexscaves:flinging",
"alexscaves:gamma_ray",
"alexscaves:heavy_slam",
"alexscaves:herd_phalanx",
"alexscaves:humungous_hex",
"alexscaves:impending_stab",
"alexscaves:lasting_morale",
"alexscaves:multiple_mint",
"alexscaves:peppermint_punting",
"alexscaves:plummeting_flight",
"alexscaves:precise_volley",
"alexscaves:rapid_possession",
"alexscaves:relentless_darkness",
"alexscaves:sated_blade",
"alexscaves:sea_swing",
"alexscaves:seapairing",
"alexscaves:second_wave",
"alexscaves:seekcandy",
"alexscaves:shaded_respite",
"alexscaves:sharp_cane",
"alexscaves:sightless",
"alexscaves:soak_seeking",
"alexscaves:solar",
"alexscaves:spell_lasting",
"alexscaves:straight_hook",
"alexscaves:swiftwood",
"alexscaves:targeted_ricochet",
"alexscaves:taxing_bellow",
"alexscaves:triple_splash",
"alexscaves:triple_split",
"alexscaves:tsunami",
"alexscaves:twilight_perfection",
"alexscaves:x_ray"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"alexscaves:brainiac"
]
}