liuweireign / tectonicus

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

Does not work with MC Version 1.7.2 #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There seems to be something missing in the 1.7.2 minecraft.jar: Either it's 
"font/ascii.png" or "font.txt" (see TexturePack.java, line(s) 234-249).

Using an older minecraft jar (1.6.4) works nicely. I was unable to find 
"font.txt" in any jar, maybe I wasn't looking right.

Log:
[snip]
Loading level.dat
Loading textures
java.lang.RuntimeException: Couldn't load textures from 
C:\Users\Basuro\AppData\Roaming\.minecraft\versions\1.7.2\1.7.2.jar
    at tectonicus.texture.TexturePack.<init>(TexturePack.java:253)
    at tectonicus.world.World.<init>(World.java:190)
    at tectonicus.TileRenderer.output(TileRenderer.java:250)
    at tectonicus.TectonicusApp.run(TectonicusApp.java:952)
    at tectonicus.TectonicusApp.main(TectonicusApp.java:1212)
Caused by: java.lang.RuntimeException: Couldn't find font resources in 
C:\Users\Basuro\AppData\Roaming\.minecraft\versions\1.7.2\1.7.2.jar
    at tectonicus.texture.TexturePack.<init>(TexturePack.java:248)
    ... 4 more
[snip]

Original issue reported on code.google.com by andreas....@gmx.de on 5 Nov 2013 at 12:28

GoogleCodeExporter commented 9 years ago
Just found the location of "font.txt" in the old (1.6.4) minecraft jar.
In the new (1.7.2) MC jar, it's really missing.

Seems like a new way of locating the font character positions needs to be found.
(Is it even necessary to load the font stuff? I couldn't find any text that 
uses it..)

Original comment by andreas....@gmx.de on 5 Nov 2013 at 12:37

GoogleCodeExporter commented 9 years ago
Copied the "font.txt" from an older MC jar (1.6.4) to the new one (1.7.2) and 
it works. Just the block textures are missing.

Original comment by andreas....@gmx.de on 5 Nov 2013 at 1:34

GoogleCodeExporter commented 9 years ago
The font is used for rendering signs on the map.  Tectonicus currently only 
supports a subset of ascii characters (those in the font.txt file).  In the 
future it might be nice to support all the unicode characters that Minecraft 
supports, but since I don't have much free time right now I'll just check in a 
quick fix for this issue so we can get a 1.7 compatible version of Tectonicus 
out. 

Original comment by skoeven on 7 Nov 2013 at 1:07

GoogleCodeExporter commented 9 years ago
I've included the font.txt file in the Tectonicus jar for now.  In the future 
we may need to look at a different way to handle this, but for now this should 
work.

Original comment by skoeven on 7 Nov 2013 at 5:57

GoogleCodeExporter commented 9 years ago
I going to wait on uploading a new jar to Google Code until I have time to add 
the new MC 1.7 blocks.  In fact I'll just leave this issue open as a reminder 
until I get that done.

Original comment by skoeven on 7 Nov 2013 at 6:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Here is a config excerpt for (most of) the new blocks:
* Acacia and Dark Oak Logs, Planks, Leaves and Stairs
* Single-Block flowers
* Double-Block flower (but they suck)
* Stained Glass and Glass Panes
* Packed Ice

Tall flowers are kind of tricky because the top part is determined by analyzing 
the bottom part, which I was not sure how to do in the block config. Also, tall 
grass and fern are always gray (I think the png needs to be colorized depending 
on the biome colors).

Stained glass blocks have the same id as the removed "locked chest" block.

Original comment by andreas....@gmx.de on 7 Nov 2013 at 10:57

Attachments:

GoogleCodeExporter commented 9 years ago
Now, I also added:
* Slabs
* Podzol
* Red Sand

additionalBlocks.xml are is just all the new stuff (be careful when inserting 
into block config, some lines replace others (ids match mostly though).

extendedBlocks.xml is my complete new block config.

What I cannot make work correctly are the flower pots:
They seem to have different value AND item properties,
flowers being 140:0 through 140:8 with an item value of 38 and
sapling being 140:0 through 140:5 with an item value of 6.

Is it possible to switch on the "Item" property in a blocks id="" field?

Original comment by andreas....@gmx.de on 7 Nov 2013 at 12:37

Attachments:

GoogleCodeExporter commented 9 years ago
The stained glass blocks and panes seem to need alpha-blending.

Original comment by andreas....@gmx.de on 7 Nov 2013 at 4:36

GoogleCodeExporter commented 9 years ago
Thanks for your help! I've added the new blocks from your xml file to the 
defaultBlockConfig file.  I also made a change to the Glass and GlassPane 
blocks so they should render better now.  GlassPanes still have some texture 
problems that need to be fixed.

Original comment by skoeven on 8 Nov 2013 at 8:48

GoogleCodeExporter commented 9 years ago
I've checked in changes that make GlassPanes behave more like they should, but 
there's still some texturing issues with them though.  Kind of a pain to fix.

I also made it so plants can have a top and bottom texture in the block config. 
 Sunflowers still look a bit strange because they have four different textures 
but I only use two.

The only major thing left now is the new plants in flowerpots.  Unfortunately, 
there doesn't seem to be new data values for the new flowers.  I'll need to do 
some experimenting to see if I can figure out what's going on.

Original comment by skoeven on 9 Nov 2013 at 6:07

GoogleCodeExporter commented 9 years ago
Hi!

Concerning the flowerpots:
There seems to be some new style of saving the flower pot contents (as I 
mentioned earlier) and I took a little look into it:
Minecraft now uses two different values in the block tag to identify what's in 
the pot:
Data and Item
Flowers have Item 38 and Data from 0 to 8.
Saplings have Item 6 and Data 0 to 5.
Dandelion, Brown and Red Mushroom, Fern and Dead Brush have Data 0 and 
differing Item Nos.

Thus, it might be usedful to include another value in the block config (The 
Item value) to identify the different types of flowers since I'm pretty sure 
this new saving technique won't be the last we see of it...

I've built two images to help with that, I think they're almost 
self-explanatory... Enjoy ;)

Original comment by andreas....@gmx.de on 9 Nov 2013 at 12:47

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the images, they were very helpful.  What tool are you using that 
lets you see the NBT data for a block?  That would be handy to have.

I've changed the code so that it now grabs all the TileEntities for Flower 
Pots.  With that info a FlowerPot object can look in the block registry via the 
TileEntity Item and Data fields and find the correct flower or sapling to use.  
That means we don't have to add any new lines to the block config xml for new 
FlowerPots.  As long as new flowers or plants get added correctly to the block 
config xml, FlowerPots can find them automatically.

Also, as a side note, I removed the Sapling object because it was unnecessary.  
Saplings are now Plants in the block config xml.

Original comment by skoeven on 10 Nov 2013 at 12:46

GoogleCodeExporter commented 9 years ago
Sounds cool, can't wait to render my maps with the new version :)

As for the NBT data view tool, I use MCEdit (http://www.mcedit.net/).

Original comment by andreas....@gmx.de on 10 Nov 2013 at 9:16

GoogleCodeExporter commented 9 years ago
The new version is up.  I'll go ahead and close this issue now.

Original comment by skoeven on 11 Nov 2013 at 5:19