mirror of
https://github.com/TeamMidnightDust/ThisRocks.git
synced 2025-12-17 11:25:10 +01:00
- Based on my PolymerRocks compatibility patch, featuring many improvements over it - Less hardcoded object instances, allowing for easier addition of new variations
23 lines
827 B
Java
Executable File
23 lines
827 B
Java
Executable File
package eu.midnightdust.motschen.rocks.mixin;
|
|
|
|
import com.google.gson.JsonObject;
|
|
import net.minecraft.client.render.model.json.ModelElement;
|
|
import net.minecraft.util.JsonHelper;
|
|
import org.spongepowered.asm.mixin.Mixin;
|
|
import org.spongepowered.asm.mixin.Overwrite;
|
|
|
|
@Mixin(value = ModelElement.Deserializer.class, priority = 2000)
|
|
public class MixinModelElementDeserializer {
|
|
|
|
/**
|
|
* @author Motschen
|
|
* @reason Not cancellable
|
|
* Unlimited rotation angles for starfish
|
|
* Inspired by <a href="https://github.com/CottonMC/ModelsUnlocked/blob/master/src/main/java/io/github/cottonmc/modelsunlocked/mixin/ModelElementDeserializerMixin.java">ModelsUnlocked</a>
|
|
*/
|
|
@Overwrite
|
|
private float deserializeRotationAngle(JsonObject json) {
|
|
return (JsonHelper.getFloat(json, "angle"));
|
|
}
|
|
}
|