Jump to content

delpi

Forge Modder
  • Posts

    840
  • Joined

  • Last visited

Posts posted by delpi

  1. Oh,

     

    That is something you should have put in the first post.

     

    You want it to one time sort or periodically do it?

     

    If periodically, just set up a tick event to fire off a sorter every so often.

     

    If you want one time, just watch for the gui to be closed and fire it or watch for your inventory to change.

  2.  

    Why???

    protected ResourceLocation getEntityTexture(Zeus entity){
    	return mobTextures;
    }
    protected ResourceLocation getEntityTexture(Entity entity){
    	return this.getEntityTexture((Zeus)entity); 
    }
    [\code]
    
    just
    [code]
             protected ResourceLocation getEntityTexture(Entity entity){
    	return mobTextures; 
    }
    [\code]
    
    The following needs to extend ModelBiped.
    public class ZeusModel extends ModelBase
    
    I don't remember the vanilla dimensions but are you resizing the entity at all?  If not, don't even have your own model, just send a new modelbiped in your render.
    
    Even if you do want to resize your entity, i would do what I said above first and get that working.
    
    

  3. He wasn't really giving an opinion so much as facts.  You should follow the best practices on those instance.  The PlayerSP will crash your mod.

     

     

    You said in your first post that "when i load this in client".  Those events I believe are server side.  Not really sure if you will ever see them with just the client running.  Then again, I haven't played much with mods in just the single player environment.

     

     

     

     

     

  4. I'm assuming you have a more complicated version where the speed actually changes, otherwise, that is a waste.

     

    Set the speed to one value and skip the data watcher for now and see if it changes anything for you.

     

    Why are you putting in a randomId when you register your mob?

  5. I have a mod that I created to do some simple world fill, delete, and copy/paste for ease of building.

     

    I have a question around TileEntities, specifically chests.

     

    When I copy a portion of the world with the chest, I would like the chest contents to be included.  Easy enough, grab the nbt from the tile when copying. 

     

    After the paste when I write the nbt data back in, getting a world crash to the point where I can't reload the world.

     

    I 'think' its because I just pasted in nbt that has position references for the tile that are wrong since it moved. 

     

    Anybody got experience with doing this?  Am I going to have to carve out just the inventory part of the nbt data and deal with that?

  6. I just found the NBT thing before your edit.  I got a potion that delivers my effect.  Name is wrong and color is wrong, but I'm sure I could fix that.

     

    All that being said, surely there is a built in way to do it??  Anyone got experience with this?

  7. There is a number of things that changed depending on how much you are changing with your custom dimension.

     

    I honestly don't remember the specifics.  None of them were too hard to figure out.

     

     

    I suggest when you create your WorldProvider and ChunkProviders, just extend the vanilla classes and do not do anything specific to it until you can get the dimension to load and you can teleport in and out of it.

  8. No, that isn't it.

     

    I'm guessing if you log the client out and back in, the world is rendered.

     

     

    In your teleport code, before you send the player back to the overworld, get a block from where the player will teleport to.  It seems to send a packet or something that makes everything update.

     

    I saw someone mention this and I played around with it.  On most teleports you are using a portal block, ect.  that involves searching for blocks ect.  That doesn't happen when you just straight up teleport without a portal.  Using the one getblock call seems to solve the issue.  Since I added it to my teleports, I have had zero of the non world loading issues.

  9. I found a way to render 3d techne items when on an entity.  Things like armor, weapons, ect. 

     

    It should work with obj as well. 

     

     

    For what it looks like in your inventory, i just used the default json for that part.  I did see some post by coolAlias changing the inventory up for his zelda bombs if I remember right.

  10. Does that code really show up in your IDE without a ton of errors reported? 

     

    Things to do:

    - Go read up on NBTTagCompound.  Search for some tutorials

    - Delete all the variables you defined for your item.  They won't work the way you want them to. If you want variables specific to an itemstack in the world, you have to store the variables values in the itemstack NBT Data and then pull them out each time you want to use them.  You can't store in the Item class.  there is only one of those and its not unique for your itemstack in the world.

    - 'compound = itemstack.getTagCompound();' is probably giving error.  You need to test if there is a tagcompound first and there probably isn't.  If there isn't add one first.

    - 'itemstack.stackTagCompound = compound;' is not how you write the data back. 

  11. Trying to follow previous tutorials on Potions and I think I have it working, but I can't figure out how to add my potion to a creative tab.

     

    I've got a custom creative tab working and all that, but how do I refer to my custom potion?  \

     

    I tried 'new ItemStack(Items.potionitem, 1, Potion_Manager.waterwalk.getId())'

     

    But that humorously provided "A Bungling Potion".  haha

     

    waterwalk extended Potion per the tutorials.

     

     

  12. I finally got everything working in 1.8 and starting playing again.

     

    Something very weird is happening.  After I break blocks, they are blurry, almost a double vision of it.  On top of that, none of the blocks stack at first.  They go as single items into my inventory, sometimes as multiples (haven't figured out the pattern).  I can combine them manually at that point, but it is really annoying and slows down digging.

     

    I haven't played around with anything on blocks dropping or the vanilla inventory.

     

    Is this something others have seen?  I didn't find anything searching but I was having a hard time describing it right in search.

     

    EDIT : Ignore the blurry.  Found the cause for that.  It was just one world where I had an odd render effect going.

     

    EDIT 2 : Ok, found some old code where I was putting some nbt data on inventory items with a scan.  In 1.7.2 they would combine if the NBT tag was the same.  In 1.8, it won't combine auto.  You have to manually do it.  Pulling out that code for now until I can explore it more. 

  13. Ok, just did that.

     

    Struggling with what is failing thought.

     

    It derails here.

        public boolean func_175732_a(EnumCreatureType p_175732_1_, BiomeGenBase.SpawnListEntry p_175732_2_, BlockPos p_175732_3_)
        {
            List list = this.getChunkProvider().func_177458_a(p_175732_1_, p_175732_3_);
            return list != null && !list.isEmpty() ? list.contains(p_175732_2_) : false;
        }
    

     

    One iteration:

    -List contains all my entities as it should.  Expanded it in Watch to verify that it has Creeper Red and it does.

    -p_175732_2_ is Creeper red

    - the function 'list.contains(p_175732_2_)' is returning false though.

     

    Grabbed the valves from below the variables when hovering over them.  first is list, 2nd is p_175732_2_

    [Creeper_Charged*(40-80):25, Creeper_Red*(100-120):25, Creeper_Breeder*(10-40):5, Creeper_Blue*(10-40):5, Creeper_Fire*(10-40):5, MyEntityHumanoid*(10-40):5]
    
    Creeper_Red*(100-120):25
    

     

     

    I don't see why its false.  Its probably obvious and I'm just missing it.  Hope you see something.

×
×
  • Create New...

Important Information

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