Jump to content

[SOLVED] [1.8] Item place other block


Recommended Posts

Hey all,


in my last post i had a few problems with the subblocks in 1.8 (http://www.minecraftforge.net/forum/index.php/topic,29405.msg151797.html#msg151797).

I solved it with some greath answers :)


Some months later i've found some time to work more on my mod and the method "placeBlockAt" in ItemBlock.class is trolling me oO.


Heres a debug-Picture:



1) I picked an ore from the inventory "Unknown Ore (Its a test 'ore')".

2) I place it on the ground

3) The placed block is vanadium ore


You see the first line in the method is setting the 'newState' on the 'pos' in the world. It returns true, otherwise the method will be canceled;

The next line is getting the state of the position, which should be the last set .. i think! Buts it is another oO.. why?


The setBlockState Method is called with a 3rd Parameter 'flags'. I already tried to change these value to others or removing it, by override the method, but it still not works.


Sry for my bad english :/


Edit: You can see two Property Values in the BlockState. This are both PropertyEnum values.


If you need some more informations please ask :)

Thanks for help!










Link to comment
Share on other sites

Hmm.. my code follows.. but first:


There are two options..

a) I'm stupid..

b) I'm stupid and haven't realized what you want say me in my last post.


I tried a little bit more and.. hmpf i have only 4 different blocks in game. My inventory says there are up to 34 different blocks with 17 variants and 2 types, but by placing them i got only four different.. and two of them have complete other id oO .. they are transformed into other blocks xD


My block code:



Update to the type:

Each variant can be a ore block or a "block" .. like the iron block, gold block e.g., and later i want to add different ores "poor", "normal", "rich" ...




Link to comment
Share on other sites



Redstone signal power reached 15. Lamp: On.


Damn.. thats crap! Thats means if i have more than 16 different ores i should save the type in the meta-id and create for each ore a block hm? But then i need for each block a single blockstate json file..


Thank you again! :)




Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.


  • Create New...

Important Information

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