Chocohead / Rift

A lightweight mod loader and API for Minecraft 1.13
MIT License
62 stars 22 forks source link

BlockStairs constructor should be public #10

Closed reoseah closed 5 years ago

reoseah commented 5 years ago

Currently, constructor in BlockStairs has protected access-modifier and that is a nuisance, as it requires to otherwise needlessly subclass BlockStairs (or put { } after constructor, which is the same).

Chocohead commented 5 years ago

You can access transform the constructor public yourself. It's a little unobvious but it is all that Rift would do:

public method bhx <init> (Lblc;Lbcs$c;)V # net.minecraft.block.BlockStairs/<init>

In an access_transformations.at in the root of your resources (ie the same place as your riftmod.json) will transform the 1.13.2 constructor for you to be public. For using it in dev you'll just have to rerun setupDecompWorkspace, at normal runtime it will be applied automatically so no need for explicit flagging like FML needed.