Ckathode / archimedes-ships

Archimedes' Ships Minecraft mod
MIT License
49 stars 53 forks source link

How to add blocks to S:allowed_blocks #7

Closed anion155 closed 8 months ago

anion155 commented 9 years ago

I want to add gates and wires from redproject mod. How can I know in code mod and blocks names to add it to S:allowed_blocks? What should I write to *.mrot file?

anion155 commented 9 years ago

I just want to add some lamps.

Ckathode commented 9 years ago

You can get the block name by calling Block.blockRegistry.getNameForObject(Object); I believe the returned String is prefixed by the mod ID which the block belongs to.

If you open the file (minecraft folder)/config/ArchimedesShips/default.mrot, you can read about how to use it. Preferably you implement the Block.rotateBlock(World worldObj, int x, int y, int z, ForgeDirection axis) method, which offers a lot more flexibility.