Skip to content

Conversation

@JamesYeoman
Copy link

In order to add the support, I had to update the forge version as AE2 requires that version as a minimum.

I'm not exactly very artistic so I used the Sapphire Chicken model as a base and an RGB Gradient site to change the colours of it to a more certus-quartzy pallete.

In order to add the support, I had to update the forge version as AE2 requires that version as a minimum.
@JamesYeoman
Copy link
Author

JamesYeoman commented Oct 5, 2019

@GenDeathrow You might want to consider adding a .editorconfig file at some point to enforce code style. I found various conflicting styles when exploring the code.

One particular thing that would benefit from the .editorconfig is whitespace. I discovered that there're places that are indented with a mixture of space and tab.

Also, I have an idea for how to implement extensibility that wouldn't involve PRs. Basically, by utilizing Java Annotations, it could be possible to dynamically load in chicken definitions from the classpath.

I imagine an addon chicken class would look something like as follows

import com.gendeathrow.morechickens.api.annotations.MoreChickensAddon;
import com.gendeathrow.morechickens.api.interfaces.IChicken;
import com.gendeathrow.morechickens.api.Utility.*;
import net.minecraft.util.Tuple;

import static com.gendeathrow.morechickens.api.Utility.getChickenById;

// requiredModId would be an optional parameter with a default
// value of "". Then, when loading all the chickens, a `Loader.isModLoaded`
// check could be done
@MoreChickensAddon(requiredModId = "appliedenergistics2")
class CertusQuartzChicken extends IChicken {
    @GameRegistry.ObjectHolder("appliedenergistics2:material")
    public static final Item certusQuartz = null;

    public CertusQuartzChicken() {
        super("Certus Quartz Chicken", "certusQuartzChicken", "textures/certus_quartz_chicken.png");
        this.setBgColor(0xb4d9fd);
        this.setFgColor(0xbfceda);
        this.setSpawnType(SpawnType.NONE); // Utility.SpawnType
        this.setLayItem(new ItemStack(certusQuartz, 1, 0));
    }

    // The reason for it being a method rather than a property
    // is because all the chickens need to be created first.
    // That way, chickens can have parents that are also created by the addon.
    // E.g. a Fluix Chicken that has parents of the Redstone Chicken and the Certus Quartz Chicken 
    @Override
    public Tuple<IChicken, IChicken> getParents() {
        return new Tuple(getChickenById(VanillaChickens.Quartz), getChickenById(VanillaChickens.Glowstone));
    }
}

@Azzurvif
Copy link
Contributor

Please merge this update !! The world needs it :)

@PhoenixxClaw
Copy link

Please Merge this. This is the best addition I've seen so far and I'd love to have this be a part of it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants