Не видно модель игрока и не возможно ходить

Версия Minecraft
1.12.2
API
Forge
Почему не видно модель игрока и не возможно ходить?
 

Вложения

  • 2023-08-06_12.15.46.png
    2023-08-06_12.15.46.png
    200.9 KB · Просмотры: 22
package com.DSG.mc.FreezeCam;

import com.DSG.mc.FreezeCam.Utils.DSGUtils;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;

@Mod(modid = "freezecam", name = "freezecam", version = "1.0")
public class mod_FreezeCam {
private DSGUtils DSGUtils = new DSGUtils();

@EventHandler
public void load(FMLInitializationEvent event) {
this.DSGUtils.initUtils(FMLClientHandler.instance().getClient());
FMLCommonHandler.instance().bus().register(new DSG_iKeyHandler());
}
}


package com.DSG.mc.FreezeCam;

import com.DSG.mc.FreezeCam.Utils.DSGUtils;
import net.minecraft.client.settings.KeyBinding;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;

public class DSG_iKeyHandler {
static KeyBinding Freeze = new KeyBinding("FreezeCam", 33, "FreezeCam");
static KeyBinding[] keyBindings;
static boolean[] repeat;

public DSG_iKeyHandler() {
ClientRegistry.registerKeyBinding(Freeze);
}

@SubscribeEvent
public void tick(InputEvent.KeyInputEvent event) {
if (Freeze.isPressed()) {
if (DSGUtils.getInstance().getCamEntity() == null) {
DSGUtils.getInstance().CreateEntity("FreezeCam");
} else {
DSGUtils.getInstance().RemoveCam();
}
}
}

static {
keyBindings = new KeyBinding[]{Freeze};
repeat = new boolean[]{false, false, false};
}
}

package com.DSG.mc.FreezeCam;

import com.mojang.authlib.GameProfile;
import java.util.UUID;
import net.minecraft.client.entity.EntityOtherPlayerMP;
import net.minecraft.world.World;

public class CamEntity extends EntityOtherPlayerMP {
public CamEntity(World MCworld, String iName) {
super(MCworld, new GameProfile(UUID.randomUUID(), iName));
new UUID(0L, 100000L);
}
}

package com.DSG.mc.FreezeCam.Utils;

import com.DSG.mc.FreezeCam.CamEntity;
import net.minecraft.client.Minecraft;

public class DSGUtils {
private static DSGUtils instance = null;
private Minecraft mc;
private CamEntity CamEnt;
public boolean followPlayer;
public int followDistance;
public boolean aimPlayer;

public void initUtils(Minecraft minecraft) {
this.mc = minecraft;
this.followDistance = 3;
this.aimPlayer = false;
this.followPlayer = false;
this.CamEnt = null;
instance = this;
}

public static DSGUtils getInstance() {
return instance;
}

public static Minecraft getMC() {
return getInstance().mc;
}

public CamEntity getCamEntity() {
return this.CamEnt;
}

public void RemoveCam() {
getMC().world.removeEntity(this.CamEnt);
Minecraft.getMinecraft().setRenderViewEntity(Minecraft.getMinecraft().player);
this.CamEnt = null;
}

public void CreateEntity(String Name) {
CamEntity Ent;
Ent = this.CamEnt = new CamEntity(getMC().world, Name);

Ent.setPosition(getMC().player.posX, getMC().player.getEntityBoundingBox().minY, getMC().player.posZ);
getMC().world.spawnEntity(Ent);
Ent.rotationPitch = getMC().player.rotationPitch;
Ent.rotationYaw = getMC().player.rotationYaw;
Ent.rotationYawHead = getMC().player.rotationYawHead;
Minecraft.getMinecraft().setRenderViewEntity(this.CamEnt);
}
}
 
Сверху