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.3.2] TileEntity, PacketHandler, questions
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
WiNeTel

[1.3.2] TileEntity, PacketHandler, questions

By WiNeTel, October 11, 2012 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

WiNeTel    1

WiNeTel

WiNeTel    1

  • Tree Puncher
  • WiNeTel
  • Members
  • 1
  • 24 posts
Posted October 11, 2012

Again having Problems, now try my first Block that can do something!

i have a Block, TileEntity

in the TileEntity want to store something like Water so i make a Variable waterLevel

ItemStack var10 = par5EntityPlayer.inventory.getCurrentItem();
        	
            
            if (var10.itemID == Item.bucketWater.shiftedIndex)
            {
                par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, new ItemStack(Item.bucketEmpty));
            	  if(waterLevel < 10)
            	  {
            		  waterLevel = 10;	
            	  }
            }

 

The variable waterLevel change the texture of the Block, this work so variable change like i want.

But the Item not change to BucketEmpty!

and when leave the game and come back the watellevel is again 0;

i use NBT tags to store the waterLevel, and i know that i need PacketHandler, but what sending from server to client and from client to server. have look in the Tutorials but not help me alot.

Please can someone me explain it!

special how update item in the Hand

Thanks

  • 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 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Klarks
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By Klarks · Posted 6 minutes ago

      If super.getCapability give me the default handlers so what new EntityArmorInvWrapper(entity) do 
    • mightymoy
      Cant craft items in modded server

      By mightymoy · Posted 57 minutes ago

      Me and my friends started a modded server the version is 1.16.1 and we have 23 mods installed on it. We were playing it in vanilla at first but then after some hours we started to add mods onto the server (not sure if this caused the issue) we noticed that somethings were not coming up in the crafting table output box for example I was trying to make a bowl but the bowl wasn't popping out to put it in my inventory we arent sure what's the issue since in single player we can craft both the modded items and vanilla items but in the server we cant craft them at all. I've been searching for a solution all day I cant seem to find anyone else talk about it or have a solution to it.    On the right is the modded server trying to craft a modded item but not showing and on the right is in single player mode doing the same thing and getting the item.   I would post the server log but I'm not sure how to get the log either if someone can tell me how to retrieve the log as well that would be much appreciated.
    • Draco18s
      What is the method to left click?

      By Draco18s · Posted 1 hour ago

      There isn't one. Documentation (such as there is) is all inside the code itself.
    • Gubipe
      What is the method to left click?

      By Gubipe · Posted 1 hour ago

      can you link me to the documentation page for it?
    • ju_
      Minecraft crashes while launching - failed to find service port for display

      By ju_ · Posted 4 hours ago

      Hi, to follow on the subject i have the same issue https://pastebin.com/E47LtT43 it works fine on my end with vanilla or other version. i only have this issue with forge for 1.16
  • Topics

    • Klarks
      23
      [1.16.4] what difference between custom slots and EquipmentSlotType

      By Klarks
      Started 21 hours ago

    • mightymoy
      0
      Cant craft items in modded server

      By mightymoy
      Started 57 minutes ago

    • Gubipe
      3
      What is the method to left click?

      By Gubipe
      Started 5 hours ago

    • schmiddi_0
      16
      Minecraft crashes while launching - failed to find service port for display

      By schmiddi_0
      Started December 14, 2020

    • Silivek
      1
      Mod won't load when in dev environment

      By Silivek
      Started 10 hours ago

  • Who's Online (See full list)

    • hijackster99
    • LenMay2003
    • Jake_Titan
    • imawindow
    • Otep
    • Gubipe
    • ChampionAsh5357
    • ZetaLuxray
    • Klarks
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.3.2] TileEntity, PacketHandler, questions
  • Theme

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