<commit_before>package com.bitdecay.game.editor;

import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.bitdecay.game.component.IconComponent;
import com.bitdecay.game.component.SizeComponent;
import com.bitdecay.game.gameobject.MyGameObject;
import com.bitdecay.game.gameobject.MyGameObjectFactory;
import com.bitdecay.jump.BitBody;
import com.bitdecay.jump.annotation.CantInspect;
import com.bitdecay.jump.gdx.level.RenderableLevelObject;
import com.bitdecay.jump.geom.BitRectangle;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

public class ConfBasedLevelObject extends RenderableLevelObject {

    @CantInspect
    private final String name;

    @CantInspect
    private final MyGameObject obj;

    public ConfBasedLevelObject(){
        this.name = "default";
        this.obj = null;
        this.rect = new BitRectangle(0, 0, 20, 20);
    }

    @JsonCreator
    public ConfBasedLevelObject(@JsonProperty("name") String name){
        super();
        System.out.println("Called with name property: " + name);
        this.name = name;
        this.rect = new BitRectangle(0, 0, 20, 20);

        obj = MyGameObjectFactory.objectFromConf(null, name, 0, 0);

        rect = new BitRectangle(0, 0, 16, 16); // default values in case there is no size
        obj.getComponent(SizeComponent.class).ifPresent(size -> {
            rect.width = size.w;
            rect.height = size.h;
        });
    }

    @Override
    public RenderableLevelObject newInstance() {
        return new ConfBasedLevelObject(name);
    }

    @Override
    public TextureRegion texture() {
        return obj.getComponent(IconComponent.class).map(IconComponent::icon).orElseGet(null);
    }

    @Override
    public BitBody buildBody() {
        return null; // I guess this stays null?
    }

    @Override
    public String name() {
        return name;
    }
}<commit_msg>since I backed out a change to jump, I also backed out that change in this class.<commit_after>package com.bitdecay.game.editor;

import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.bitdecay.game.component.IconComponent;
import com.bitdecay.game.component.SizeComponent;
import com.bitdecay.game.gameobject.MyGameObject;
import com.bitdecay.game.gameobject.MyGameObjectFactory;
import com.bitdecay.jump.BitBody;
import com.bitdecay.jump.annotation.CantInspect;
import com.bitdecay.jump.gdx.level.RenderableLevelObject;
import com.bitdecay.jump.geom.BitRectangle;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

public class ConfBasedLevelObject extends RenderableLevelObject {

    @CantInspect
    private final String name;

    @CantInspect
    private final MyGameObject obj;

    public ConfBasedLevelObject(){
        throw new RuntimeException("If this constructor gets called, then there is no way to figure out what game object this level object refers to.");
    }

    @JsonCreator
    public ConfBasedLevelObject(@JsonProperty("name") String name){
        super();
        this.name = name;
        this.rect = new BitRectangle(0, 0, 20, 20);

        obj = MyGameObjectFactory.objectFromConf(null, name, 0, 0);

        rect = new BitRectangle(0, 0, 16, 16); // default values in case there is no size
        obj.getComponent(SizeComponent.class).ifPresent(size -> {
            rect.width = size.w;
            rect.height = size.h;
        });
    }

    @Override
    public TextureRegion texture() {
        return obj.getComponent(IconComponent.class).map(IconComponent::icon).orElseGet(null);
    }

    @Override
    public BitBody buildBody() {
        return null; // I guess this stays null?
    }

    @Override
    public String name() {
        return name;
    }
}
{'fraction_non_alphanumeric': 0.09899947340705635, 'fraction_numerical': 0.009478672985781991, 'mean_word_length': 3.2733408323959505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1462799', 'n_tokens_mistral': 1178, 'n_tokens_neox': 1108, 'n_words': 265}