Jump to content

Recommended Posts

Posted

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

Posted
  On 6/10/2015 at 3:10 PM, Reygok said:

let an existing block drop something else

HarvestDropsEvent

 

  Quote

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.

  Quote

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/

  Quote

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

Posted

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

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

    • When you name a method like that, with no return value, it is a constructor. The constructor must have the same name as the class it constructs, in this case, ModItems. I would strongly advise reading up on some basic Java tutorials, because you will definitely be running into a lot more issues as you go along without the basics. *I should also add that the Forge documentation is a reference, not a tutorial. Even following tutorials, you should know Java basics, otherwise the smallest of mistakes will trip you up as you copy someone elses code.
    • so, I'm starting modding and I'm following the official documantation for forge: https://docs.minecraftforge.net, but in the registries part it is not working as it is in the docs:   public class ModItems { private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, DarkStarvation.MOD_ID); public static final RegistryObject<Item> TEST_ITEM = ITEMS.register("test_item", () -> new Item(new Item.Properties())); public DarkStarvation(FMLJavaModLoadingContext context) { ITEMS.register(context.getModEventBus()); } } in 'public DarkStarvation(...' the DarkStarvation has this error: Invalid method declaration; return type required and the getModEventBus(): Cannot resolve method 'getModEventBus' in 'FMLJavaModLoadingContext' please help, I asked gpt but it is saying that I'm using an old method, but I'm following the latest version of Forge Docs???
    • I merged your second post with the original , there is no need to post a new thread asking for an answer. If someone sees your post and can help, they will reply. If you are seeking a quicker response, you could try asking in the Minecraft Forge diacord.
    • Create a new instance and start with cobblemon - if this works, add the rest of your mods in groups   Maybe another mod is conflicting - like Sodium/Iris or Radical Cobblemon Trainers
    • https://forums.minecraftforge.net/topic/157393-1201-forge-rocket-flame-particle-trail-moves-up-and-crashes-into-the-rocket-during-flight/#comment-584134
  • Topics

×
×
  • Create New...

Important Information

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