我需要帮助,为我的我的Minecraft黑客客户端编程我的Hack ESP! 我在Youtube教程中看到了这段代码,但它对我不起作用!
代码:
package net.YouNeedHimAndYouHeNeedsYou.hacks;
import org.lwjgl.input.Keyboard;
import net.YouNeedHimAndYouHeNeedsYou.client.Category;
import net.YouNeedHimAndYouHeNeedsYou.client.Module;
import net.YouNeedHimAndYouHeNeedsYou.client.Renderutilitis.RenderUtils;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.player.EntityPlayer;
public class ESP extends Module{
public static final String = null;
public ESP() {
super("ESP", 0xB72198, Keyboard.KEY_NONE, Category.RENDER);
}
public void onRender() {
if(!this.isEnabled());
return;
*for(Object theObject : mc.theWorld.loadedEntityList) {
if(!(theObject instanceof EntityLivingBase))
continue;
EntityLivingBase entity = (EntityLivingBase) theObject;
if(entity instanceof EntityPlayer) {
if(entity != mc.thePlayer)
player(entity);
continue;
}
if(entity instanceof EntityMob) {
mob(entity);
continue;
}
if(entity instanceof EntityAnimal) {
animal(entity);
continue;
}
passive(entity);*
super.onRender();
}
}
public void player(EntityLivingBase entity) {
float red = 0.5F;
float green = 0.5F;
float blue = 1F;
double xPos = (entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosX;
double yPos = (entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosY;
double zPos = (entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosZ;
render(red, green, blue, xPos, yPos, zPos);
}
public void mob(EntityLivingBase entity) {
float red = 1F;
float green = 0.5F;
float blue = 0.5F;
double xPos = (entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosX;
double yPos = (entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosY;
double zPos = (entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosZ;
render(red, green, blue, xPos, yPos, zPos);
}
public void animal(EntityLivingBase entity) {
float red = 0.5F;
float green = 1F;
float blue = 0.5F;
double xPos = (entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosX;
double yPos = (entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosY;
double zPos = (entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosZ;
render(red, green, blue, xPos, yPos, zPos);
}
public void passive(EntityLivingBase entity) {
float red = 0.5F;
float green = 1F;
float blue = 0.5F;
double xPos = (entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosX;
double yPos = (entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosY;
double zPos = (entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * mc.timer.renderPartialTicks) - mc.getRenderManager().renderPosZ;
render(red, green, blue, xPos, yPos, zPos);
}
public void render(float red, float green, float blue, double x, double y, double z) {
RenderUtils.drawTracerLine(x, y, z, red, green, blue, 0.45F, 1F);
}
} `
The text which is in * is wrong with the designation: Unreachable code
答案 0 :(得分:0)
您的Java代码充满了语法错误。
if(!this.isEnabled());
return;
应该是
if(!this.isEnabled()){return;}
随机星号的含义是什么?删除星号:
*for(Object theObject : mc.theWorld.loadedEntityList) {
和
passive(entity);*