mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-07-19 22:57:04 +00:00
Fixes
Now Oceans have Gravel in the bottom. Now DarkOakLeaves have correct color
This commit is contained in:
parent
6fc2808592
commit
c6578405fc
Binary file not shown.
|
|
@ -29,7 +29,7 @@
|
|||
<colour name="Foliage_Jungle" value="29bc05"/>
|
||||
<colour name="Foliage_JungleHills" value="29bc05"/>
|
||||
<colour name="Foliage_Savanna" value="9eb34e"/>
|
||||
<colour name="Foliage_RoofedForest" value="28340a"/>
|
||||
<colour name="Foliage_RoofedForest" value="59ae30"/>
|
||||
|
||||
|
||||
<!-- Grass colours -->
|
||||
|
|
|
|||
41
Minecraft.Client/Common/res/TitleUpdate/res/xml2col.py
Normal file
41
Minecraft.Client/Common/res/TitleUpdate/res/xml2col.py
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import struct
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
def write_utf_string(f, s):
|
||||
# Format DataOutputStream: 2 byte lenght + string
|
||||
binary_str = s.encode('utf-8')
|
||||
f.write(struct.pack('>H', len(binary_str)))
|
||||
f.write(binary_str)
|
||||
|
||||
def convert_xml_to_col(xml_file, output_col):
|
||||
try:
|
||||
tree = ET.parse(xml_file)
|
||||
root = tree.getroot()
|
||||
|
||||
colours = []
|
||||
for colour in root.findall('colour'):
|
||||
name = colour.get('name')
|
||||
value_str = colour.get('value')
|
||||
|
||||
# Convert hex to int
|
||||
value_int = int(value_str, 16)
|
||||
colours.append((name, value_int))
|
||||
|
||||
with open(output_col, 'wb') as f:
|
||||
# Header: Version1 + colour counter
|
||||
f.write(struct.pack('>I', 1))
|
||||
f.write(struct.pack('>I', len(colours)))
|
||||
|
||||
for name, value in colours:
|
||||
write_utf_string(f, name)
|
||||
# 'I' (unsigned int) to avoid error 2 miliardi
|
||||
f.write(struct.pack('>I', value))
|
||||
|
||||
print(f"Success! Created: {output_col} with {len(colours)} colors.")
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error during conversion: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Make sure file name is "colours.xml"
|
||||
convert_xml_to_col('colours.xml', 'colours.col')
|
||||
|
|
@ -10,5 +10,7 @@ public:
|
|||
friendlies.clear();
|
||||
friendlies_chicken.clear(); // 4J added since chicken now separated from main friendlies
|
||||
friendlies_wolf.clear(); // 4J added since wolf now separated from main friendlies
|
||||
topMaterial = Tile::gravel_Id; // blocco superficiale
|
||||
material = Tile::gravel_Id;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue