Jump to content

Wuerfel_21

Forge Modder
  • Posts

    47
  • Joined

  • Last visited

Posts posted by Wuerfel_21

  1. True Story...

     

    The first language i fully understood was... Casio Basic, the uglyest and slowest thing in the world, but quite simple and easy to learn the basics...

     

    looking at java... highly complicated mess of weirdness...

     

    looking at minecaft/forge... badly coded, hacked together, badly documented ball of mud...

     

    not the perfect thing to begin with. Heck, even a standalone java game is probably less confusing!

  2. I have some items which fire Fireballs, which mostly works, but when travelling, the fireballs movement goes... rather intresting.

     

    For the first second or so, it flies as expectd, only to then appear somewere way further(but still in correct direction, just alot further).

    In the case of ghast fireballs, they seem to duplicate, with the "ghost" having its aim a bit off (only the original one seems to impact).

     

    Code:

     

    https://github.com/Wuerfel21/The-Derpy-Shiz-Mod/blob/master/src/main/java/net/wuerfel21/derpyshiz/items/FireSword.java#L65-L84

     

    https://github.com/Wuerfel21/The-Derpy-Shiz-Mod/blob/master/src/main/java/net/wuerfel21/derpyshiz/items/ItemFirechargeLauncher.java#L31-L45

     

  3. So, i have been trying to have a block emit redstone based on a field of its tile entity.

    Currently, when the flag in the TE turns on, the redstone dust next to the block turns on, but when the flag turns off, the redstone stays on until i manually update it

     

    Block: https://github.com/Wuerfel21/The-Derpy-Shiz-Mod/blob/master/src/main/java/net/wuerfel21/derpyshiz/blocks/BlockDetectorBox.java

     

    TE: https://github.com/Wuerfel21/The-Derpy-Shiz-Mod/blob/master/src/main/java/net/wuerfel21/derpyshiz/entity/tile/TileEntityDetectorBox.java

  4. Im trying to have a pickaxe break a 3³ cube of blocks, bt somehow the server thinks the blocks are still there, while the client thinks they're gone.

     

    Pickaxe:

    https://github.com/Wuerfel21/The-Derpy-Shiz-Mod/blob/master/src/main/java/net/wuerfel21/derpyshiz/items/LongPickaxe.java

     

    Event Handler to do it:

    https://github.com/Wuerfel21/The-Derpy-Shiz-Mod/blob/master/src/main/java/net/wuerfel21/derpyshiz/DerpyEvents.java#L286-L305

     

    Probably a very obvious problem(as always) but im not getting it...

  5. Hello, i have an item that takes varying amounts of damage based on what you do.... but theres a problem. when i have less durability left than im going to take, i will get a quantity 0 stack that is fully functional.

    I also tried calling damageItem multiple times dealing 1 damage, same result.

     

    Hope you find the problem :$https://github.com/Wuerfel21/The-Derpy-Shiz-Mod/blob/master/src/main/java/net/wuerfel21/derpyshiz/items/FireSword.java

  6. So, i tried to have a 14*14 face, but it uses the full texture, not the center 14*14 pixels as intendet. P.S.: wp is 1d/16d

     

    @Override
    public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float f) {
    	this.bindTexture(TextureMap.locationBlocksTexture);
    	IIcon woodOak = Blocks.planks.getIcon(0, 0);
    	IIcon woodEbony = GameRegistry.findBlock("derpyshiz", "plank").getIcon(0, 0);
    
    	double bodyMinU = ((woodEbony.getMaxU()-woodEbony.getMaxU())*wp)+woodEbony.getMinU();
    	double bodyMaxU = woodEbony.getMaxU()-((woodEbony.getMaxU()-woodEbony.getMaxU())*wp);
    	double bodyMinV = ((woodEbony.getMaxV()-woodEbony.getMaxV())*wp)+woodEbony.getMinV();
    	double bodyMaxV = woodEbony.getMaxV()-((woodEbony.getMaxV()-woodEbony.getMaxV())*wp);
    
    	Tessellator tessellator = Tessellator.instance;
    	GL11.glPushMatrix();
    	GL11.glTranslated(x, y, z);
    	tessellator.startDrawingQuads();
    	//front body
    	tessellator.addVertexWithUV(1-wp, wp, wp, bodyMinU, bodyMaxV);
    	tessellator.addVertexWithUV(wp, wp, wp, bodyMaxU, bodyMaxV);
    	tessellator.addVertexWithUV(wp, 1-wp, wp, bodyMaxU, bodyMinV);
    	tessellator.addVertexWithUV(1-wp, 1-wp, wp, bodyMinU, bodyMinV);
    
        tessellator.draw();
        GL11.glPopMatrix();
    }
    

×
×
  • Create New...

Important Information

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