parent
e50859f10d
commit
f2e557253e
24
src/main/java/org/embeddedt/modernfix/mixin/BiomeMixin.java
Normal file
24
src/main/java/org/embeddedt/modernfix/mixin/BiomeMixin.java
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
package org.embeddedt.modernfix.mixin;
|
||||||
|
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.biome.Biome;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Overwrite;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
|
||||||
|
/* Idea from Lithium for 1.19.3 */
|
||||||
|
@Mixin(Biome.class)
|
||||||
|
public abstract class BiomeMixin {
|
||||||
|
@Shadow protected abstract float getTemperatureAtPosition(BlockPos pos);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 2No2Name
|
||||||
|
* @reason Remove caching, it's not effective
|
||||||
|
* @param pos
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Overwrite
|
||||||
|
public final float getTemperature(BlockPos pos) {
|
||||||
|
return this.getTemperatureAtPosition(pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
"compatibilityLevel": "JAVA_8",
|
"compatibilityLevel": "JAVA_8",
|
||||||
"refmap": "modernfix.refmap.json",
|
"refmap": "modernfix.refmap.json",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
"BiomeMixin",
|
||||||
"ModFileResourcePackMixin",
|
"ModFileResourcePackMixin",
|
||||||
"VanillaPackMixin",
|
"VanillaPackMixin",
|
||||||
"LevelSaveMixin",
|
"LevelSaveMixin",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user