This commit is contained in:
parent
ac1ee8ec6d
commit
59a2175fb2
@ -4,17 +4,17 @@ org.gradle.parallel=true
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.21.4
|
minecraft_version=1.21.5
|
||||||
yarn_mappings=1.21.4+build.8
|
yarn_mappings=1.21.5+build.1
|
||||||
loader_version=0.16.14
|
loader_version=0.16.14
|
||||||
loom_version=1.10-SNAPSHOT
|
loom_version=1.10-SNAPSHOT
|
||||||
|
|
||||||
# Fabric API
|
# Fabric API
|
||||||
fabric_version=0.119.3+1.21.4
|
fabric_version=0.127.0+1.21.5
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.1.2+1.21.4
|
mod_version = 1.1.2+1.21.5
|
||||||
maven_group = ru.themixray
|
maven_group = ru.themixray
|
||||||
archives_base_name = repeating-mod
|
archives_base_name = repeating-mod
|
||||||
|
|
||||||
# Compatible with: 1.21.4, ?
|
# Compatible with: 1.21.5
|
@ -19,7 +19,7 @@ public class BlockInteractEvent extends RecordEvent {
|
|||||||
Double.parseDouble(a[0]),
|
Double.parseDouble(a[0]),
|
||||||
Double.parseDouble(a[1]),
|
Double.parseDouble(a[1]),
|
||||||
Double.parseDouble(a[2])),
|
Double.parseDouble(a[2])),
|
||||||
Direction.byId(Integer.parseInt(a[4])),
|
Direction.byIndex(Integer.parseInt(a[4])),
|
||||||
new BlockPos(
|
new BlockPos(
|
||||||
Integer.parseInt(a[0]),
|
Integer.parseInt(a[0]),
|
||||||
Integer.parseInt(a[1]),
|
Integer.parseInt(a[1]),
|
||||||
@ -44,7 +44,7 @@ public class BlockInteractEvent extends RecordEvent {
|
|||||||
String.valueOf(hitResult.getBlockPos().getY()),
|
String.valueOf(hitResult.getBlockPos().getY()),
|
||||||
String.valueOf(hitResult.getBlockPos().getZ()),
|
String.valueOf(hitResult.getBlockPos().getZ()),
|
||||||
(hitResult.isInsideBlock() ? "1" : "0"),
|
(hitResult.isInsideBlock() ? "1" : "0"),
|
||||||
String.valueOf(hitResult.getSide().getId()),
|
String.valueOf(hitResult.getSide().getIndex()),
|
||||||
hand.name()
|
hand.name()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
package ru.themixray.repeating_mod.event.events;
|
package ru.themixray.repeating_mod.event.events;
|
||||||
|
|
||||||
|
import net.minecraft.client.input.Input;
|
||||||
import net.minecraft.util.PlayerInput;
|
import net.minecraft.util.PlayerInput;
|
||||||
|
import net.minecraft.util.math.Vec2f;
|
||||||
import ru.themixray.repeating_mod.Main;
|
import ru.themixray.repeating_mod.Main;
|
||||||
import ru.themixray.repeating_mod.event.RecordEvent;
|
import ru.themixray.repeating_mod.event.RecordEvent;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
public class InputEvent extends RecordEvent {
|
public class InputEvent extends RecordEvent {
|
||||||
public Boolean forward;
|
public Boolean forward;
|
||||||
public Boolean backward;
|
public Boolean backward;
|
||||||
@ -36,8 +40,8 @@ public class InputEvent extends RecordEvent {
|
|||||||
Main.client.player.getPitch(),
|
Main.client.player.getPitch(),
|
||||||
Main.client.player.getYaw(),
|
Main.client.player.getYaw(),
|
||||||
Main.client.player.getMovementSpeed(),
|
Main.client.player.getMovementSpeed(),
|
||||||
Main.client.player.input.movementForward,
|
Main.client.player.input.getMovementInput().y,
|
||||||
Main.client.player.input.movementSideways
|
Main.client.player.input.getMovementInput().x
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,8 +172,13 @@ public class InputEvent extends RecordEvent {
|
|||||||
if (Main.client.player.getMovementSpeed() != speed)
|
if (Main.client.player.getMovementSpeed() != speed)
|
||||||
Main.client.player.setMovementSpeed(speed);
|
Main.client.player.setMovementSpeed(speed);
|
||||||
|
|
||||||
Main.client.player.input.movementSideways = movementSideways;
|
try {
|
||||||
Main.client.player.input.movementForward = movementForward;
|
Field field = Input.class.getDeclaredField("movementVector");
|
||||||
|
field.setAccessible(true);
|
||||||
|
field.set(Main.client.player.input, new Vec2f(movementSideways, movementForward));
|
||||||
|
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
PlayerInput input = Main.client.player.input.playerInput;
|
PlayerInput input = Main.client.player.input.playerInput;
|
||||||
Main.client.player.input.playerInput = new PlayerInput(
|
Main.client.player.input.playerInput = new PlayerInput(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package ru.themixray.repeating_mod.render.shader;
|
package ru.themixray.repeating_mod.render.shader;
|
||||||
|
|
||||||
import com.mojang.blaze3d.platform.GlStateManager;
|
import com.mojang.blaze3d.opengl.GlStateManager;
|
||||||
import com.mojang.blaze3d.platform.TextureUtil;
|
import com.mojang.blaze3d.platform.TextureUtil;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user