mirror of
https://github.com/TeamMidnightDust/ThisRocks.git
synced 2025-12-17 19:35:10 +01:00
This Rocks 1.3.0
Fixes #5, #7, #9, #11, #13 Make rotations random Starfish is now a json model!
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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 https://github.com/CottonMC/ModelsUnlocked/blob/master/src/main/java/io/github/cottonmc/modelsunlocked/mixin/ModelElementDeserializerMixin.java
|
||||
*/
|
||||
@Overwrite
|
||||
private float deserializeRotationAngle(JsonObject json) {
|
||||
return (JsonHelper.getFloat(json, "angle"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user