Jump to content

Androm

Members
  • Posts

    58
  • Joined

  • Last visited

Posts posted by Androm

  1.   On 4/8/2015 at 2:12 PM, N247S said:

    Hey, it wouldnt work if you just do "setStepSound()". this will mean you have to actualy walk on top of them. But since you climb a ladder it wouldnt work.

    In the vanilla codes, "BlockLadder", I found this. add it to your code and see if it worked out

    @Override
        public boolean isLadder(IBlockAccess world, int x, int y, int z, EntityLivingBase entity)
        {
            return true;
        }

    This wouldn't change anything, because he extends BlockLadder already (he can already climb), but correct me if I am wrong!

  2. Hello modders,

    If you have a RenderLivingEntityEvent.Pre and you know, that a Player is being rendered, how can you check, which LayerRenderer is rendering (like a custom one). Is this even possible,? If not, how can you register your own LayerRenderer and remove all other LayerRenderers? I don`t want code, an idea is enough. Thanks for your help!

  3. 1. If you set the MaxPermSize too high, the java garbage collector needs more time - So normally you can choose a high number and lower it (half the amount everytime), till you get an error (not this error). Then just double it and you have the perfect amount (normally it is 256m, but not more than 2048m!!(and that's rare))

    2. Optifine is causing the trouble....

     

    And sorry, that I was telling you something wrong...

  4. No, M_ModelRenderer.mRs wasn't null, but it couldn't get the value for the key. In the hashmap is an object called new ModelDwarFemale, but if i used the key new ModelDwarfFemale or cast it to ModelBase the key doesn't exist. I solved the problem with adding a '.getClass().getName()'. Now there is no error, but nothing is rendered..

  5. If I go in the Thirdperson view, minecraft crashes with following error:

     

      Reveal hidden contents

     

    Something is null, but I don`t what because the doRender(....) is called and the arguments aren`t null...

    Event, where it happens:

    @SubscribeEvent(priority = EventPriority.HIGHEST)
    public void onRenderLiving(RenderLivingEvent.Pre rlep) {
    	if(rlep.entity instanceof EntityPlayer) {
    		EntityPlayer player = (EntityPlayer)rlep.entity;
    		LayerRenderer lr = new M_LayerDwarfFemale(new RenderManagerUtils().getValueOfSkinMap("default"));
    		lr.doRenderLayer((EntityLivingBase)player, 1F, 1F, ClientEvents.partialTicks, (float)player.posX, (float)player.posY, (float)player.posZ, 1F);
    		System.out.println("Tried to render player");
    	}
    }
    

    No class changed since I posted them. Anyone can help me?

     

     

     

  6. I managed to write some LayerRenderers and apply them to all players, but do I really have to delete the LayerRenderers which I don't need, or is there an event where I can cancel special LayerRenderers?

    Some of my classes: (If you have problems to understand it, tell it me please)

     

      Reveal hidden contents

     

  7. Hello modders,

    I have some questions about rendering the player. Since forge 1.8 RenderPlayerEvents are useless. So now there are ayers.

    1. If I want to change the player model and the rendering stuff (like Entities), will I have to redo all layers or is there a better solution?

    2. The RenderLivingEntity event still exists, so can I render the EntityPlayer there without doing all the stuff with layers? (I think this wouldn`t work but I better asked)

    3. Are the layers cancelable? I don`t want currently armor being rendered. (What else option do I have?)

    4. Can I just copy paste minecraft/minecraftforge`s code for layers and just change some values, or is "expands" better?

    5. If I have to add my own Layers, where can I register them? And how can I check if the layer, which is currently rendered, if it is my own layer?

    6. If i have more models  (3 different types and for every type 2 different texture) can I just make 3 different Layers which have 2 different texture registered (register a layer with texture 1, set ResourceLocation to texture 2 and register the same layer with a different texture a second time?

     

    I am currently looking in the source code to find the answers, but if somebody can answer it faster, please do.

    If I found an answer, I will post it.

    Sorry for my bad English and thanks for your help.

    Androm

  8. The model change but I there isn´t the right texture. Forge tries to set the steve texture on my custom model. I know I forgot it. The problem is i don´t know how to change the texture. Maybe too with ObfuscationReflectionHelper or is there an easy method? Thanks for your help! (I know I can optimize my code, but please don´t say it)

     

      Reveal hidden contents

     

  9. Do you mean that:

     

      Reveal hidden contents

     

    So you can see three players on server and they will have different models (just need to change the steve texture)?

     

  10.   Quote

    //I tried that before but it doesn´t work (no crash, but no other model)

    //pre.renderer.setRenderPassModel(new ModelDwarf());

                    //That changed the model, but the skin wasn´t changed and there were no rotations(my fault?) That´s what I got from decompiling a mod (Custom Player Models[beta])

    //ObfuscationReflectionHelper.setPrivateValue(net.minecraft.client.renderer.entity.RendererLivingEntity.class, pre.renderer, new ModelDwarf(), new String[] { "mainModel", "field_77045_g" });

     

    I tried something but ObsucationReflectionHandler... sets the Main model of all players.

  11. Hello there,

    maybe it's a stupid question but how do you change the player model? I searched in goggle and later I recompiled a mod which change the player model. But nothing helped.

    I want that the player is rendered with a special model and a special texture (all the time).

    My code:

     

      Reveal hidden contents

     

    I think there is an easy way to do it and I am just too stupid. Thanks for your help!

  12. Thanks for your help. But now i have another problem:

    event.player.addChatMessage(new ChatComponentTranslation("msg.badkarma.txt", new Object[0]));

    works, but it isn´t colored anymore.

    In the .lang file:

    msg.badkarma.txt=You got §1Zeus §fangry! §4NOW FEEL HIS PAYBACK!

    §1 = DARK_BLUE; §f = WHITE; §4 = DARK_RED.

    In the chat is written:

    You got ?1Zeus ?fangry! ?4NOW FEEL HIS PAYBACK!

     

    EDIT: Solved the problem. Thread can be locked now!

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.