Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Guebeul

Members
  • Content Count

    11
  • Joined

  • Last visited

Posts posted by Guebeul

  1. I want the bounding box to be visible to the entity the player is looking at. But the bounding box is displayed to me.

    How do I display this to entity?

     

    This is my code:

     

    @SubscribeEvent
        public void renderWorldLastEvent(RenderWorldLastEvent event) {
    
            if (Minecraft.getMinecraft().objectMouseOver.entityHit != null) {
                renderEntityBox(Minecraft.getMinecraft().objectMouseOver.entityHit, event.getPartialTicks());
            }
        }
    
        void renderEntityBox(Entity entity, float PartialTicks) {
    
            AxisAlignedBB boundingBox = entity.getEntityBoundingBox();
    
            double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)PartialTicks;
            double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)PartialTicks;
            double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)PartialTicks;
            Tessellator.getInstance().getBuffer().setTranslation(-d0, -d1, -d2);
            RenderGlobal.drawSelectionBoundingBox(boundingBox, 1.0F,1.0F,1.0F,1.0F);
            Tessellator.getInstance().getBuffer().setTranslation(0,0,0);
        }

    unknown.png.3914c6949526a551761fea5258e14bb2.png

     

    Or can the entity's outline be displayed in red? Instead of doing it like a Glowing effect, it's red.

     

     

     

  2. 5 hours ago, unassigned said:

    Whatever is here:

    
        at kr.guebeul.hertz.util.handler.EventHandler.playerevent(EventHandler.java:148)

    is null.

     

    I'm guessing, its either the player's capability or the entity itself. Figure out what it is, and check if its null.

    Thank you :) 
    Although not related to the above, Do you know how to damage to player?

  3. Hi, modder. I want to make the player execute server commands.

     

    player.getServer().getCommandManager().executeCommand(player.getCommandSenderEntity(), "/cold");

     

    So I wrote the above code. Then I tested it. However, when I put mod into the server and client and run it, the server has no problem, but the client has the following Ticking Entity problem.

    https://pastebin.com/HDcwGrut

    The line 148 of the EventHandler pointed to by "at kr.guebeul.hertz.util.handler.EventHandler.playerevent (EventHandler.java:148)" is the same as above code.

     

    Here is the "playerevent" code for EventHandler:

    @SubscribeEvent
        public void playerevent(LivingEvent event) {
            if (event.getEntityLiving() instanceof EntityPlayer) {
                EntityPlayer player = (EntityPlayer) event.getEntityLiving();
                IFatigue fatigue = player.getCapability(FatigueProvider.FATIGUE_CAPABILITY, null);
                ITemperature temperature = player.getCapability(TempProvider.TEMP_CAP, null);
                IThirst thirst = player.getCapability(ThirstProvider.THIRST_CAPABILITY, null);
    
                if (temperature.getTemp() < 70.0F && temperature.getTemp() > 50.0F) {
                    if (!temp70) {
                        player.getServer().getCommandManager().executeCommand(player.getCommandSenderEntity(), "/cold");   //Line 148
                        temp70 = true;
                    }
                }
                if (temperature.getTemp() < 50.0F && temperature.getTemp() > 20.0F) {
                    if (!temp50) {
                        player.getServer().getCommandManager().executeCommand(player.getCommandSenderEntity(), "/frostbite");
                        temp50 = true;
                    }
                }
                if (temperature.getTemp() < 20.0F && temperature.getTemp() > 0.0F) {
                    if (!temp20) {
                        player.getServer().getCommandManager().executeCommand(player.getCommandSenderEntity(), "/hypo");
                        temp20 = true;
                    }
                }
            }
        }

     

  4. As the title suggests, I am looking for ways to change the image (layout) of the player inventory.  I am amateur but I would like to try it. (Please understand my terrible English)

    Once in the player inventory, I want to leave only 9 hot bars, a player render, and Armor render. I would also like to include information such as health and food. ( Number 1 in the picture below )

    Here is a concrete image created in this way. 

    55320166_.thumb.PNG.33d599e69df42c0fc958cb98780c4259.PNG

     

    Can you help me please? I use version 1.12.2.

  5. Hi, I'm going to ask a question.
    I'm implementing the player's movements through the Obsidian API. But there was a problem..

    1. first person
    2018-08-18_13_36_14.png.52e82cd5ec4a691e27aafd160e7df098.png

    2. Third person
    2018-08-18_13_36_19.png.5af6f4d8c48c6d2417bb7c90fb802f34.png

     

    In this way, the player is invisible when you are in third person, and it emits the following error. (Repeat continuously)

    [13:36:21] [Client thread/ERROR]: Couldn't render entity
    java.lang.NullPointerException
        at obsidianAPI.render.player.ModelAnimatedPlayer.setRotationAngles(ModelAnimatedPlayer.java:62) ~[ModelAnimatedPlayer.class:?]
        at obsidianAPI.render.ModelObj.render(ModelObj.java:355) ~[ModelObj.class:?]
        at net.minecraft.client.renderer.entity.RendererLivingEntity.renderModel(RendererLivingEntity.java:309) ~[RendererLivingEntity.class:?]
        at net.minecraft.client.renderer.entity.RendererLivingEntity.doRender(RendererLivingEntity.java:165) [RendererLivingEntity.class:?]
        at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:167) [RenderPlayer.class:?]
        at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:565) [RenderPlayer.class:?]
        at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300) [RenderManager.class:?]
        at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278) [RenderManager.class:?]
        at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251) [RenderManager.class:?]
        at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:527) [RenderGlobal.class:?]
        at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1300) [EntityRenderer.class:?]
        at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1087) [EntityRenderer.class:?]
        at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067) [Minecraft.class:?]
        at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?]
        at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_172]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
        at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
        at GradleStart.main(Unknown Source) [start/:?]


    These two pictures are CommonProxy and ClientProxy I touched.
    1. CommonProxy
    2.PNG.d768b6bffe728794537fee480288fb31.PNG

    2. ClientProxy
    1094895406_.thumb.PNG.8df3d33c6dbd220ea2c8fcbc00881c7d.PNG

     

    As noted in the log, NullPointerException is a problem. I really wonder where this NullPointerException happens.

    RenderPlayerAnimated: https://github.com/ObsidianSuite/ObsidianSuite/blob/master/API/src/main/java/com/dabigjoe/obsidianAPI/render/player/RenderPlayerAnimated.java
    ModelAnimatedPlayer: https://github.com/ObsidianSuite/ObsidianSuite/blob/master/API/src/main/java/com/dabigjoe/obsidianAPI/render/player/ModelAnimatedPlayer.java

     

    If you know where NullPointerException is happening, the developer can help.
    Please help me...!

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.