Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.8] Need something stronger than ignorefrustrumcheck
The update for 1.13 is being worked on - please be patient. (Updated 02/19/19)
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
gummby8

[1.8] Need something stronger than ignorefrustrumcheck

Started by gummby8, July 30, 2016

7 posts in this topic

gummby8    26

gummby8

gummby8    26

  • Diamond Finder
  • gummby8
  • Members
  • 26
  • 479 posts
  • Report post
Posted July 30, 2016

So my mob is quite large. Normally ignorefrustrumcheck would suffice but for some reason it does not seem to be doing its job now. It appears after the player turns its back on the bounding box and goes 10-20 blocks away, it stops rendering regardless.

 

Screenshots

 

 

front

width=800 height=476https://dl.dropbox.com/s/cky3wzxzn6gewb8/Screenshot%202016-07-29%2023.08.44.png?dl=0[/img]

from side, not looking at bounding box, frustrum check working

width=800 height=476https://dl.dropbox.com/s/t7xm15jdofkh0fs/Screenshot%202016-07-29%2023.09.01.png?dl=0[/img]

looking at bounding box from the side of mob

width=800 height=476https://dl.dropbox.com/s/frebihlemfxnkkl/Screenshot%202016-07-29%2023.09.12.png?dl=0[/img]

looking away from bounding box

width=800 height=476https://dl.dropbox.com/s/kagrrph9td9aik7/Screenshot%202016-07-29%2023.09.20.png?dl=0[/img]

Looking away 2 degrees more and it dissapears

width=800 height=476https://dl.dropbox.com/s/n7uiby6g1x4g2yn/Screenshot%202016-07-29%2023.09.24.png?dl=0[/img]

 

 

 

Entity Class


public class EntitySandWorm  extends EntityMob
{

    public EntitySandWorm(World worldIn)
    {
        super(worldIn);
        this.setSize(4.0F, 4.0F);
        this.isImmuneToFire = true;
        this.experienceValue = 5;
        this.targetTasks.addTask(1, new EntityAIFindEntityNearestPlayer(this));
        this.ignoreFrustumCheck = true;
    }

    @Override
    @SideOnly(Side.CLIENT)
    public boolean isInRangeToRender3d(double x, double y, double z)
    {

        return true;
    }

    /**
     * Called to update the entity's position/logic.
     */
    public void onUpdate()
    {
        super.onUpdate();
        this.ignoreFrustumCheck = true;
        
        
        
        
        
        
        
    }









    


    


}

 

 

 

Render Class

@SideOnly(Side.CLIENT)
public class RenderSandWorm extends RenderLiving
{
ResourceLocation rec = new ResourceLocation("mb:textures/mobs/SandWorm.png");

    public RenderSandWorm(RenderManager renderManager, ModelBase model, float shadowSize) {
	super(renderManager, model, shadowSize);


    }
    
    @Override
    public boolean shouldRenderLiving(EntityLiving p_177104_1_, ICamera p_177104_2_, double p_177104_3_, double p_177104_5_, double p_177104_7_)
    {
    	return true;
    }

    @Override
    public boolean shouldRender(Entity entity, ICamera camera, double camX, double camY, double camZ){
    	return true;
    }


@Override
protected ResourceLocation getEntityTexture(Entity entity) {

	return new ResourceLocation("mb:textures/mobs/SandWorm.png");
}

@Override
public void doRender(EntityLiving entity, double x, double y, double z, float p_76986_8_, float partialTicks) {
	super.doRender(entity, x, y, z, p_76986_8_, partialTicks);

	GL11.glPushMatrix();
	float scale = 5F;
	GL11.glScalef(scale, scale, scale);
	GL11.glTranslatef(0.0F, -10F, 0.0F);
	GL11.glPopMatrix();
}

}

 

 

Share this post


Link to post
Share on other sites

Animefan8888    491

Animefan8888

Animefan8888    491

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 491
  • 4324 posts
  • Report post
Posted July 30, 2016

Did you use the entity registry code.

Share this post


Link to post
Share on other sites

gummby8    26

gummby8

gummby8    26

  • Diamond Finder
  • gummby8
  • Members
  • 26
  • 479 posts
  • Report post
Posted July 30, 2016

Did you use the entity registry code.

 

Are you asking if I registered the entity? Yes otherwise it would not appear at all. Hence the screenshots

Share this post


Link to post
Share on other sites

LexManos    1470

LexManos

LexManos    1470

  • Reality Controller
  • LexManos
  • Forge Code God
  • 1470
  • 8367 posts
  • Report post
Posted July 30, 2016

If the chunk the entity is in get culled there isnt much you can do about it, why is your entity so big, could you not try making it multiple parts and making sure that those sub-parts are in chunks that dont get culled?

Share this post


Link to post
Share on other sites

gummby8    26

gummby8

gummby8    26

  • Diamond Finder
  • gummby8
  • Members
  • 26
  • 479 posts
  • Report post
Posted July 30, 2016

If the chunk the entity is in get culled there isnt much you can do about it, why is your entity so big, could you not try making it multiple parts and making sure that those sub-parts are in chunks that dont get culled?

 

How far does one need to be for a chunk to be culled? I am only 20 or so blocks away.

 

I could make it multiple entities. It may actually solve a few animating problems I was going to run into

Share this post


Link to post
Share on other sites

LexManos    1470

LexManos

LexManos    1470

  • Reality Controller
  • LexManos
  • Forge Code God
  • 1470
  • 8367 posts
  • Report post
Posted July 30, 2016

It needs to be outside your frustrum

Share this post


Link to post
Share on other sites

gummby8    26

gummby8

gummby8    26

  • Diamond Finder
  • gummby8
  • Members
  • 26
  • 479 posts
  • Report post
Posted July 30, 2016

why is your entity so big,

could you not try making it multiple parts and making sure that those sub-parts are in chunks that don't get culled?

 

Why so big? Shock value, it eats the player and transports them into a "dungeon dimension" of sorts. Where the player kills the beast from the inside.

 

Can I make it multiple parts? I am not sure in which way you mean. Do you mean a multi part entity like the dragon? I have recreated a few multi part mobs before, none quite as large. Will the extra parts or EntityDragonPart(s), ensure the whole creature stays rendered so long as 1 EntityDragonPart is close to the player?

 

Or do I need to make a Multi-Entity....Entity? Where it is a grouping of separate entities each with their own renderer?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0
Go To Topic Listing Modder Support

  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • MrMarnic
      No Values in ForgeRegistries.ENTITIES 1.13.2

      By MrMarnic · Posted just now

      Indeed. In the latest Forge version it does work.
    • DaemonUmbra
      (1.12.2) Pixelmon Not Working - Unsupported Version of the game - The game crashed whilst exception while updating neighbours

      By DaemonUmbra · Posted just now

      What is your CPU, anyway?
    • BossOfTheLost
      (1.12.2) Pixelmon Not Working - Unsupported Version of the game - The game crashed whilst exception while updating neighbours

      By BossOfTheLost · Posted 15 minutes ago

      I think this is it, the URL code for the debug.log:

      https://gist.github.com/BossOfTheLost/53d77203c9392ad09ca85505d26981c9
    • DaemonUmbra
      (1.12.2) Pixelmon Not Working - Unsupported Version of the game - The game crashed whilst exception while updating neighbours

      By DaemonUmbra · Posted 18 minutes ago

      Then you are in desperate need of a hardware update/upgrade.
    • BossOfTheLost
      (1.12.2) Pixelmon Not Working - Unsupported Version of the game - The game crashed whilst exception while updating neighbours

      By BossOfTheLost · Posted 26 minutes ago

      but i have a x86 bit processor?
  • Topics

    • MrMarnic
      6
      No Values in ForgeRegistries.ENTITIES 1.13.2

      By MrMarnic
      Started Wednesday at 09:21 PM

    • BossOfTheLost
      8
      (1.12.2) Pixelmon Not Working - Unsupported Version of the game - The game crashed whilst exception while updating neighbours

      By BossOfTheLost
      Started Tuesday at 05:06 AM

    • oridos
      4
      Having trouble launching the client test through eclipse

      By oridos
      Started 3 hours ago

    • Drachenbauer
      0
      [1.13.2] texture error

      By Drachenbauer
      Started 54 minutes ago

    • fieldbox
      3
      Could not reserve enough space for 3145728KB object heap

      By fieldbox
      Started 1 hour ago

  • Who's Online (See full list)

    • MrMarnic
    • DaemonUmbra
    • Nuchaz
    • TheMinecraftBox
    • JTK222
    • BossOfTheLost
    • minecraftHero14
    • TheFox801
    • framepin
    • Kaelym
    • DarthIF
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.8] Need something stronger than ignorefrustrumcheck
  • Theme
  • Contact Us

Copyright © 2017 ForgeDevelopment LLC Powered by Invision Community