Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.16.3] Spawn Entity on Server
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
SkullFirez

[1.16.3] Spawn Entity on Server

By SkullFirez, October 28, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

SkullFirez    0

SkullFirez

SkullFirez    0

  • Tree Puncher
  • SkullFirez
  • Members
  • 0
  • 2 posts
Posted October 28, 2020

I'm quite new to modding (and forums), and I'm trying let the player shoot/spawn a custom entity fireball on right click. I made an item that shoots the entity correctly, but this isn't what I want. I think I need to send packets to the server in order for it to work, I'm just not sure how to go about it properly. I assume world.addEntity might not work, only because it doesn't show up in-game. Any help is appreciated.

  • Quote

Share this post


Link to post
Share on other sites

ChampionAsh5357    161

ChampionAsh5357

ChampionAsh5357    161

  • World Shaper
  • ChampionAsh5357
  • Members
  • 161
  • 1021 posts
Posted October 28, 2020

I'm going to assume that the right click is with an empty hand. If so, you would definitely need to set up a network and send the packet to the server so World#addEntity can be called. If it's through an item, then you can just check the side within Item#onItemRightClick and then add the entity,

  • Quote

Share this post


Link to post
Share on other sites

SkullFirez    0

SkullFirez

SkullFirez    0

  • Tree Puncher
  • SkullFirez
  • Members
  • 0
  • 2 posts
Posted October 28, 2020

Got it working, thanks for the help!

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      Bug: Nether Quarz Ore does not have toolType

      By diesieben07 · Posted 14 minutes ago

      The only true way to know is to call BlockState#canHarvestBlock, which requires a player and will check the item the player is currently holding or other arbitrary things about the player (mods may have all kinds of arbitrary requirements for harvesting).
    • diesieben07
      AoA mod crashing game

      By diesieben07 · Posted 17 minutes ago

      Best way is probably just to delete it and let it regenerate
    • uraketu
      AoA mod crashing game

      By uraketu · Posted 46 minutes ago

      what should i do?  
    • DancZer
      Bug: Nether Quarz Ore does not have toolType

      By DancZer · Posted 47 minutes ago

      What would be the ideal way to check if I can break a a block by a pickaxe or a shovel?    I rewrote the whole logic and now I use the Item.canHarvestBlock, but it doesn't work reliable neither. For dirt the shovel returns false. 😔   Here is my logic: Github code   Do you have any suggestion?    Thank you in advance and I will let you know when the PR is ready. 
    • diesieben07
      AoA mod crashing game

      By diesieben07 · Posted 56 minutes ago

      Your game settings file is corrupted.
  • Topics

    • DancZer
      3
      Bug: Nether Quarz Ore does not have toolType

      By DancZer
      Started December 29, 2020

    • uraketu
      3
      AoA mod crashing game

      By uraketu
      Started 1 hour ago

    • DanielDJ1613
      1
      How do I resolve server errors?

      By DanielDJ1613
      Started 1 hour ago

    • Solarient
      1
      GUIs

      By Solarient
      Started 5 hours ago

    • Bluperman949
      0
      Issue with using JEI API/Mod in my workspace

      By Bluperman949
      Started 5 hours ago

  • Who's Online (See full list)

    • Lucie
    • diesieben07
    • TheidenHD
    • GermanBucket
    • Teedledee
    • Choonster
    • HazzyRad
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.16.3] Spawn Entity on Server
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community