Не получается сделать радар для шлема

Версия Minecraft
1.7.10
8
0
--исход Радар для шлема
Помогите пожалуйста я вроде сделал всё правильно
радарv4 + броня багается ( появляется даже когда не надета броня и текстурка радара тоже) помогите пожалуйста
Java:
package ru.viper.onemod;



import org.lwjgl.opengl.GL11;



import cpw.mods.fml.client.event.ConfigChangedEvent;

import cpw.mods.fml.common.eventhandler.SubscribeEvent;

import cpw.mods.fml.common.gameevent.TickEvent;

import net.minecraft.client.Minecraft;

import net.minecraft.entity.EntityLivingBase;

import net.minecraft.entity.item.EntityItem;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.item.Item;

import net.minecraft.util.AxisAlignedBB;

import net.minecraft.util.ResourceLocation;

import net.minecraftforge.client.event.RenderGameOverlayEvent;



public class Events {



    private static final Minecraft mc = Minecraft.getMinecraft();

    private static final ResourceLocation texture = new ResourceLocation(RadarMod.MODID, "gui.png");

    private static final AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(0, 0, 0, 0, 0, 0);

    public static byte direction = 0;

    public static float

    //Radius of the coverage area -- Радиус области охвата

    radius = 32F,

    scale = 1F;

    public static boolean

    showDrop = false,

    showOnlyPlayer = false,

    scaleAuto = true;



    @SubscribeEvent

    public void drawText(RenderGameOverlayEvent.Post event) {

        switch(event.type) {

        case ALL:

            scaleAuto = true;

            //Binding texture -- Бинд текстуры

            mc.getTextureManager().bindTexture(texture);

            float offsetX, offsetY;

            boolean ena = false;

            GL11.glPushMatrix();

            ena = GL11.glIsEnabled(GL11.GL_LIGHTING);

            if (ena) GL11.glDisable(GL11.GL_LIGHTING);



            //Radar position -- Положение радара

            GL11.glTranslatef(

                    (direction % 3 == 1 ? (event.resolution.getScaledWidth() / 2) :

                        direction % 3 == 2 ? event.resolution.getScaledWidth() : 0),

                    (direction / 3 == 2 ? event.resolution.getScaledHeight() :

                        direction / 3 == 1 ? (event.resolution.getScaledHeight() / 2) : 0), 0);



            //Automatic resizing for radar -- Автоматическое изменение размера для радара

            if (scaleAuto) {

                float scl = event.resolution.getScaleFactor() * scale;

                //Changing the size of our radar -- �зменение размера нашего радара

                GL11.glScalef(scl, scl, scl);

            }

            else if (scale != 1) {

                //Changing the size of our radar -- �зменение размера нашего радара

                GL11.glScalef(scale, scale, scale);

            }

            //Offset radar -- Смещение радара

            GL11.glTranslatef(

                    (direction % 3 == 1 ? 0 :

                        direction % 3 == 2 ? -36 : 36),

                    (direction / 3 == 2 ? -36 : direction / 3 == 1 ? 0 : 36), 0);



            //The main texture of the radar -- Основная текстура радара

            GL11.glPushMatrix();

            //Decrease the size of the main texture -- Уменьшаем размер основной текстуры

            GL11.glScalef(0.5F, 0.5F, 0.5F);

            GL11.glEnable(GL11.GL_BLEND);

            //Staining the main texture -- Окрашивание основной текстуры

            GL11.glColor3f(0.25F, 0.75F, 0.5F);

            mc.ingameGUI.drawTexturedModalRect(-64, -64, 0, 128, 128, 128);

            //Reset color -- Сбрасываем цвет

            GL11.glColor3f(1.0F, 1.0F, 1.0F);

            GL11.glDisable(GL11.GL_BLEND);

            GL11.glPopMatrix();



            //Compass North-South -- Компас север-юг

            GL11.glPushMatrix();

            //Compass position -- Положение компаса

            GL11.glTranslatef(28, 28, 0);

            //Turning the compass -- Поворачивание компаса

            GL11.glRotatef(-mc.thePlayer.rotationYaw + 180F, 0, 0, 1);

            //Decrease the size of the compass -- Уменьшаем размер компаса

            GL11.glScalef(0.75F, 0.75F, 0.75F);

            mc.ingameGUI.drawTexturedModalRect(-4, -8, 0, 4, 8, 16);

            GL11.glPopMatrix();



            //Point for radar center -- Точка для обозначения центра радара

            GL11.glPushMatrix();

            //Decrease the size of the point -- Уменьшаем размер точки

            GL11.glScalef(0.25F, 0.25F, 0.25F);

            mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);

            GL11.glPopMatrix();



            //Show only players -- Показывать только игроков

            if (showOnlyPlayer)

                for (Object o : mc.theWorld.getEntitiesWithinAABB(EntityPlayer.class, aabb)) {

                    EntityPlayer entity = (EntityPlayer)o;

                    //Remove from search yourself -- Убрать из поиска себя

                    if (entity == mc.thePlayer) continue;

                    offsetX = (float)(entity.posX - mc.thePlayer.posX);

                    offsetY = (float)(entity.posZ - mc.thePlayer.posZ);

                    double dis = Math.sqrt(offsetX * offsetX + offsetY * offsetY);

                    if (dis > radius) continue;



                    double rad = Math.atan2(offsetY, offsetX);

                    double deg = rad * (180 / Math.PI);

                    deg -= mc.thePlayer.rotationYaw + 180F;

                    rad = Math.toRadians(deg);



                    GL11.glPushMatrix();

                    //Point position -- Позиция точки

                    GL11.glTranslated(Math.cos(rad) * (dis * (32F / radius)), Math.sin(rad) * (dis * (32F / radius)), 0);

                    //Decrease the size of the point -- Уменьшаем размер точки

                    GL11.glScalef(0.5F, 0.5F, 0.5F);

                    GL11.glColor3f(0.75F, 0.25F, 0.25F);//Point color -- Цвет точки

                    mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);

                    GL11.glPopMatrix();

                }

            //Show all living beings -- Показывать всех живых существ

            else

                for (Object o : mc.theWorld.getEntitiesWithinAABB(EntityLivingBase.class, aabb)) {

                    EntityLivingBase entity = (EntityLivingBase)o;

                    if (entity == mc.thePlayer) continue;

                    offsetX = (float)(entity.posX - mc.thePlayer.posX);

                    offsetY = (float)(entity.posZ - mc.thePlayer.posZ);

                    double dis = Math.sqrt(offsetX * offsetX + offsetY * offsetY);

                    if (dis > radius) continue;



                    double rad = Math.atan2(offsetY, offsetX);

                    double deg = rad * (180 / Math.PI);

                    deg -= mc.thePlayer.rotationYaw + 180F;

                    rad = Math.toRadians(deg);



                    GL11.glPushMatrix();

                    //Point position -- Позиция точки

                    GL11.glTranslated(Math.cos(rad) * (dis * (32F / radius)), Math.sin(rad) * (dis * (32F / radius)), 0);

                    //Decrease the size of the point -- Уменьшаем размер точки

                    GL11.glScalef(0.5F, 0.5F, 0.5F);

                    GL11.glColor3f(0.75F, 0.25F, 0.25F);//Point color -- Цвет точки

                    mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);

                    GL11.glPopMatrix();

                }



            //Show drops -- Показывать дропы

            if (showDrop)

                for (Object o : mc.theWorld.getEntitiesWithinAABB(EntityItem.class, aabb)) {

                    EntityItem entity = (EntityItem)o;

                    offsetX = (float)(entity.posX - mc.thePlayer.posX);

                    offsetY = (float)(entity.posZ - mc.thePlayer.posZ);

                    double dis = Math.sqrt(offsetX * offsetX + offsetY * offsetY);

                    if (dis > radius) continue;



                    double rad = Math.atan2(offsetY, offsetX);

                    double deg = rad * (180 / Math.PI);

                    deg -= mc.thePlayer.rotationYaw + 180F;

                    rad = Math.toRadians(deg);



                    GL11.glPushMatrix();

                    //Point position -- Позиция точки

                    GL11.glTranslated(Math.cos(rad) * (dis * (32F / radius)), Math.sin(rad) * (dis * (32F / radius)), 0);

                    //Decrease the size of the point -- Уменьшаем размер точки

                    GL11.glScalef(0.5F, 0.5F, 0.5F);

                    GL11.glColor3f(0.25F, 0.25F, 0.75F);//Point color -- Цвет точки

                    mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);

                    GL11.glPopMatrix();

                }



            if (ena) GL11.glEnable(GL11.GL_LIGHTING);

            GL11.glPopMatrix();

            break;

        default:return;

        }

    }



    @SubscribeEvent

    public void onClientTickEvent(TickEvent.ClientTickEvent event) {

        if (mc.thePlayer == null) return;

        switch(event.phase) {

        case END:

            //Create a square radius -- Создаём квадратный радиус

            aabb.minX = mc.thePlayer.posX - radius;

            aabb.maxX = mc.thePlayer.posX + radius;

            aabb.minY = mc.thePlayer.posY - radius;

            aabb.maxY = mc.thePlayer.posY + radius;

            aabb.minZ = mc.thePlayer.posZ - radius;

            aabb.maxZ = mc.thePlayer.posZ + radius;

            break;

        default:break;

        }

    }



    @SubscribeEvent

    public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {

        if (event.modID.equals(RadarMod.MODID)) Config.syncConfig();

    }



    @SubscribeEvent

    public void onRenderGameOverlayEvent(RenderGameOverlayEvent.Post event){

        EntityPlayer player = Minecraft.getMinecraft().thePlayer;

        Item darmorhelmet = null;

        if(event.type == RenderGameOverlayEvent.ElementType.HELMET && player.getCurrentArmor(3) != null && player.getCurrentArmor(3).getItem() == darmorhelmet) {

        

        }

        }

    }
 
Последнее редактирование:
Решение
вот скриншот что с радаром
Текстуры нет, место неё missing texture.
Java:
package timaxa007.radar.v4;

import org.lwjgl.opengl.GL11;

import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderGameOverlayEvent;

public class Events {

    private...
683
3
21
МММммм... А это что? только ты даже исходник не внимательно читаешь внутри этой проверки должен быть код отрисовки радара,а не вне её....
Java:
        if(event.type == RenderGameOverlayEvent.ElementType.HELMET && player.getCurrentArmor(3) != null && player.getCurrentArmor(3).getItem() == darmorhelmet) {

        

        }
 
8
0
Вроде всё сделал, ошибок нет ну при заходе на одиночный сервер крашается майн с ошибкой
Код:
    at net.minecraft.client.main.Main.main(Main.java:164)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    at GradleStart.main(Unknown Source)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
    at ru.viper.onemod.Events.onRenderGameOverlayEvent(Events.java:213)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_6_Events_onRenderGameOverlayEvent_Post.invoke(.dynamic)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140)
    at net.minecraftforge.client.GuiIngameForge.post(GuiIngameForge.java:905)
    at net.minecraftforge.client.GuiIngameForge.renderHelmet(GuiIngameForge.java:263)
    at net.minecraftforge.client.GuiIngameForge.renderGameOverlay(GuiIngameForge.java:120)

-- Affected level --
Details:
    Level name: MpServer
    All players: 1 total; [EntityClientPlayerMP['Player265'/357, l='MpServer', x=-4,14, y=64,62, z=214,66]]
    Chunk stats: MultiplayerChunkCache: 235, 235
    Level seed: 0
    Level generator: ID 00 - default, ver 1. Features enabled: false
    Level generator options:
    Level spawn location: World: (-28,64,184), Chunk: (at 4,4,8 in -2,11; contains blocks -32,0,176 to -17,255,191), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Level time: 15678 game time, 3707 day time
    Level dimension: 0
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
    Forced entities: 124 total; [EntitySheep['Sheep'/256, l='MpServer', x=54,66, y=70,00, z=165,47], EntitySheep['Sheep'/257, l='MpServer', x=63,56, y=68,00, z=173,66], EntityChicken['Chicken'/258, l='MpServer', x=56,24, y=66,11, z=236,53], EntityChicken['Chicken'/259, l='MpServer', x=61,47, y=68,00, z=227,47], EntityChicken['Chicken'/260, l='MpServer', x=52,78, y=67,00, z=237,45], EntityWitch['Witch'/261, l='MpServer', x=49,84, y=47,00, z=248,69], EntityCreeper['Creeper'/262, l='MpServer', x=58,50, y=43,00, z=252,35], EntityChicken['Chicken'/263, l='MpServer', x=55,50, y=64,00, z=240,50], EntityEnderman['Enderman'/264, l='MpServer', x=48,41, y=30,00, z=265,53], EntityChicken['Chicken'/265, l='MpServer', x=54,79, y=62,47, z=266,16], EntitySpider['Spider'/266, l='MpServer', x=62,00, y=48,00, z=280,03], EntityCreeper['Creeper'/267, l='MpServer', x=62,50, y=48,00, z=287,00], EntitySkeleton['Skeleton'/268, l='MpServer', x=63,69, y=48,00, z=280,00], EntitySkeleton['Skeleton'/269, l='MpServer', x=60,91, y=49,00, z=292,50], EntityChicken['Chicken'/273, l='MpServer', x=71,19, y=64,00, z=156,47], EntityCreeper['Creeper'/275, l='MpServer', x=67,56, y=35,00, z=179,22], EntityCreeper['Creeper'/276, l='MpServer', x=65,00, y=35,00, z=178,44], EntityZombie['Zombie'/277, l='MpServer', x=68,59, y=35,00, z=176,09], EntitySkeleton['Skeleton'/278, l='MpServer', x=72,63, y=38,00, z=203,06], EntityBat['Bat'/279, l='MpServer', x=70,37, y=50,24, z=239,92], EntityEnderman['Enderman'/280, l='MpServer', x=75,57, y=44,94, z=252,46], EntitySkeleton['Skeleton'/281, l='MpServer', x=71,75, y=48,00, z=243,50], EntityEnderman['Enderman'/283, l='MpServer', x=72,00, y=47,00, z=240,44], EntityBat['Bat'/284, l='MpServer', x=72,66, y=49,62, z=256,94], EntityChicken['Chicken'/112, l='MpServer', x=-64,47, y=86,00, z=156,22], EntityCow['Cow'/113, l='MpServer', x=-71,88, y=89,00, z=185,09], EntityChicken['Chicken'/114, l='MpServer', x=-68,75, y=89,00, z=178,32], EntityCow['Cow'/115, l='MpServer', x=-75,75, y=83,00, z=181,13], EntityCow['Cow'/116, l='MpServer', x=-76,48, y=87,15, z=188,31], EntityChicken['Chicken'/117, l='MpServer', x=-64,47, y=93,00, z=181,19], EntityCow['Cow'/118, l='MpServer', x=-75,29, y=87,90, z=202,47], EntityClientPlayerMP['Player265'/357, l='MpServer', x=-4,14, y=64,62, z=214,66], EntitySkeleton['Skeleton'/119, l='MpServer', x=-75,59, y=26,00, z=235,03], EntitySkeleton['Skeleton'/120, l='MpServer', x=-76,41, y=19,00, z=243,13], EntityChicken['Chicken'/125, l='MpServer', x=-51,53, y=87,00, z=141,53], EntityChicken['Chicken'/126, l='MpServer', x=-59,38, y=97,00, z=182,56], EntityChicken['Chicken'/127, l='MpServer', x=-48,22, y=86,00, z=209,72], EntityCreeper['Creeper'/128, l='MpServer', x=-52,84, y=31,00, z=235,84], EntityCreeper['Creeper'/129, l='MpServer', x=-55,50, y=31,00, z=239,50], EntityCreeper['Creeper'/130, l='MpServer', x=-53,75, y=30,00, z=240,08], EntityChicken['Chicken'/131, l='MpServer', x=-58,06, y=62,34, z=227,31], EntitySquid['Squid'/132, l='MpServer', x=-59,37, y=55,29, z=231,47], EntitySkeleton['Skeleton'/133, l='MpServer', x=-54,34, y=26,00, z=247,69], EntitySkeleton['Skeleton'/134, l='MpServer', x=-52,28, y=30,00, z=255,53], EntitySkeleton['Skeleton'/135, l='MpServer', x=-56,50, y=24,00, z=243,94], EntityCreeper['Creeper'/136, l='MpServer', x=-53,44, y=26,47, z=247,51], EntitySkeleton['Skeleton'/137, l='MpServer', x=-60,50, y=35,00, z=247,50], EntityZombie['Zombie'/138, l='MpServer', x=-54,08, y=13,00, z=260,23], EntityZombie['Zombie'/139, l='MpServer', x=-53,15, y=14,00, z=260,98], EntityCreeper['Creeper'/140, l='MpServer', x=-51,41, y=31,00, z=256,03], EntitySkeleton['Skeleton'/141, l='MpServer', x=-55,50, y=18,00, z=284,50], EntityBat['Bat'/146, l='MpServer', x=-32,75, y=43,10, z=167,25], EntityBat['Bat'/147, l='MpServer', x=-44,60, y=39,80, z=160,27], EntityBat['Bat'/148, l='MpServer', x=-37,38, y=40,88, z=160,68], EntityChicken['Chicken'/149, l='MpServer', x=-43,63, y=75,00, z=160,41], EntitySkeleton['Skeleton'/150, l='MpServer', x=-32,13, y=40,00, z=204,75], EntityCreeper['Creeper'/151, l='MpServer', x=-37,38, y=15,00, z=264,06], EntityZombie['Zombie'/152, l='MpServer', x=-35,53, y=15,00, z=260,97], EntityZombie['Zombie'/153, l='MpServer', x=-32,50, y=17,00, z=269,50], EntitySquid['Squid'/154, l='MpServer', x=-37,13, y=58,00, z=258,91], EntityBat['Bat'/155, l='MpServer', x=-37,72, y=14,10, z=287,59], EntityZombie['Zombie'/156, l='MpServer', x=-35,50, y=12,00, z=282,94], EntityCreeper['Creeper'/157, l='MpServer', x=-34,03, y=34,00, z=281,50], EntitySkeleton['Skeleton'/165, l='MpServer', x=-22,88, y=21,00, z=136,50], EntityZombie['Zombie'/166, l='MpServer', x=-21,50, y=16,00, z=145,84], EntityCow['Cow'/167, l='MpServer', x=-29,31, y=64,00, z=168,47], EntityCow['Cow'/168, l='MpServer', x=-21,38, y=71,00, z=176,50], EntitySkeleton['Skeleton'/169, l='MpServer', x=-31,50, y=15,00, z=255,50], EntityZombie['Zombie'/170, l='MpServer', x=-25,59, y=16,00, z=261,44], EntitySkeleton['Skeleton'/171, l='MpServer', x=-25,78, y=16,00, z=257,78], EntitySquid['Squid'/172, l='MpServer', x=-22,35, y=58,00, z=260,35], EntitySquid['Squid'/173, l='MpServer', x=-22,07, y=58,40, z=256,49], EntitySkeleton['Skeleton'/174, l='MpServer', x=-25,56, y=37,00, z=280,31], EntitySkeleton['Skeleton'/175, l='MpServer', x=-22,31, y=37,00, z=281,88], EntitySpider['Spider'/176, l='MpServer', x=-18,00, y=37,00, z=282,47], EntityBat['Bat'/177, l='MpServer', x=-25,43, y=12,01, z=289,41], EntityBat['Bat'/178, l='MpServer', x=-18,25, y=39,10, z=293,44], EntitySkeleton['Skeleton'/187, l='MpServer', x=-10,56, y=24,00, z=143,00], EntityCreeper['Creeper'/188, l='MpServer', x=-5,00, y=24,00, z=139,41], EntitySpider['Spider'/189, l='MpServer', x=-9,16, y=23,00, z=143,19], EntityCreeper['Creeper'/190, l='MpServer', x=-13,94, y=15,00, z=150,47], EntityBat['Bat'/191, l='MpServer', x=-18,03, y=17,73, z=149,57], EntityCow['Cow'/192, l='MpServer', x=-13,53, y=73,00, z=158,47], EntityChicken['Chicken'/193, l='MpServer', x=-7,66, y=62,39, z=218,59], EntitySquid['Squid'/194, l='MpServer', x=0,43, y=59,00, z=246,54], EntitySquid['Squid'/195, l='MpServer', x=-9,06, y=59,42, z=251,52], EntityChicken['Chicken'/196, l='MpServer', x=-10,19, y=62,32, z=246,84], EntitySquid['Squid'/197, l='MpServer', x=-13,84, y=58,29, z=265,52], EntityBat['Bat'/198, l='MpServer', x=-10,41, y=11,10, z=277,44], EntitySkeleton['Skeleton'/210, l='MpServer', x=8,88, y=38,00, z=196,50], EntityCreeper['Creeper'/211, l='MpServer', x=10,97, y=37,00, z=196,44], EntityCreeper['Creeper'/212, l='MpServer', x=13,63, y=13,00, z=226,09], EntitySkeleton['Skeleton'/213, l='MpServer', x=14,56, y=14,00, z=225,09], EntityBat['Bat'/214, l='MpServer', x=7,69, y=17,10, z=250,47], EntitySquid['Squid'/215, l='MpServer', x=2,88, y=59,00, z=243,71], EntityZombie['Zombie'/217, l='MpServer', x=3,47, y=17,00, z=289,97], EntitySkeleton['Skeleton'/222, l='MpServer', x=31,50, y=53,00, z=157,13], EntityCreeper['Creeper'/223, l='MpServer', x=28,97, y=37,00, z=175,47], EntityZombie['Zombie'/224, l='MpServer', x=29,00, y=35,00, z=177,31], EntitySquid['Squid'/225, l='MpServer', x=24,21, y=60,00, z=245,16], EntitySquid['Squid'/226, l='MpServer', x=25,92, y=60,00, z=248,78], EntitySquid['Squid'/227, l='MpServer', x=35,71, y=60,42, z=253,77], EntitySquid['Squid'/228, l='MpServer', x=28,70, y=60,09, z=263,55], EntitySquid['Squid'/229, l='MpServer', x=15,38, y=60,00, z=257,11], EntitySquid['Squid'/230, l='MpServer', x=32,76, y=59,38, z=267,44], EntitySkeleton['Skeleton'/231, l='MpServer', x=31,41, y=14,00, z=287,09], EntityZombie['Zombie'/234, l='MpServer', x=40,72, y=54,00, z=143,34], EntityZombie['Zombie'/235, l='MpServer', x=44,50, y=43,00, z=153,50], EntityZombie['Zombie'/236, l='MpServer', x=43,50, y=43,00, z=158,50], EntityBat['Bat'/237, l='MpServer', x=43,76, y=43,25, z=159,20], EntitySkeleton['Skeleton'/238, l='MpServer', x=38,34, y=52,00, z=151,66], EntitySheep['Sheep'/239, l='MpServer', x=49,25, y=70,00, z=146,29], EntityCreeper['Creeper'/240, l='MpServer', x=39,97, y=40,00, z=169,44], EntitySkeleton['Skeleton'/241, l='MpServer', x=46,50, y=40,00, z=165,50], EntityZombie['Zombie'/242, l='MpServer', x=39,56, y=47,00, z=163,50], EntityZombie['Zombie'/243, l='MpServer', x=35,31, y=44,00, z=167,50], EntityCreeper['Creeper'/244, l='MpServer', x=32,50, y=32,00, z=184,50], EntityBat['Bat'/245, l='MpServer', x=46,47, y=55,10, z=187,25], EntityZombie['Zombie'/246, l='MpServer', x=40,00, y=24,00, z=256,56], EntitySpider['Spider'/247, l='MpServer', x=35,13, y=32,00, z=277,44], EntitySpider['Spider'/248, l='MpServer', x=30,01, y=32,29, z=279,83], EntityZombie['Zombie'/253, l='MpServer', x=54,47, y=48,00, z=151,94], EntitySheep['Sheep'/254, l='MpServer', x=50,75, y=73,00, z=155,50], EntityZombie['Zombie'/255, l='MpServer', x=52,53, y=39,47, z=170,46]]
    Retry entities: 0 total; []
    Server brand: fml,forge
    Server type: Integrated singleplayer server
Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)
    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566)
    at net.minecraft.client.Minecraft.run(Minecraft.java:991)
    at net.minecraft.client.main.Main.main(Main.java:164)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    at GradleStart.main(Unknown Source)

-- System Details --
Details:
    Minecraft Version: 1.7.10
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_201, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 702460760 bytes (669 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
    FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 4 mods loaded, 4 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCHIJAAAA    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
    UCHIJAAAA    FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar)
    UCHIJAAAA    Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar)
    UCHIJAAAA    onemod{1.1.0} [onemod 1] (bin)
    GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13399 Compatibility Profile Context 15.201.1151.1008' Renderer: 'AMD Radeon HD 6700 Series'
    Launched Version: 1.7.10
    LWJGL: 2.9.1
    OpenGL: AMD Radeon HD 6700 Series GL version 4.5.13399 Compatibility Profile Context 15.201.1151.1008, ATI Technologies Inc.
    GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.

    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Packs: []
    Current Language: English (US)
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Anisotropic Filtering: Off (1)
[16:27:50] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\sasha\Desktop\createmods\eclipse\.\crash-reports\crash-2019-04-20_16.27.50-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
 
8
0
Java:
package ru.viper.onemod;

import org.lwjgl.opengl.GL11;

import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderGameOverlayEvent;

public class Events {

    private static final Minecraft mc = Minecraft.getMinecraft();
    private static final ResourceLocation texture = new ResourceLocation(main.MODID, "assets:radar4:textures:gui:gui.png");
    private static final AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(0, 0, 0, 0, 0, 0);
    public static byte direction = 0;
    public static float
    //Radius of the coverage area -- Радиус области охвата
    radius = 32F,
    scale = 1F;
    public static boolean
    showDrop = false,
    showOnlyPlayer = false,
    scaleAuto = true;
    private Item darmorhelmet;
    
    @SubscribeEvent
    public void onRenderGameOverlayEvent1(RenderGameOverlayEvent.Post event){
        EntityPlayer player = Minecraft.getMinecraft().thePlayer;
        if(event.type == RenderGameOverlayEvent.ElementType.HELMET && player.getCurrentArmor(0) != null && player.getCurrentArmor(0).getItem() == darmorhelmet);
}

    @SubscribeEvent
    public void drawText(RenderGameOverlayEvent.Post event) {
        switch(event.type) {
        case ALL:
            scaleAuto = true;
            //Binding texture -- Бинд текстуры
            mc.getTextureManager().bindTexture(texture);
            float offsetX, offsetY;
            boolean ena = false;
            GL11.glPushMatrix();
            ena = GL11.glIsEnabled(GL11.GL_LIGHTING);
            if (ena) GL11.glDisable(GL11.GL_LIGHTING);

            //Radar position -- Положение радара
            GL11.glTranslatef(
                    (direction % 3 == 1 ? (event.resolution.getScaledWidth() / 2) :
                        direction % 3 == 2 ? event.resolution.getScaledWidth() : 0),
                    (direction / 3 == 2 ? event.resolution.getScaledHeight() :
                        direction / 3 == 1 ? (event.resolution.getScaledHeight() / 2) : 0), 0);

            //Automatic resizing for radar -- Автоматическое изменение размера для радара
            if (scaleAuto) {
                float scl = event.resolution.getScaleFactor() * scale;
                //Changing the size of our radar -- �зменение размера нашего радара
                GL11.glScalef(scl, scl, scl);
            }
            else if (scale != 1) {
                //Changing the size of our radar -- �зменение размера нашего радара
                GL11.glScalef(scale, scale, scale);
            }
            //Offset radar -- Смещение радара
            GL11.glTranslatef(
                    (direction % 3 == 1 ? 0 :
                        direction % 3 == 2 ? -36 : 36),
                    (direction / 3 == 2 ? -36 : direction / 3 == 1 ? 0 : 36), 0);

            //The main texture of the radar -- Основная текстура радара
            GL11.glPushMatrix();
            //Decrease the size of the main texture -- Уменьшаем размер основной текстуры
            GL11.glScalef(0.5F, 0.5F, 0.5F);
            GL11.glEnable(GL11.GL_BLEND);
            //Staining the main texture -- Окрашивание основной текстуры
            GL11.glColor3f(0.25F, 0.75F, 0.5F);
            mc.ingameGUI.drawTexturedModalRect(-64, -64, 0, 128, 128, 128);
            //Reset color -- Сбрасываем цвет
            GL11.glColor3f(1.0F, 1.0F, 1.0F);
            GL11.glDisable(GL11.GL_BLEND);
            GL11.glPopMatrix();

            //Compass North-South -- Компас север-юг
            GL11.glPushMatrix();
            //Compass position -- Положение компаса
            GL11.glTranslatef(28, 28, 0);
            //Turning the compass -- Поворачивание компаса
            GL11.glRotatef(-mc.thePlayer.rotationYaw + 180F, 0, 0, 1);
            //Decrease the size of the compass -- Уменьшаем размер компаса
            GL11.glScalef(0.75F, 0.75F, 0.75F);
            mc.ingameGUI.drawTexturedModalRect(-4, -8, 0, 4, 8, 16);
            GL11.glPopMatrix();

            //Point for radar center -- Точка для обозначения центра радара
            GL11.glPushMatrix();
            //Decrease the size of the point -- Уменьшаем размер точки
            GL11.glScalef(0.25F, 0.25F, 0.25F);
            mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);
            GL11.glPopMatrix();

            //Show only players -- Показывать только игроков
            if (showOnlyPlayer)
                for (Object o : mc.theWorld.getEntitiesWithinAABB(EntityPlayer.class, aabb)) {
                    EntityPlayer entity = (EntityPlayer)o;
                    //Remove from search yourself -- Убрать из поиска себя
                    if (entity == mc.thePlayer) continue;
                    offsetX = (float)(entity.posX - mc.thePlayer.posX);
                    offsetY = (float)(entity.posZ - mc.thePlayer.posZ);
                    double dis = Math.sqrt(offsetX * offsetX + offsetY * offsetY);
                    if (dis > radius) continue;

                    double rad = Math.atan2(offsetY, offsetX);
                    double deg = rad * (180 / Math.PI);
                    deg -= mc.thePlayer.rotationYaw + 180F;
                    rad = Math.toRadians(deg);

                    GL11.glPushMatrix();
                    //Point position -- Позиция точки
                    GL11.glTranslated(Math.cos(rad) * (dis * (32F / radius)), Math.sin(rad) * (dis * (32F / radius)), 0);
                    //Decrease the size of the point -- Уменьшаем размер точки
                    GL11.glScalef(0.5F, 0.5F, 0.5F);
                    GL11.glColor3f(0.75F, 0.25F, 0.25F);//Point color -- Цвет точки
                    mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);
                    GL11.glPopMatrix();
                }
            //Show all living beings -- Показывать всех живых существ
            else
                for (Object o : mc.theWorld.getEntitiesWithinAABB(EntityLivingBase.class, aabb)) {
                    EntityLivingBase entity = (EntityLivingBase)o;
                    if (entity == mc.thePlayer) continue;
                    offsetX = (float)(entity.posX - mc.thePlayer.posX);
                    offsetY = (float)(entity.posZ - mc.thePlayer.posZ);
                    double dis = Math.sqrt(offsetX * offsetX + offsetY * offsetY);
                    if (dis > radius) continue;

                    double rad = Math.atan2(offsetY, offsetX);
                    double deg = rad * (180 / Math.PI);
                    deg -= mc.thePlayer.rotationYaw + 180F;
                    rad = Math.toRadians(deg);

                    GL11.glPushMatrix();
                    //Point position -- Позиция точки
                    GL11.glTranslated(Math.cos(rad) * (dis * (32F / radius)), Math.sin(rad) * (dis * (32F / radius)), 0);
                    //Decrease the size of the point -- Уменьшаем размер точки
                    GL11.glScalef(0.5F, 0.5F, 0.5F);
                    GL11.glColor3f(0.75F, 0.25F, 0.25F);//Point color -- Цвет точки
                    mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);
                    GL11.glPopMatrix();
                }

            //Show drops -- Показывать дропы
            if (showDrop)
                for (Object o : mc.theWorld.getEntitiesWithinAABB(EntityItem.class, aabb)) {
                    EntityItem entity = (EntityItem)o;
                    offsetX = (float)(entity.posX - mc.thePlayer.posX);
                    offsetY = (float)(entity.posZ - mc.thePlayer.posZ);
                    double dis = Math.sqrt(offsetX * offsetX + offsetY * offsetY);
                    if (dis > radius) continue;

                    double rad = Math.atan2(offsetY, offsetX);
                    double deg = rad * (180 / Math.PI);
                    deg -= mc.thePlayer.rotationYaw + 180F;
                    rad = Math.toRadians(deg);

                    GL11.glPushMatrix();
                    //Point position -- Позиция точки
                    GL11.glTranslated(Math.cos(rad) * (dis * (32F / radius)), Math.sin(rad) * (dis * (32F / radius)), 0);
                    //Decrease the size of the point -- Уменьшаем размер точки
                    GL11.glScalef(0.5F, 0.5F, 0.5F);
                    GL11.glColor3f(0.25F, 0.25F, 0.75F);//Point color -- Цвет точки
                    mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);
                    GL11.glPopMatrix();
                }

            if (ena) GL11.glEnable(GL11.GL_LIGHTING);
            GL11.glPopMatrix();
            break;
        default:return;
        }
    }

    @SubscribeEvent
    public void onClientTickEvent(TickEvent.ClientTickEvent event) {
        if (mc.thePlayer == null) return;
        switch(event.phase) {
        case END:
            //Create a square radius -- Создаём квадратный радиус
            aabb.minX = mc.thePlayer.posX - radius;
            aabb.maxX = mc.thePlayer.posX + radius;
            aabb.minY = mc.thePlayer.posY - radius;
            aabb.maxY = mc.thePlayer.posY + radius;
            aabb.minZ = mc.thePlayer.posZ - radius;
            aabb.maxZ = mc.thePlayer.posZ + radius;
            break;
        default:break;
        }
    }

    @SubscribeEvent
    public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
        if (event.modID.equals(main.MODID)) Config.syncConfig();
    }
    
            
        
        
    }
 

timaxa007

Модератор
5,831
409
672
вот скриншот что с радаром
Текстуры нет, место неё missing texture.
Java:
package timaxa007.radar.v4;

import org.lwjgl.opengl.GL11;

import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderGameOverlayEvent;

public class Events {

    private static final Minecraft mc = Minecraft.getMinecraft();
    private static final ResourceLocation texture = new ResourceLocation(RadarMod.MODID, "textures/gui/gui.png");
    private static AxisAlignedBB aabb = null;
    public static byte direction = 0;
    public static float
    //Radius of the coverage area -- Радиус области охвата
    radius = 32F,
    scale = 1F;
    public static boolean
    showDrop = false,
    showOnlyPlayer = false,
    scaleAuto = true;

    @SubscribeEvent
    public void drawText(RenderGameOverlayEvent.Post event) {
        switch(event.type) {
        case ALL:
            if (aabb == null) return;

            //Binding texture -- Бинд текстуры
            mc.getTextureManager().bindTexture(texture);
            float offsetX, offsetY;
            boolean ena = false;
            GL11.glPushMatrix();
            ena = GL11.glIsEnabled(GL11.GL_LIGHTING);
            if (ena) GL11.glDisable(GL11.GL_LIGHTING);

            //Radar position -- Положение радара
            GL11.glTranslatef(
                    (direction % 3 == 1 ? (event.resolution.getScaledWidth() / 2) :
                        direction % 3 == 2 ? event.resolution.getScaledWidth() : 0),
                    (direction / 3 == 2 ? event.resolution.getScaledHeight() :
                        direction / 3 == 1 ? (event.resolution.getScaledHeight() / 2) : 0), 0);

            //Automatic resizing for radar -- Автоматическое изменение размера для радара
            if (scaleAuto) {
                float scl = event.resolution.getScaleFactor() * scale;
                //Changing the size of our radar -- Изменение размера нашего радара
                GL11.glScalef(scl, scl, scl);
            }
            else if (scale != 1) {
                //Changing the size of our radar -- Изменение размера нашего радара
                GL11.glScalef(scale, scale, scale);
            }
            //Offset radar -- Смещение радара
            GL11.glTranslatef(
                    (direction % 3 == 1 ? 0 :
                        direction % 3 == 2 ? -36 : 36),
                    (direction / 3 == 2 ? -36 : direction / 3 == 1 ? 0 : 36), 0);

            //The main texture of the radar -- Основная текстура радара
            GL11.glPushMatrix();
            //Decrease the size of the main texture -- Уменьшаем размер основной текстуры
            GL11.glScalef(0.5F, 0.5F, 0.5F);
            GL11.glEnable(GL11.GL_BLEND);
            //Staining the main texture -- Окрашивание основной текстуры
            GL11.glColor3f(0.25F, 0.75F, 0.5F);
            mc.ingameGUI.drawTexturedModalRect(-64, -64, 0, 128, 128, 128);
            //Reset color -- Сбрасываем цвет
            GL11.glColor3f(1.0F, 1.0F, 1.0F);
            GL11.glDisable(GL11.GL_BLEND);
            GL11.glPopMatrix();

            //Compass North-South -- Компас север-юг
            GL11.glPushMatrix();
            //Compass position -- Положение компаса
            GL11.glTranslatef(28, 28, 0);
            //Turning the compass -- Поворачивание компаса
            GL11.glRotatef(-mc.thePlayer.rotationYaw + 180F, 0, 0, 1);
            //Decrease the size of the compass -- Уменьшаем размер компаса
            GL11.glScalef(0.75F, 0.75F, 0.75F);
            mc.ingameGUI.drawTexturedModalRect(-4, -8, 0, 4, 8, 16);
            GL11.glPopMatrix();

            //Point for radar center -- Точка для обозначения центра радара
            GL11.glPushMatrix();
            //Decrease the size of the point -- Уменьшаем размер точки
            GL11.glScalef(0.25F, 0.25F, 0.25F);
            mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);
            GL11.glPopMatrix();

            //Show only players -- Показывать только игроков
            if (showOnlyPlayer)
                for (Object o : mc.theWorld.getEntitiesWithinAABB(EntityPlayer.class, aabb)) {
                    EntityPlayer entity = (EntityPlayer)o;
                    //Remove from search yourself -- Убрать из поиска себя
                    if (entity == mc.thePlayer) continue;
                    offsetX = (float)(entity.posX - mc.thePlayer.posX);
                    offsetY = (float)(entity.posZ - mc.thePlayer.posZ);
                    double dis = Math.sqrt(offsetX * offsetX + offsetY * offsetY);
                    if (dis > radius) continue;

                    double rad = Math.atan2(offsetY, offsetX);
                    double deg = rad * (180 / Math.PI);
                    deg -= mc.thePlayer.rotationYaw + 180F;
                    rad = Math.toRadians(deg);

                    GL11.glPushMatrix();
                    //Point position -- Позиция точки
                    GL11.glTranslated(Math.cos(rad) * (dis * (32F / radius)), Math.sin(rad) * (dis * (32F / radius)), 0);
                    //Decrease the size of the point -- Уменьшаем размер точки
                    GL11.glScalef(0.5F, 0.5F, 0.5F);
                    GL11.glColor3f(0.75F, 0.25F, 0.25F);//Point color -- Цвет точки
                    mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);
                    GL11.glPopMatrix();
                }
            //Show all living beings -- Показывать всех живых существ
            else
                for (Object o : mc.theWorld.getEntitiesWithinAABB(EntityLivingBase.class, aabb)) {
                    EntityLivingBase entity = (EntityLivingBase)o;
                    if (entity == mc.thePlayer) continue;
                    offsetX = (float)(entity.posX - mc.thePlayer.posX);
                    offsetY = (float)(entity.posZ - mc.thePlayer.posZ);
                    double dis = Math.sqrt(offsetX * offsetX + offsetY * offsetY);
                    if (dis > radius) continue;

                    double rad = Math.atan2(offsetY, offsetX);
                    double deg = rad * (180 / Math.PI);
                    deg -= mc.thePlayer.rotationYaw + 180F;
                    rad = Math.toRadians(deg);

                    GL11.glPushMatrix();
                    //Point position -- Позиция точки
                    GL11.glTranslated(Math.cos(rad) * (dis * (32F / radius)), Math.sin(rad) * (dis * (32F / radius)), 0);
                    //Decrease the size of the point -- Уменьшаем размер точки
                    GL11.glScalef(0.5F, 0.5F, 0.5F);
                    GL11.glColor3f(0.75F, 0.25F, 0.25F);//Point color -- Цвет точки
                    mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);
                    GL11.glPopMatrix();
                }

            //Show drops -- Показывать дропы
            if (showDrop)
                for (Object o : mc.theWorld.getEntitiesWithinAABB(EntityItem.class, aabb)) {
                    EntityItem entity = (EntityItem)o;
                    offsetX = (float)(entity.posX - mc.thePlayer.posX);
                    offsetY = (float)(entity.posZ - mc.thePlayer.posZ);
                    double dis = Math.sqrt(offsetX * offsetX + offsetY * offsetY);
                    if (dis > radius) continue;

                    double rad = Math.atan2(offsetY, offsetX);
                    double deg = rad * (180 / Math.PI);
                    deg -= mc.thePlayer.rotationYaw + 180F;
                    rad = Math.toRadians(deg);

                    GL11.glPushMatrix();
                    //Point position -- Позиция точки
                    GL11.glTranslated(Math.cos(rad) * (dis * (32F / radius)), Math.sin(rad) * (dis * (32F / radius)), 0);
                    //Decrease the size of the point -- Уменьшаем размер точки
                    GL11.glScalef(0.5F, 0.5F, 0.5F);
                    GL11.glColor3f(0.25F, 0.25F, 0.75F);//Point color -- Цвет точки
                    mc.ingameGUI.drawTexturedModalRect(-2, -2, 0, 0, 4, 4);
                    GL11.glPopMatrix();
                }

            if (ena) GL11.glEnable(GL11.GL_LIGHTING);
            GL11.glPopMatrix();
            break;
        default:return;
        }
    }

    @SubscribeEvent
    public void onClientTickEvent(TickEvent.ClientTickEvent event) {
        if (mc.thePlayer == null) return;
        switch(event.phase) {
        case END:

            if (mc.thePlayer.getCurrentArmor(3) == null || mc.thePlayer.getCurrentArmor(3).getItem() != Items.diamond_helmet) {
                if (aabb != null) aabb = null;
                return;
            }

            if (aabb == null) aabb = AxisAlignedBB.getBoundingBox(0, 0, 0, 0, 0, 0);
            //Create a square radius -- Создаём квадратный радиус
            aabb.minX = mc.thePlayer.posX - radius;
            aabb.maxX = mc.thePlayer.posX + radius;
            aabb.minY = mc.thePlayer.posY - radius;
            aabb.maxY = mc.thePlayer.posY + radius;
            aabb.minZ = mc.thePlayer.posZ - radius;
            aabb.maxZ = mc.thePlayer.posZ + radius;
            break;
        default:break;
        }
    }

    @SubscribeEvent
    public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
        if (event.modID.equals(RadarMod.MODID)) Config.syncConfig();
    }

}
Items.diamond_helmet - меняешь на свой Item.
 
Сверху