调整音量,优化无人机模型
This commit is contained in:
parent
a2b280345f
commit
042b2a7c22
7 changed files with 60 additions and 1813 deletions
|
@ -11,6 +11,7 @@ import net.minecraft.world.entity.Entity;
|
|||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import org.joml.Vector3d;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -40,8 +41,18 @@ public abstract class CameraMixin {
|
|||
.stream().filter(e -> e.getStringUUID().equals(stack.getOrCreateTag().getString("LinkedDrone"))).findFirst().orElse(null);
|
||||
|
||||
if (drone != null) {
|
||||
float yRot = drone.getYRot();
|
||||
if (yRot < 0) {
|
||||
yRot += 360;
|
||||
}
|
||||
yRot = yRot + 90 % 360;
|
||||
|
||||
var CameraPos = new Vector3d(0.20375, 0.103125, 0);
|
||||
CameraPos.rotateZ(-drone.getXRot() * Mth.DEG_TO_RAD);
|
||||
CameraPos.rotateY(-yRot * Mth.DEG_TO_RAD);
|
||||
|
||||
setRotation(drone.getViewYRot(partialTicks), drone.getViewXRot(partialTicks));
|
||||
setPosition(Mth.lerp(partialTicks, drone.xo, drone.getX()) + 0.3 * drone.getLookAngle().x, Mth.lerp(partialTicks, drone.yo, drone.getY()) + 0.08, Mth.lerp(partialTicks, drone.zo, drone.getZ()) + 0.3 * drone.getLookAngle().z);
|
||||
setPosition(Mth.lerp(partialTicks, drone.xo + CameraPos.x, drone.getX() + CameraPos.x), Mth.lerp(partialTicks, drone.yo + CameraPos.y, drone.getY() + CameraPos.y), Mth.lerp(partialTicks, drone.zo + CameraPos.z, drone.getZ() + CameraPos.z));
|
||||
info.cancel();
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.5 KiB |
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "misc",
|
||||
"pattern": [
|
||||
"a",
|
||||
"b",
|
||||
"c"
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "minecraft:iron_nugget"
|
||||
},
|
||||
"b": {
|
||||
"item": "minecraft:paper"
|
||||
},
|
||||
"c": {
|
||||
"tag": "minecraft:planks"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "superbwarfare:transcript",
|
||||
"count": 1
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue