Jump to content

Recommended Posts

Posted

Tile entities use this.posX

 

And unless you post actual code, we are unable to help you.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
  On 1/9/2014 at 1:20 PM, Draco18s said:

Tile entities use this.posX

 

And unless you post actual code, we are unable to help you.

 

Ok... the code;

BaseDownBlock

 

  Reveal hidden contents

 

 

BaseDownTileEntity

 

  Reveal hidden contents

 

 

Posted

You need to register your tile entity for it to be calling readFromNBT and writeToNBT,so it can save the coordinates.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted
  On 1/9/2014 at 2:08 PM, larsgerrits said:

You need to register your tile entity for it to be calling readFromNBT and writeToNBT,so it can save the coordinates.

I've it on the load method

GameRegistry.registerTileEntity(mods.MoreBlocksMod.BaseDownTileEntity.class, "baseDownTileEntity");

Posted

I also have this class, that I found that it's "reseting" the values of the tile entity

 

  Reveal hidden contents

 

 

When I don't use it, the values are ok. So now the problem is how to render the custom block model in the inventory.

Posted
  On 1/9/2014 at 2:29 PM, ColdFox said:

I also have this class, that I found that it's "reseting" the values of the tile entity

 

  Reveal hidden contents

 

 

When I don't use it, the values are ok. So now the problem is how to render the custom block model in the inventory.

 

Seriously?

 

That doesn't "reset" the values for your tile entity.  That creates a new tile entity with its OWN values.  When you're seeing the values as 0, THAT'S THE ONE IN YOUR INVENTORY.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
  On 1/9/2014 at 2:53 PM, Draco18s said:

  Quote

I also have this class, that I found that it's "reseting" the values of the tile entity

 

  Reveal hidden contents

 

 

When I don't use it, the values are ok. So now the problem is how to render the custom block model in the inventory.

 

Seriously?

 

That doesn't "reset" the values for your tile entity.  That creates a new tile entity with its OWN values.  When you're seeing the values as 0, THAT'S THE ONE IN YOUR INVENTORY.

 

Ok... my bad :$ I was handling the wrong tile entities, the problem is fixed.

I still need a little help but it's not related with this thread. I need to have more than 16 subtypes of a block, the problem is that I can't use metadata, otherwise it would be done. Right now I'm using metadata, as you can see in the class above. It works fine except when I break a block with a subID >15. What can I do to make it work, so that when the block breaks it will drop the correct block?

Posted
  On 1/9/2014 at 3:06 PM, ColdFox said:
It works fine except when I break a block with a subID >15. What can I do to make it work, so that when the block breaks it will drop the correct block?

 

You need to stop using metadata entirely.  It "breaks" when you use a metadata above 15 because metadata is a byte, so vales greater than 11112 will be truncated.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

You don't need metadata if you have a TileEntity. Store the subtypes into the TileEntity.

If you don't want the TileEntity, you'll have to switch to a different block id, as metadata is limited to 16 values.

Posted
  On 1/9/2014 at 3:51 PM, GotoLink said:

You don't need metadata if you have a TileEntity. Store the subtypes into the TileEntity.

If you don't want the TileEntity, you'll have to switch to a different block id, as metadata is limited to 16 values.

 

can you give me an example of what to do? =/

like how do I save the subtype into the TileEntity and how to do so the "block" knows what subtype drop

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Having problems with forge installation on headless arch linux, regardless of forge-server from yay or manual wget, Cant find class error and results in net/minecraft/world/waypoints/Waypoint$Icon.class   net/minecraft/world/waypoints/Waypoint.class   net/minecraft/world/waypoints/WaypointManager.class   net/minecraft/world/waypoints/WaypointStyleAsset.class   net/minecraft/world/waypoints/WaypointStyleAssets.class   net/minecraft/world/waypoints/WaypointTransmitter$BlockConnection.class   net/minecraft/world/waypoints/WaypointTransmitter$ChunkConnection.class   net/minecraft/world/waypoints/WaypointTransmitter$Connection.class   net/minecraft/world/waypoints/WaypointTransmitter$EntityAzimuthConnection.class   net/minecraft/world/waypoints/WaypointTransmitter$EntityBlockConnection.class   net/minecraft/world/waypoints/WaypointTransmitter$EntityChunkConnection.class   net/minecraft/world/waypoints/WaypointTransmitter.class   version.json   Processor failed, invalid outputs:     /srv/minecraft/./libraries/net/minecraft/server/1.21.6/server-1.21.6-official.jar       Expected: b1448d2c947e923ccd63224defc3b51e5a72a98d       Actual:   5f30bf411bd0d1208baca6b7be1584442f4f6579 There was an error during installation
    • This is my first time setting up a minecraft server, and I had wanted to add modding capabilities with forge but I keep getting errors while installing? I have tried installing several versions of forge but i have ended up getting unable to find class and checksum errors? Same thing when trying yay -S forge-server The only thing that works is installing the vanilla minecraft server from minecraft itself?   net/minecraft/util/parsing/packrat/Atom.class   net/minecraft/util/parsing/packrat/CachedParseState$CacheEntry.class   net/minecraft/util/parsing/packrat/CachedParseState$PositionCache.class   net/minecraft/util/parsing/packrat/CachedParseState$Silent.class   net/minecraft/util/parsing/packrat/CachedParseState$SimpleControl.class   net/minecraft/util/parsing/packrat/CachedParseState.class   net/minecraft/util/parsing/packrat/Control$1.class   net/minecraft/util/parsing/packrat/Control.class   net/minecraft/util/parsing/packrat/DelayedException.class   net/minecraft/util/parsing/packrat/Dictionary$Entry.class   net/minecraft/util/parsing/packrat/Dictionary$Reference.class   net/minecraft/util/parsing/packrat/Dictionary.class   net/minecraft/util/parsing/packrat/ErrorCollector$LongestOnly$MutableErrorEntry.class   net/minecraft/util/parsing/packrat/ErrorCollector$LongestOnly.class   net/minecraft/util/parsing/packrat/ErrorCollector$Nop.class   net/minecraft/util/parsing/packrat/ErrorCollector.class   net/minecraft/util/parsing/packrat/ErrorEntry.class   net/minecraft/util/parsing/packrat/NamedRule.class   net/minecraft/util/parsing/packrat/ParseState.class   net/minecraft/util/parsing/packrat/Rule$RuleAction.class   net/minecraft/util/parsing/packrat/Rule$SimpleRuleAction.class   net/minecraft/util/parsing/packrat/Rule$WrappedTerm.class Processor failed, invalid outputs:     /srv/minecraft/./libraries/net/minecraft/server/1.21.6/server-1.21.6-official.jar       Expected: b1448d2c947e923ccd63224defc3b51e5a72a98d       Actual:   5f30bf411bd0d1208baca6b7be1584442f4f6579 There was an error during installation  
    • Fight with others to gain more hearts.
    • I wanted to try out Immersive railroading mod + Miszko's train resource pack, but everytime i create a world. it just gives me saving world after the map icon shows 100% and then crashes..   latest.log here https://drive.google.com/file/d/14v1pGCoytqyDvVwPayfUkYolmxcZ7z6-/view?usp=sharing
    • https://mclo.gs/yYaROad make a new pack base and just readded each mod. now it gets stuck at loaded config  
  • Topics

×
×
  • Create New...

Important Information

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