hammer
This commit is contained in:
parent
34fc80ff5e
commit
143ce70b91
@ -124,7 +124,7 @@ public class Shitmod implements ModInitializer {
|
|||||||
|
|
||||||
public static final Enchantment LIFESTEAL = new lifeStealEnchantment(Enchantment.Rarity.RARE, EnchantmentTarget.WEAPON, new EquipmentSlot[] {EquipmentSlot.MAINHAND});
|
public static final Enchantment LIFESTEAL = new lifeStealEnchantment(Enchantment.Rarity.RARE, EnchantmentTarget.WEAPON, new EquipmentSlot[] {EquipmentSlot.MAINHAND});
|
||||||
|
|
||||||
public static final PickaxeItem HAMMER = new testHammer(ToolMaterials.NETHERITE, 3, 2, new Item.Settings().group(Shitmod.TOOLS_GROUP).fireproof().maxDamage(800));
|
public static final PickaxeItem HAMMER = new testHammer(ToolMaterials.NETHERITE, 3, -1, new Item.Settings().group(Shitmod.TOOLS_GROUP).fireproof().maxDamage(2031));
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
@ -216,6 +216,6 @@ public class Shitmod implements ModInitializer {
|
|||||||
|
|
||||||
Registry.register(Registry.ENCHANTMENT, new Identifier("shitmod", "lifesteal"), LIFESTEAL);
|
Registry.register(Registry.ENCHANTMENT, new Identifier("shitmod", "lifesteal"), LIFESTEAL);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "Hammer"), HAMMER);
|
Registry.register(Registry.ITEM, new Identifier("shitmod", "hammer"), HAMMER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,6 @@ public class testHammer extends PickaxeItem {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
ItemStack mainHandStack = player.getMainHandStack();
|
ItemStack mainHandStack = player.getMainHandStack();
|
||||||
|
|
||||||
// Taken from Entity#rayTrace
|
|
||||||
Vec3d vec3d_1 = player.getCameraPosVec(1);
|
Vec3d vec3d_1 = player.getCameraPosVec(1);
|
||||||
Vec3d vec3d_2 = player.getRotationVec(1);
|
Vec3d vec3d_2 = player.getRotationVec(1);
|
||||||
int range = 4;
|
int range = 4;
|
||||||
@ -41,10 +39,10 @@ public class testHammer extends PickaxeItem {
|
|||||||
boolean canBreak = newState.getHardness(world, newPos) >= 0 || (!newState.isToolRequired() && mainHandStack.getMiningSpeedMultiplier(newState) > 1);
|
boolean canBreak = newState.getHardness(world, newPos) >= 0 || (!newState.isToolRequired() && mainHandStack.getMiningSpeedMultiplier(newState) > 1);
|
||||||
if (!canBreak)
|
if (!canBreak)
|
||||||
continue;
|
continue;
|
||||||
// Let's break the block!
|
|
||||||
world.breakBlock(newPos, true, player);
|
world.breakBlock(newPos, true, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
@ -45,5 +45,6 @@
|
|||||||
"subtitles.shitmod.glock_noise": "Glock Fires",
|
"subtitles.shitmod.glock_noise": "Glock Fires",
|
||||||
"enchantment.shitmod.lifesteal": "Life Steal",
|
"enchantment.shitmod.lifesteal": "Life Steal",
|
||||||
"enchantment.shitmod.explosion_aspect": "Explosion Aspect",
|
"enchantment.shitmod.explosion_aspect": "Explosion Aspect",
|
||||||
"enchantment.shitmod.explosive_thorns": "Explosive Thorns"
|
"enchantment.shitmod.explosive_thorns": "Explosive Thorns",
|
||||||
|
"item.shitmod.hammer": "Hammer"
|
||||||
}
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "shitmod:item/hammer"
|
||||||
|
}
|
||||||
|
}
|
BIN
src/main/resources/assets/shitmod/textures/item/hammer.png
Normal file
BIN
src/main/resources/assets/shitmod/textures/item/hammer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.3 KiB |
Loading…
x
Reference in New Issue
Block a user