CleanroomMC / GroovyScript

A scripting mod for Minecraft without the issues of other scripting mods.
GNU Lesser General Public License v3.0
32 stars 21 forks source link

update groovyscript docs for GTCEu 2.7+ #90

Closed Nrmot closed 3 months ago

Nrmot commented 8 months ago

just found out that the examples in https://groovyscript-docs.readthedocs.io/en/latest/groovyscript/mods/gtceu/material/ are outdated and it should be updated.

this is just one example and there may be more outdated groovyscript docs.

as of GTCEu 2.7.4, the following example script will no longer work

import gregtech.api.GregTechAPI.MaterialEvent
import gregtech.api.unification.material.Material

event_manager.listen { MaterialEvent event ->
    def specialSteel = new Material.Builder(32002, "special_steel") // name
            .fluid("gas", false) // gas without block
            .ingot() // has ingot (and therefore dust)
            .color(0x0000FF) // pure blue
            .toolStats(10, 3, 256, 21) // tool stats
            .blastTemp(2900) // EBF temperature
            .ore() // has ore blocks
            .addOreByproducts(material('gold'), material('copper')) // add byproducts
            .cableProperties(128, 2, 4, false) // add cables
            .build() // build the actual material
}

update to this:

- new Material.Builder(32002, "special_steel"). 
+ new Material.Builder(32000, resource("modpack_modid", "special_steel"))

There are more outdated examples and feel free to list them in here.

Rongmario commented 8 months ago

Feel free to PR straight into the repository

brachy84 commented 3 months ago

done https://github.com/CleanroomMC/cleanroom-website/pull/9