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.

NoNameGuy

Members
  • Joined

  • Last visited

Everything posted by NoNameGuy

  1. thanks for your reply. That helps a lot.The only thing I don't understand is that i don't own dersichkeinennamenausdenkenkann.com? What do you mean at that point?
  2. So I made this mod a while ago where I had an item, that adds a lightningboltentity to whatever block you look. Turns out that it doesn't function properly on a dedicated server. Can anyone tell me what the issue is? Here is the code: package com.dersichkeinennamenausdenkenkann.somethings.items; import java.util.List; import com.dersichkeinennamenausdenkenkann.somethings.SomeMod; import com.dersichkeinennamenausdenkenkann.somethings.util.helpers.KeyHelpStuff; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.entity.effect.LightningBoltEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.StringTextComponent; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; public class Cross extends Item { public Cross() { super(new Item.Properties() .group(SomeMod.SomethingItemGroup.instance) .maxStackSize(1) ); } public void addInformation(ItemStack stack, World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) { if(KeyHelpStuff.isHoldingShift()) { tooltip.add(new StringTextComponent("With this Item, you will be able to summon some dawm sick lightningbolts. But they hurt... Just so you know")); } else { tooltip.add(new StringTextComponent("Hold" + "\u00A7b" + " SHIFT " + "\u00A7f" + "for more Information!")); } super.addInformation(stack, worldIn, tooltip, flagIn); } @Override public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn){ if(!(worldIn instanceof ServerWorld)) return new ActionResult<>(ActionResultType.PASS, playerIn.getHeldItem(handIn)); RayTraceResult lookingAt = Minecraft.getInstance().objectMouseOver; if (lookingAt != null && lookingAt.getType() == RayTraceResult.Type.BLOCK) { double x = lookingAt.getHitVec().getX(); double y = lookingAt.getHitVec().getY(); double z = lookingAt.getHitVec().getZ(); ((ServerWorld) worldIn).addLightningBolt(new LightningBoltEntity(worldIn, x, y, z, false)); } // not looking at block return super.onItemRightClick(worldIn, playerIn, handIn); } @Override public boolean canPlayerBreakBlockWhileHolding(BlockState state, World worldIn, BlockPos pos, PlayerEntity player) { return false; } } or is it something other than the lightning that is added?

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.