Giter Site home page Giter Site logo

burger's People

Contributors

amund211 avatar dalbothek avatar deathcap avatar mat-1 avatar mostawesomedude avatar nickelpro avatar pdelvo avatar pokechu22 avatar tktech avatar u9g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

burger's Issues

Dependencies

This depends on installing Solum, I think you should put that in the readme.

Error when trying to use this

I tried to get some information about 1.15.2, but i got the following error:

[threadexception@localhost Burger-master]$ python munch.py -d 1.15.2 --output items_out.json
Traceback (most recent call last):
  File "/home/threadexception/Downloads/mappings/Burger-master/munch.py", line 229, in <module>
    classloader = ClassLoader(path, max_cache=0, bytecode_transforms=[simple_swap, expand_constants])
  File "/usr/local/lib/python3.9/site-packages/jawa-2.2.0-py3.9.egg/jawa/classloader.py", line 50, in __init__
    self.update(*sources)
  File "/usr/local/lib/python3.9/site-packages/jawa-2.2.0-py3.9.egg/jawa/classloader.py", line 93, in update
    zf = ZipFile(source, 'r')
  File "/usr/lib64/python3.9/zipfile.py", line 1257, in __init__
    self._RealGetContents()
  File "/usr/lib64/python3.9/zipfile.py", line 1324, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

Jawa / Solum doesn't exist

Hey,

I tried to use this program, however I couldn't get it working. I'm not a Python expert so this might be my problem.

First I tried
python setup.py install
Output:

running install
running build
running build_py
error: package directory 'solum' does not exist

After that I tried to run the munch.py
python munch.py --download
Output:

Traceback (most recent call last):
  File "munch.py", line 134, in <module>
    all_toppings = import_toppings()
  File "munch.py", line 68, in import_toppings
    __import__("burger.toppings.%s" % topping)
  File "/home/adr/mc/burger/Burger-mc18/Burger/burger/toppings/packetinstructions.py", line 31, in <module>
    from jawa.util.descriptor import method_descriptor
ImportError: No module named jawa.util.descriptor

I looked inside the setup.py file, that uses a dependency 'solum' with a link to a non-existing github repository: http://github.com/TkTech/Solum

Could this be the issue?

Python version: Python 2.7.10
Also tried it with 'python3': Python 3.4.3+

Thanks

Cant get it to run: SyntaxError: invalid syntax

$ python munch.py ~/Desktop/server.jar
Traceback (most recent call last):
  File "munch.py", line 37, in <module>
    from jawa.classloader import ClassLoader
  File "/usr/local/lib/python2.7/site-packages/jawa-2.2.0-py2.7.egg/jawa/classloader.py", line 41
    def __init__(self, *sources, max_cache: int=50, klass=ClassFile,
                                         ^
SyntaxError: invalid syntax

I have run the setup.py install and it seems to have worked...

$ python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to Burger.egg-info/requires.txt
writing Burger.egg-info/PKG-INFO
writing top-level names to Burger.egg-info/top_level.txt
writing dependency_links to Burger.egg-info/dependency_links.txt
reading manifest file 'Burger.egg-info/SOURCES.txt'
writing manifest file 'Burger.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.15-x86_64/egg
running install_lib
running build_py
creating build/bdist.macosx-10.15-x86_64/egg
creating build/bdist.macosx-10.15-x86_64/egg/burger
copying build/lib/burger/util.py -> build/bdist.macosx-10.15-x86_64/egg/burger
copying build/lib/burger/__init__.py -> build/bdist.macosx-10.15-x86_64/egg/burger
copying build/lib/burger/roundedfloats.py -> build/bdist.macosx-10.15-x86_64/egg/burger
creating build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/tags.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/topping.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/biomes.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/version.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/sounds.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/entitymetadata.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/blockstates.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/__init__.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/stats.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/language.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/recipes.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/packetinstructions.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/entities.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/identify.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/blocks.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/objects.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/items.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/tileentities.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/toppings/packets.py -> build/bdist.macosx-10.15-x86_64/egg/burger/toppings
copying build/lib/burger/website.py -> build/bdist.macosx-10.15-x86_64/egg/burger
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/util.py to util.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/roundedfloats.py to roundedfloats.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/tags.py to tags.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/topping.py to topping.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/biomes.py to biomes.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/version.py to version.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/sounds.py to sounds.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/entitymetadata.py to entitymetadata.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/blockstates.py to blockstates.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/__init__.py to __init__.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/stats.py to stats.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/language.py to language.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/recipes.py to recipes.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/packetinstructions.py to packetinstructions.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/entities.py to entities.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/identify.py to identify.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/blocks.py to blocks.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/objects.py to objects.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/items.py to items.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/tileentities.py to tileentities.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/toppings/packets.py to packets.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/burger/website.py to website.pyc
creating build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
copying Burger.egg-info/PKG-INFO -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
copying Burger.egg-info/SOURCES.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
copying Burger.egg-info/dependency_links.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
copying Burger.egg-info/requires.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
copying Burger.egg-info/top_level.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/Burger-0.3.0-py2.7.egg' and adding 'build/bdist.macosx-10.15-x86_64/egg' to it
removing 'build/bdist.macosx-10.15-x86_64/egg' (and everything under it)
Processing Burger-0.3.0-py2.7.egg
Removing /usr/local/lib/python2.7/site-packages/Burger-0.3.0-py2.7.egg
Copying Burger-0.3.0-py2.7.egg to /usr/local/lib/python2.7/site-packages
Burger 0.3.0 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/site-packages/Burger-0.3.0-py2.7.egg
Processing dependencies for Burger==0.3.0
Searching for jawa==2.2.0
Best match: jawa 2.2.0
Processing jawa-2.2.0-py2.7.egg
jawa 2.2.0 is already the active version in easy-install.pth
Installing jawa script to /usr/local/bin

Using /usr/local/lib/python2.7/site-packages/jawa-2.2.0-py2.7.egg
Searching for six==1.15.0
Best match: six 1.15.0
Processing six-1.15.0-py2.7.egg
six 1.15.0 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/site-packages/six-1.15.0-py2.7.egg
Searching for click==7.1.2
Best match: click 7.1.2
Processing click-7.1.2-py2.7.egg
click 7.1.2 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/site-packages/click-7.1.2-py2.7.egg
Finished processing dependencies for Burger==0.3.0

What am I doing wrong/missing? ๐Ÿ˜‰

Might be an idea to have paragraph in the README about installation steps/requirements?

Smelting Data

Hi,

I cant seem to find any existing recipes for smelting information (only crafting recipes).

Would this be a new "topping"?

For example:

data/minecraft/recipes/iron_ingot.json

That file contains:

{
  "type": "minecraft:smelting",
  "ingredient": {
    "item": "minecraft:iron_ore"
  },
  "result": "minecraft:iron_ingot",
  "experience": 0.7,
  "cookingtime": 200
}

There is a whole load of recipes "missing" from the recipes.json output, although I can appreciate why that is. Maybe these should be in their own aggregation?

grep 'minecraft:smelting' *
baked_potato.json:  "type": "minecraft:smelting",
black_glazed_terracotta.json:  "type": "minecraft:smelting",
blue_glazed_terracotta.json:  "type": "minecraft:smelting",
brick.json:  "type": "minecraft:smelting",
brown_glazed_terracotta.json:  "type": "minecraft:smelting",
charcoal.json:  "type": "minecraft:smelting",
coal_from_smelting.json:  "type": "minecraft:smelting",
cooked_beef.json:  "type": "minecraft:smelting",
cooked_chicken.json:  "type": "minecraft:smelting",
cooked_cod.json:  "type": "minecraft:smelting",
cooked_mutton.json:  "type": "minecraft:smelting",
cooked_porkchop.json:  "type": "minecraft:smelting",
cooked_rabbit.json:  "type": "minecraft:smelting",
cooked_salmon.json:  "type": "minecraft:smelting",
cracked_stone_bricks.json:  "type": "minecraft:smelting",
cyan_glazed_terracotta.json:  "type": "minecraft:smelting",
diamond_from_smelting.json:  "type": "minecraft:smelting",
dried_kelp_from_smelting.json:  "type": "minecraft:smelting",
emerald_from_smelting.json:  "type": "minecraft:smelting",
glass.json:  "type": "minecraft:smelting",
gold_ingot.json:  "type": "minecraft:smelting",
gold_nugget_from_smelting.json:  "type": "minecraft:smelting",
gray_glazed_terracotta.json:  "type": "minecraft:smelting",
green_dye.json:  "type": "minecraft:smelting",
green_glazed_terracotta.json:  "type": "minecraft:smelting",
iron_ingot.json:  "type": "minecraft:smelting",
iron_nugget_from_smelting.json:  "type": "minecraft:smelting",
lapis_from_smelting.json:  "type": "minecraft:smelting",
light_blue_glazed_terracotta.json:  "type": "minecraft:smelting",
light_gray_glazed_terracotta.json:  "type": "minecraft:smelting",
lime_dye_from_smelting.json:  "type": "minecraft:smelting",
lime_glazed_terracotta.json:  "type": "minecraft:smelting",
magenta_glazed_terracotta.json:  "type": "minecraft:smelting",
nether_brick.json:  "type": "minecraft:smelting",
orange_glazed_terracotta.json:  "type": "minecraft:smelting",
pink_glazed_terracotta.json:  "type": "minecraft:smelting",
popped_chorus_fruit.json:  "type": "minecraft:smelting",
purple_glazed_terracotta.json:  "type": "minecraft:smelting",
quartz.json:  "type": "minecraft:smelting",
red_glazed_terracotta.json:  "type": "minecraft:smelting",
redstone_from_smelting.json:  "type": "minecraft:smelting",
smooth_quartz.json:  "type": "minecraft:smelting",
smooth_red_sandstone.json:  "type": "minecraft:smelting",
smooth_sandstone.json:  "type": "minecraft:smelting",
smooth_stone.json:  "type": "minecraft:smelting",
sponge.json:  "type": "minecraft:smelting",
stone.json:  "type": "minecraft:smelting",
terracotta.json:  "type": "minecraft:smelting",
white_glazed_terracotta.json:  "type": "minecraft:smelting",
yellow_glazed_terracotta.json:  "type": "minecraft:smelting",

Blocks topping crashes on 1.17 due to candles

in 1.17, candles were added, which can be stacked up to 4 in a single block
Light level emitted by candles depends on the amount of candles in block and their lit status, which is handled by the lambda in the candle block class looking like follows:

h = (var0) -> {
    return (Boolean)var0.c(f) ? 3 * (Integer)var0.c(e) : 0;
};

Since passed lambda is initialized inside of the BlockCandle as a static field and then referenced in Blocks class, currently burger will not resolve it properly through intercepting GETSTATIC, so default object will be returned, which will cause JSON serialization issues down the line

Simplest solution would be to hard-code light level of 12 to candles, by looking at the signature of the field get and falling back to hard-coded value. Obviously proper solution would involve looking into static fields and their initializers, but it's rather hard and requires investigating code outside of the primary blocks class

A lot of toppings don't work

Trying to run Burger on a 1.12.2 jar, and am getting errors on the majority of toppings.

Full log

Per-topping breakdown of functionality (check mark means it works):

  • biomes
  • blocks
  • blockstates
  • entities
  • identify
  • items
  • language
  • objects
  • packetinstructions
  • packets
  • recipes
  • sounds
  • stats
  • tags (output is completely empty for this though, is that intended?)
  • tileentities
  • version

I'm running Python 3.6.7, and the latest commit from master (3fb0652).

Am I doing something wrong, is the latest commit for 1.13 only (I haven't even tried it on 1.13 yet), or are these toppings just fundamentally broken?

Minecraft 1.5+ breaks Burger

When I try to run on a minecraft.jar v1.5+, (including snapshot 13w11a) I get an error like this:

Traceback (most recent call last):
  File "Burger/munch.py", line 238, in <module>
    topping.act(aggregate, jar, verbose)
  File "/home/dominic/Dropbox/Development/node-minecraft-ids/Burger/burger/toppings/blocks.py", line 164, in act
    for instruction in constructor.instructions:
AttributeError: 'NoneType' object has no attribute 'instructions'

broken toppings

Using packet-instructions topping in version 1.20.1 and 1.20.2 causes an error.

Failed to run <class 'burger.toppings.identify.IdentifyTopping'>
Traceback (most recent call last):
  File "C:\Users\angel\Desktop\burger\Burger-master\munch.py", line 252, in <module>
    topping.act(aggregate, classloader, verbose)
  File "C:\Users\angel\Desktop\burger\Burger-master\burger\toppings\identify.py", line 307, in act
    raise Exception(
Exception: Already registered enumfacing.plane to esk$b! Can't overwrite it with esw
Dependencies failed for <class 'burger.toppings.packets.PacketsTopping'>: Missing ['identify.packet.connectionstate', 'identify.packet.packetbuffer']
Dependencies failed for <class 'burger.toppings.packetinstructions.PacketInstructionsTopping'>: Missing ['packets.classes', 'identify.packet.packetbuffer', 'identify.nbtcompound', 'identify.itemstack', 'identify.chatcomponent', 'identify.metadata', 'identify.resourcelocation']

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.