This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
package gamer.noir.curseenc.client.mixin;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.LightTexture;
|
||||||
|
import org.spongepowered.asm.mixin.Final;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(LightTexture.class)
|
||||||
|
public class NightVisionMixin {
|
||||||
|
|
||||||
|
@Shadow
|
||||||
|
@Final
|
||||||
|
private Minecraft minecraft ;
|
||||||
|
|
||||||
|
@ModifyVariable(method = "updateLightTexture" ,at = @At(value = "NEW", target = "(FFF)Lorg/joml/Vector3f;",ordinal = 0), ordinal = 6)
|
||||||
|
float customNightVision(float original) {
|
||||||
|
if (this.minecraft.player != null && this.minecraft.player.) {
|
||||||
|
return 1 ;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return original ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "gamer.noir.curseenc.client.mixin",
|
"package": "gamer.noir.curseenc.client.mixin",
|
||||||
"compatibilityLevel": "JAVA_21",
|
"compatibilityLevel": "JAVA_21",
|
||||||
"client": [
|
"client": [
|
||||||
"ExampleClientMixin"
|
"ExampleClientMixin",
|
||||||
],
|
"NightVisionMixin"
|
||||||
"injectors": {
|
],
|
||||||
"defaultRequire": 1
|
"injectors": {
|
||||||
},
|
"defaultRequire": 1
|
||||||
"overwrites": {
|
},
|
||||||
"requireAnnotations": true
|
"overwrites": {
|
||||||
|
"requireAnnotations": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package gamer.noir.curseenc.power
|
||||||
|
|
||||||
|
class BatMode {
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package gamer.noir.curseenc.power
|
||||||
|
|
||||||
|
class CreeperTerror {
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package gamer.noir.curseenc.power
|
||||||
|
|
||||||
|
class HyperSpeed {
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package gamer.noir.curseenc.power
|
||||||
|
|
||||||
|
import gamer.noir.curseenc.CurseOfEienNoChi
|
||||||
|
import gamer.noir.curseenc.power.events.PowerOnStop
|
||||||
|
import net.minecraft.resources.ResourceLocation
|
||||||
|
|
||||||
|
object NightVision : Power {
|
||||||
|
override val id: ResourceLocation = ResourceLocation.fromNamespaceAndPath(CurseOfEienNoChi.MOD_ID,"night_vision")
|
||||||
|
override val icon: ResourceLocation = ResourceLocation.fromNamespaceAndPath(CurseOfEienNoChi.MOD_ID, "textures/Power/night_vision.png")
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package gamer.noir.curseenc.power
|
||||||
|
|
||||||
|
import net.minecraft.resources.ResourceLocation
|
||||||
|
import net.minecraft.server.packs.resources.Resource
|
||||||
|
|
||||||
|
interface Power {
|
||||||
|
val id: ResourceLocation
|
||||||
|
val icon : ResourceLocation
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package gamer.noir.curseenc.power
|
||||||
|
|
||||||
|
class RageMod {
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package gamer.noir.curseenc.power
|
||||||
|
|
||||||
|
class UndeadFamily {
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package gamer.noir.curseenc.power.events
|
||||||
|
|
||||||
|
interface PowerOnSpawn {
|
||||||
|
fun onSpawn()
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package gamer.noir.curseenc.power.events
|
||||||
|
|
||||||
|
interface PowerOnStart {
|
||||||
|
fun onStart()
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package gamer.noir.curseenc.power.events
|
||||||
|
|
||||||
|
interface PowerOnStop {
|
||||||
|
fun onStop()
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package gamer.noir.curseenc.power.events
|
||||||
|
|
||||||
|
interface PowerOnTick {
|
||||||
|
fun onTick()
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 270 B |
Reference in New Issue
Block a user