Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Modderuy

Members
  • Joined

  • Last visited

  1. I just learned it, so I don't know much
  2. i did @Override public void doPostAttack(LivingEntity pAttacker, Entity pTarget, int pLevel) { if (!pAttacker.level.isClientSide()) { ServerLevel world = (ServerLevel) pAttacker.level; ServerPlayer player = ((ServerPlayer) pAttacker); BlockPos position = pTarget.blockPosition(); double val = Math.random(); if (pLevel == 5) { public float getDamageBonus(0.05);
  3. you cannot overide inside curly brackets
  4. if (pLevel == 5) { getDamageBonus(4.5f) }
  5. Can you give an example of what that might look like?
  6. I am making a custom enchant that makes a sword do more damage. Does anyone know how I could make this? I already have the beginning down. package com.idtech.enchantment; import com.idtech.Utils; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.*; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.item.enchantment.EnchantmentCategory; import net.minecraft.world.level.Level; public class Razor extends Enchantment { private static EquipmentSlot[] slots = {EquipmentSlot.MAINHAND}; public static final Razor INSTANCE = (Razor) (new Razor(Rarity.RARE, EnchantmentCategory.WEAPON, slots).setRegistryName("razor")); protected Razor(Rarity p_44676_, EnchantmentCategory p_44677_, EquipmentSlot[] p_44678_) { super(p_44676_, p_44677_, p_44678_); } @ Overide public void doPostAttack(LivingEntity pAttacker, Entity pTarget, int pLevel) { if (!pAttacker.level.isClientSide()) { ServerLevel world = (ServerLevel) pAttacker.level; ServerPlayer player = ((ServerPlayer) pAttacker); BlockPos position = pTarget.blockPosition(); if (pLevel == 5) { } } } } }

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.