Jump to content

[1.8 ]Octablocks Mod - Dividing blocks by 8


Reygok

Recommended Posts

Hello all!

 

I had the idea to divide almost every block in the game by 8, which gives a lot more building possibilites. I already made another mod before, a pretty simple one, where I just created new blocks and items and tools. This, however, is a whole new level, as it changes the game as it is, and doesn't only add new stuff.

 

So I'm facing two problems: first, I can't figure out how to let an existing block drop something else, for example let Dirt drop my custom smaller dirt block.

Second, I tried to render my small block of dirt, but it always renders at full size. I looked at the BlockSlab and BlockStairs classes, and also BlockFence, but the only thing I found, that seems to relate to this is setBaseCollisionBounds() and addCollisionBoxesToList(), but I changed the parameters of setBlockBounds() all to 0.5, but the collisionbox is still full. And also this does not apply to rendering, and I don't know how to render smaller than a full block.

 

I searched quite a bit, but the biggest problem is that 95% of the tutorials are outdated, since I'm modding on 1.8.

 

 

Thanks in advance for any help :)

 

Reygok

Link to comment
Share on other sites

let an existing block drop something else

HarvestDropsEvent

 

I tried to render my small block of dirt, but it always renders at full size.

In 1.8 blocks are rendered from .json

https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe02_block_partial

 

Overall:

Blocks aside from their main memory (id) have exact 4 bits to hold additional data (metadata). That allows you to create 16 combinations on one block in given position without using TileEntity.

I had the idea to divide almost every block in the game by 8

Do you want to split block into 8 (2x2x2) pieces or 512 (8x8x8) pieces?

Second case is impossible without placing TileEntity in given position - which will really be quite an overkill for common blocks.

In 2x2x2 case you will need to create 8 BLOCKSTATES telling which place to populate with block.

Now - the problem is in rotation.

2x2 (2 bits) allows you to have 4 world directions. You need 2x2x2 (3) to have 8 states. So now you have to design system to work nicely.

Hint: Look at stairs more (much more).

 

EDIT

As to 8x8x8 - statement "impossible" is in regards of using simple Forge+Vanilla coding to do that.

It is possible with ASM (obviously) and would require you to rewrite hugeass chunk of game.

 

EDIT 2

Btw. are you sure that is your idea? http://slimevoid.net/littleblocks/

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Yeah I'm sorry I just googled a bit more and found out about HarvestDropsEvent, thanks anyway :D

 

As for the second part, I know about .json files, as I made a new Ore and a new Block for my other mod, but those I made only contain one line, I didn't see where this could change the actual rendering process. This link looks great, thanks again :)

 

 

And yeah I mean 8 sub-blocks, so 2x2x2 make up a big one - 512 is now what I want to achieve haha ^^

And I know about LittleBlocks, that's something completely different, as it just scales all the existing blocks, which even allows for tiny redstone circuits and everything. I just want to build stairs from dirt for example. That's the main purpose :)

 

Thanks a lot for all the tips!

 

Reygok

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.

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.



×
×
  • Create New...

Important Information

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