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.

vin0m

Members
  • Joined

  • Last visited

Everything posted by vin0m

  1. I'm using the code below to get the team info for an entity within the AABB. The issue I am having is that when playing on a server, the team info is only provided correctly when I use "if(world.isRemote)" and the potion effect only works when I use "if(!world.isRemote)". Can someone help me figure out what I am doing wrong? if(!world.isRemote){ AxisAlignedBB bb = new AxisAlignedBB(x1, y1, z1, x2, y2, z2); entL = world.getEntitiesWithinAABB(EntityLiving.class, bb); listSize = entL.size(); int i = 0; for(EntityLiving el : entL){ elName = el.getName(); elUUID = el.getUniqueID().toString(); elTeam = el.getTeam(); playerTeam = player.getTeam(); player.addChatMessage(new TextComponentString("Name: "+elName)); player.addChatMessage(new TextComponentString("elUUID: "+elUUID)); player.addChatMessage(new TextComponentString("elTeam: "+elTeam)); player.addChatMessage(new TextComponentString("playerTeam: "+playerTeam)); if(playerTeam != elTeam){ el.addPotionEffect(new PotionEffect(Potion.getPotionById(2), 100, 127)); } i++; } }
  2. vin0m replied to vin0m's topic in Modder Support
    Got it working. thanks for the tips all.
  3. vin0m replied to vin0m's topic in Modder Support
    I tried bringing the methods over from entity class last night. I couldn't seem to get it to work. I'll have to give it a try again tonight. Other than bringing the methods over is there anything else I'd need to do?
  4. vin0m replied to vin0m's topic in Modder Support
    Does anyone have any examples of how to accomplish this?
  5. How would I go about getting the coords where the player is looking? I was using: RayTraceResult target = Minecraft.getMinecraft().getRenderViewEntity().rayTrace(15, 1.0F); From what I understand this only works client side. Is there an equivalent for server side or will I need a workaround?
  6. I'm trying to do something similar with identifying targeted Entities. Here's the code I have now: @Override public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer player, EnumHand hand) { if(Minecraft.getMinecraft().objectMouseOver.entityHit != null){ Entity Target = Minecraft.getMinecraft().objectMouseOver.entityHit; if(Target instanceof EntityLiving){ } } } The code does what I want it to do but I have to be in very close proximity. What would I need to do to extend the reach for this?
  7. I use scripting now as well. A lot more powerful than using command blocks. If anyone needs help with scripting search "Daot" on you tube. He has some good tutorials.
  8. Thanks everyone! That did the trick.
  9. My mod works fine on the client side but when I try and load the server I get an error that I can't figure out. I'm new to modding. Any help would be appreciated. Error: Main java file: Common Proxy: Client Proxy:
  10. When I try to use a Custom NPC command through a command block (i.e. "/noppes npc SomeNPCName create") I get the message "You are not allowed to use this command". Is there any way I can fix this?
  11. I'd like to assign a model to a player via a command block. Is this possible?

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.