liuweireign / tectonicus

Automatically exported from code.google.com/p/tectonicus
0 stars 0 forks source link

customBlocks appear to be broken #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I and other server owners have been trying to get customBlocks to work with 
RedPower in 2.10 and 2.11 for the past few days.  customBlocks worked when last 
tested (MC 1.8) so it seems something broke since then.  Have tried DataSolid 
values from the old working install, tried the new metadata capable Solid 
values, tried quite a variety of configuration formats documented in a variety 
of places, no one has as yet been able to get it working.

Part of the blockConfig file as an example of the format used according to the 
most recently found documentation and examples:
<blockConfig version="1">

    <Solid id="140:0" name="Redpower Ore - Gems - Red" texture="./images/RP2/world1.png[0, 2]" />
    <Solid id="140:1" name="Redpower Ore - Gems - Green" texture="./images/RP2/world1.png[1, 2]" />
    <Solid id="140:2" name="Redpower Ore - Gems - Blue" texture="./images/RP2/world1.png[2, 2]" />
    <Solid id="140:3" name="Redpower Ore - Silver" texture="./images/RP2/world1.png[3, 2]" />
    <Solid id="140:4" name="Redpower Ore - Tin" texture="./images/RP2/world1.png[4, 2]" />
    <Solid id="140:5" name="Redpower Ore - Copper" texture="./images/RP2/world1.png[5, 2]" />
    <Solid id="140:6" name="Redpower Ore - Tungsten" texture="./images/RP2/world1.png[6, 2]" />
...snip...

The layer node definition that we have been trying as a minimal setup, although 
we have tried fully set up ones and all as well, including disabling 
useDefaultBlocks and a variety of other formats including both relative and 
absolute directory paths:
...snip...
        <layer name="Day"
               lighting="day"
               useDefaultBlocks="true"
               customBlocks="./rp2.xml"
        />
...snip...

Original issue reported on code.google.com by Overmind...@gmail.com on 30 Apr 2012 at 4:51

GoogleCodeExporter commented 9 years ago
This problem appears to be caused by a bug in the anvil loading code (could 
also be in the MCRegion code, but I didn't check). In Java, the byte type is 
signed, so blockIds > = 128 will appear to be negative. So, block 140 would 
actually appear to be -16.

I've attached a patch that fixes this bug. I don't know if it fits in with the 
rest of the style (I'm not a big Java guy), but regardless the fix is pretty 
easy.

Original comment by caron.m...@gmail.com on 30 Apr 2012 at 7:43

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the fix mike. I've added this now and uploaded a new version.

I don't have a suiable world to test with right now, could you guys test the 
v2.13 build and see if that fixes things for you?

Original comment by orangytang on 30 Apr 2012 at 8:41

GoogleCodeExporter commented 9 years ago
Appears to be resolved here, very nice.  Thank you.

Original comment by Overmind...@gmail.com on 1 May 2012 at 7:09

GoogleCodeExporter commented 9 years ago

Original comment by orangytang on 1 May 2012 at 7:41