Jump to content

TechoMan

Members
  • Posts

    33
  • Joined

  • Last visited

Posts posted by TechoMan

  1. i think you in wrong category... and Eloraam did make its mod by itself...he even was making forge , soo i dont think what its unreal to do...making forge and RP is a lot harder , than just making RP.And there is tons of changes , that did make world a lot easyer for codders...

  2. I'm back...Its my second atempt of creating liquid.Now i'm having new problem - fluid dont want to flow at all....or actyallu it will flow , but in very strange method. When placed , they are only 1 "pixel thik" , but i even used setQuantaPerBlock to 12, but it still only 1 thick...wich is very strange ( http://snag.gy/6NMpm.jpg <= screnshot of it , idk how to attach screnshot to post , so i'm using snag.gy ).Next - its cind of realistic how it works , but i dont want that. When they fall on top of themself....they like in real - stacking into bigger liquid.They even flow then , but its like in real life.I dont think MC players will like that , so why does it happen?

     

    And second question - how i can apply effects when player in liquid? Like lava makes you in fire.

  3. Because I was writing it in a hurry and that was the only event I could think of on the spot. Any suggestions to improve it are welcome :P

     

    I'm fairly new to Forge modding, so some of the stuff I do may not be the best solution.

    there is other events....I think better to use player tracker for client side , and for server side - i think server load will be ok , beacos its the latest what happyning on server startup...when commands are added.

  4. So, I've created a spawner block that uses the TileEntitySpawner, however it only works when I pass the name of Vanilla mobs in, and not my custom (and registered ones) using the registerModEntity.

     

    Edit:

    Okay, so using:

    EntityList.addMapping(MyMob.class, "MyMob", 75);

    fixes the issue.

     

    However, I don't really want to use Vanilla IDs (like the 75, even though it;s a mod-registered mob) so is there any way around that?

     

    you need to change logic of spawners , beacos they using only vanillas mobs...The same as spawning egg - they just dont know what you entity exists.

  5. Again , i'm making someting that dont use tons of blockIDs.Now - its fluids.I'm making ~14 diffrent fluids , and i dont want to use 14 diffrent blocks for them.Is there build in that cind of feature into forge , or do i need to use tileEntity for that?

     

    And is it a good idea , to do that?

  6. Why would you check during loading from NBT? If you want a default value, set it in the constructor - that's what constructors are for. If you want the maximum value to change, you can do so just fine without a HashMap, and if you only have a few pre-defined values (such as 'mana', 'xp', etc.), you aren't gaining anything by using a HashMap versus several local fields or even an array or List.

    beacos if player just reconects - what will be? It will load that default values..Or actually it will be worse - it will load from NBT value 0.Beacos getInteger returns 0 , if its cant find that tag.

     

    Or why dont do both of that? 1.If there is no that tag , what we a searching in NBT , dont modify HashMap. 2. If there is that value in NBT , load it from NBT.

     

    So if you do default values , it will load them , beacos player dont have that tag.

    If you are saving and loading NBT properly, the value you load will be correct; loading from NBT is not the place to set a default value. When the player first starts a world, the constructor is called without reading from NBT afterward, so the default value you set there will then be saved and loaded just fine.

     

    hmm , didnt know that *lafing at bad documented wiki*. What about if player was alredy playing on server?

  7. oh , you dont open gui... You have GUI only at client-side , and its not opening on server-side. You mod NEED TO BE @networkmod . Just put @NetworkMod after @Mod in you main mod.

     

    Or you dont register you GuiHandler. GUI and networking not documenting that good at wiki.There is nothing about network mod , and what you cant use GUI without it.

    And the same with Entitys - you MC will just crash if it will spawn , and you mod without @NetworkMod.

    And i think tileEntity buggy too without @NetworkMod.....TM@NetworkMod

  8. You will still need to add the attributes to the player somehow, possibly with IExtendedEntityProperties or during EntityConstructing event. As for checking the attributes, just look at any of the vanilla Entity classes and you will see plenty of examples of adding and checking attributes.

    you can easy add attributes via potions....Heh , will search if noone know that...maybe will make tuts for people like me :D

  9. Why would you check during loading from NBT? If you want a default value, set it in the constructor - that's what constructors are for. If you want the maximum value to change, you can do so just fine without a HashMap, and if you only have a few pre-defined values (such as 'mana', 'xp', etc.), you aren't gaining anything by using a HashMap versus several local fields or even an array or List.

    beacos if player just reconects - what will be? It will load that default values..Or actually it will be worse - it will load from NBT value 0.Beacos getInteger returns 0 , if its cant find that tag.

     

    Or why dont do both of that? 1.If there is no that tag , what we a searching in NBT , dont modify HashMap. 2. If there is that value in NBT , load it from NBT.

     

    So if you do default values , it will load them , beacos player dont have that tag.

  10. That's the beam what I'm not searching for :/

     

    Search in RenderBlocks(package net.minecraft.client.renderer;).Its just blocktype , like torch rails and other that kind of renderers.

     

        public boolean renderBlockBeacon(BlockBeacon par1BlockBeacon, int par2, int par3, int par4)
        {
            float f = 0.1875F;
            this.setOverrideBlockTexture(this.getBlockIcon(Block.glass));
            this.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
            this.renderStandardBlock(par1BlockBeacon, par2, par3, par4);
            this.renderAllFaces = true;
            this.setOverrideBlockTexture(this.getBlockIcon(Block.obsidian));
            this.setRenderBounds(0.125D, 0.0062500000931322575D, 0.125D, 0.875D, (double)f, 0.875D);
            this.renderStandardBlock(par1BlockBeacon, par2, par3, par4);
            this.setOverrideBlockTexture(this.getBlockIcon(Block.beacon));
            this.setRenderBounds(0.1875D, (double)f, 0.1875D, 0.8125D, 0.875D, 0.8125D);
            this.renderStandardBlock(par1BlockBeacon, par2, par3, par4);
            this.renderAllFaces = false;
            this.clearOverrideBlockTexture();
            return true;
        }
    

  11. Pumpkin dont render in game overlay...there is function for that in Item class , for rendering stuff if you armor is equiper on player.

        /**
         * Called when the client starts rendering the HUD, for whatever item the player currently has as a helmet. 
         * This is where pumpkins would render there overlay.
         *  
         * @param stack The ItemStack that is equipped
         * @param player Reference to the current client entity
         * @param resolution Resolution information about the current viewport and configured GUI Scale
         * @param partialTicks Partial ticks for the renderer, useful for interpolation
         * @param hasScreen If the player has a screen up, which will be rendered after this.
         * @param mouseX Mouse's X position on screen
         * @param mouseY Mouse's Y position on screen
         */
        @SideOnly(Side.CLIENT)
        public void renderHelmetOverlay(ItemStack stack, EntityPlayer player, ScaledResolution resolution, float partialTicks, boolean hasScreen, int mouseX, int mouseY){}
    

  12. no i want them to be added to players , and stuff like that , by myself in mod.I want make items that will give some effects , but i dont want to make own attribute system , if there is alredy one exists ;)

    And its good , what i can make that.Can you give example of cheking , does player have attribute or no?

  13. 1. Just use HashMap of recipies , with entry. Watch Vanilla furnace , how it does work , and you will undestend that. All what you need to modify - change in furnace code , to use entrys.

    2. When shift - click? you didnt make you Container right , public ItemStack transferStackInSlot(EntityPlayer player, int slot) <- its when someone shift clicks. Again , watch vanilla code to make its more stable.

     

    How to watch vanilla code? Click Ctrl+Shift+T in eclipse , and type TileEntityFurn .It will search for class with that name. For containers - ContainerFurnace.

  14. heh , i will help you then ;)

    GL_CULL_FACEL - render only that sides , that screen ( AND YES , ACTUALLY SCREEN , not player.) can see.Its faster to render stuff , but can be buggy in "bad code developers" hand. What it can do - from one side , poly / square is visible , but from other no.That is acually what it does at all - you can see from one side , but cant from other.Its sometimes very needed , but sometimes it can srev up you render.There is diffrent modes on it , and i dont know what mode MC use...That not a problem - i just turn it off , but....meh , -0.05 fps , just dont care ;) .But for some one its more than that , and it very importen for "tons of" render.When you rendering 1M of someting - YOU NEED IT.

×
×
  • Create New...

Important Information

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