resource_packs module

class resource_packs.DefaultResourcePack[source]

Bases: resource_packs.IResourcePack

Represents the default Resource Pack that is always present

isEmpty
terrain_path()[source]
tooBig
class resource_packs.FolderResourcePack(folder, noEncConvert=False)[source]

Bases: resource_packs.IResourcePack

add_textures()[source]

Scraps the block textures folder and puts texture data into a dictionary with exactly identical structure as ZipResourcePack

class resource_packs.IResourcePack[source]

Bases: object

Sets all base variables for a Resource Pack

handle_too_big_packs()[source]

Removes the parsed PNG file

isEmpty

Returns true if the Resource Pack doesn’t replace the minimum amount of textures

pack_name

The name of the Resource Pack

parse_terrain_png()[source]

Parses each block texture into a usable PNG file like terrain.png

terrain_name

Name of the parsed texture PNG file

terrain_path()[source]

Path to the parsed PNG file

tooBig

Returns true if the Resource Pack has a greater resolution than 32x32

class resource_packs.LeverTexture(texture_objects)[source]

Bases: resource_packs.MultipartTexture

parse_texture()[source]
runAnyway = False
target = 'lever'
class resource_packs.MultipartTexture(texture_objects)[source]

Bases: object

class resource_packs.StandingSignTexture(texture_objects)[source]

Bases: resource_packs.MultipartTexture

parse_texture()[source]
position = (320, 80)
runAnyway = True
target = ''
class resource_packs.ZipResourcePack(zipfileFile, noEncConvert=False)[source]

Bases: resource_packs.IResourcePack

Represents a single Resource Pack that is in a zip file

open_pack()[source]

Opens the zip file and puts texture data into a dictionary, where the key is the texture file name, and the value is a PIL.Image instance

resource_packs.step(slot)[source]

Utility method for multiplying the slot by 16

Parameters:slot (int) – Texture slot