• 0

    posted a message on [BUG] 'Already tesselating!' error when rendering custom block
    Hey guys,

    I've been writing a mod for the past few day and I'm all most finished, my only problem that I couldn't slove by my self is a problem with custom block renders. I have look all over the internet on how to do it, even read the forge wiki on it.

    When I run minecraft it loads ok but when I try to place my block it crashes saying that its 'Already tesselating!'

    Here is my code,

    HoofBeats.java
    package com.ponyvillelive.minecraft.hoofbeats;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.util.logging.Logger;
    import com.ponyvillelive.minecraft.hoofbeats.codec.CodecMP3;
    import net.minecraft.block.Block;
    import net.minecraft.client.audio.SoundManager;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.item.Item;
    import net.minecraft.src.ModLoader;
    import net.minecraftforge.common.MinecraftForge;
    import paulscode.sound.SoundSystemConfig;
    import cpw.mods.fml.client.registry.RenderingRegistry;
    import cpw.mods.fml.common.Mod;
    import cpw.mods.fml.common.Mod.Init;
    import cpw.mods.fml.common.Mod.Instance;
    import cpw.mods.fml.common.Mod.PostInit;
    import cpw.mods.fml.common.Mod.PreInit;
    import cpw.mods.fml.common.SidedProxy;
    import cpw.mods.fml.common.event.FMLInitializationEvent;
    import cpw.mods.fml.common.event.FMLPostInitializationEvent;
    import cpw.mods.fml.common.event.FMLPreInitializationEvent;
    import cpw.mods.fml.common.network.NetworkMod;
    import cpw.mods.fml.common.network.NetworkRegistry;
    import cpw.mods.fml.common.registry.EntityRegistry;
    import cpw.mods.fml.common.registry.GameRegistry;
    import cpw.mods.fml.common.registry.LanguageRegistry;
    @Mod(modid="HoofBeats", name="HoofBeats", version="1.1.0_1")
    @NetworkMod(clientSideRequired=true, serverSideRequired=false)
    public class HoofBeats
    {
    @Instance("HoofBeats")
    public static HoofBeats instance;
    private String modid = "hoofbeats";
    @SidedProxy(clientSide="com.ponyvillelive.minecraft.hoofbeats.ClientProxy", serverSide="com.ponyvillelive.minecraft.hoofbeats.CommonProxy")
    public static CommonProxy proxy;
    
    private static Logger logger = Logger.getLogger("HoofBeats");
    
    public static Block pvlRecordPlayer;
    public HoofBeats()
    {
    }
    @PreInit
    public void preInit(FMLPreInitializationEvent event)
    {
      logger.info("Loading MP3 codec for Paulscode Sound System");
      logger.warning("This codec is still work in progress");
      SoundSystemConfig.setCodec("mp3", CodecMP3.class);
      logger.info("MP3 Codec loaded!");
    }
    @Init
    public void load(FMLInitializationEvent event)
    {
      proxy.registerRenderers();
     
      pvlRecordPlayer = (new BlockRecordPlayer(500)).setUnlocalizedName("pvlRecordPlayer").setHardness(1F).setResistance(1F).setCreativeTab(CreativeTabs.tabMisc).setStepSound(Block.soundWoodFootstep);
      GameRegistry.registerBlock(pvlRecordPlayer, "pvlRecordPlayer");
      LanguageRegistry.addName(pvlRecordPlayer, "PVL! Stream Player");
    }
    @PostInit
    public void postInit(FMLPostInitializationEvent event)
    {
    }
    }


    ClientProxy.java
    package com.ponyvillelive.minecraft.hoofbeats;
    
    import org.lwjgl.opengl.GL11;
    import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
    import cpw.mods.fml.client.registry.RenderingRegistry;
    import net.minecraft.block.Block;
    import net.minecraft.client.renderer.RenderBlocks;
    import net.minecraft.world.IBlockAccess;
    import net.minecraftforge.client.MinecraftForgeClient;
    public class ClientProxy extends CommonProxy implements ISimpleBlockRenderingHandler {
    public static int renderId;
    private ModelRecordPlayer model;
    
    @Override
    public void registerRenderers()
    {
      renderId = RenderingRegistry.getNextAvailableRenderId();
      RenderingRegistry.registerBlockHandler(renderId, this);
      model = new ModelRecordPlayer();
    }
    @Override
    public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
     
    }
    @Override
    public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
    {
      GL11.glPushMatrix();
      GL11.glTranslatef(x, y, z);
      model.render(0.0625f);
      GL11.glPopMatrix();
     
      return true;
    }
    @Override
    public boolean shouldRender3DInInventory() {
      return true;
    }
    @Override
    public int getRenderId() {
      return renderId;
    }
    }


    BlockRecordPlayer.java
    package com.ponyvillelive.minecraft.hoofbeats;
    import net.minecraft.block.Block;
    import net.minecraft.block.material.Material;
    public class BlockRecordPlayer extends Block {
    public BlockRecordPlayer(int par1) {
      super(par1, Material.wood);
    }
    @Override
    public boolean renderAsNormalBlock() {
      return false;
    }
    
    @Override
    public int getRenderType() {
      return ClientProxy.renderId;
    }
    }


    ModelRecordPlayer.java
    package com.ponyvillelive.minecraft.hoofbeats;
    import net.minecraft.client.model.ModelBase;
    import net.minecraft.client.model.ModelRenderer;
    import net.minecraft.entity.Entity;
    public class ModelRecordPlayer extends ModelBase
    {
    ModelRenderer Base;
    ModelRenderer Bits;
     
      public ModelRecordPlayer()
      {
       textureWidth = 64;
    	 textureHeight = 64;
    	 setTextureOffset("Base.Shape11", 0, 32);
    	 setTextureOffset("Base.Shape12", 0, 0);
    	 setTextureOffset("Bits.Shape21", 40, 21);
    	 setTextureOffset("Bits.Shape22", 0, 21);
    	 setTextureOffset("Bits.Shape23", 0, 39);
    	 setTextureOffset("Bits.Shape24", 50, 21);
    	 setTextureOffset("Bits.Shape25", 4, 39);
    	 setTextureOffset("Bits.Shape26", 0, 51);
    	 setTextureOffset("Bits.Shape27", 6, 34);
    	 setTextureOffset("Bits.Shape28", 0, 36);
    	 setTextureOffset("Bits.Shape29", 4, 32);
    	
    	 Base = new ModelRenderer(this, "Base");
    	 Base.setRotationPoint(-8F, 19F, -8F);
    	 setRotation(Base, 0F, 0F, 0F);
    	 Base.mirror = true;
    	   Base.addBox("Shape11", 1F, -3F, 14F, 1, 3, 1);
    	   Base.addBox("Shape12", 0F, 0F, 0F, 16, 5, 16);
    	 Bits = new ModelRenderer(this, "Bits");
    	 Bits.setRotationPoint(1F, -6F, 2F);
    	 setRotation(Bits, 0F, 0F, 0F);
    	 Bits.mirror = true;
    	   Bits.addBox("Shape21", 3F, -1.5F, -0.5F, 1, 4, 4);
    	   Bits.addBox("Shape22", 2F, 5F, 1F, 10, 1, 10);
    	   Bits.addBox("Shape23", 0F, 0F, 1F, 1, 7, 1);
    	   Bits.addBox("Shape24", 2F, -1F, 0F, 1, 3, 3);
    	   Bits.addBox("Shape25", 5F, -2.5F, -1.5F, 1, 6, 6);
    	   Bits.addBox("Shape26", 4F, -2F, -1F, 1, 5, 5);
    	   Bits.addBox("Shape27", 1F, -0.5F, 0.5F, 1, 2, 2);
    	   Bits.addBox("Shape28", 7F, 3F, 12F, 2, 2, 1);
    	   Bits.addBox("Shape29", 1F, 3F, 12F, 6, 1, 1);
    	   Base.addChild(Bits);
      }
     
      public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
      {
        super.render(par1Entity, par2, par3, par4, par5, par6, par7);
        setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
        Base.render(par7);
      }
     
      private void setRotation(ModelRenderer model, float x, float y, float z)
      {
        model.rotateAngleX = x;
        model.rotateAngleY = y;
        model.rotateAngleZ = z;
      }
     
      public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)
      {
        super.setRotationAngles(par1, par2, par3, par4, par5, par6, par7Entity);
      }
      public void render(float pixelSize)
      {
       Base.render(pixelSize);
      }
    }


    Any help and/or comments are welcome and are appreciated,
    willam2405
    Posted in: Modification Development
  • 0

    posted a message on [REQ]More Modders :D
    I code be you'r 3D coder(OpenGL is my thing)

    Skype name: william2405
    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on Simple Hunger Games [NO WHITELIST][24 players max]
    I'm currently hosting a Hunger games server and are looking for players who want to join.
    The server is using the following map: http://www.planetmin...games-2-848118/
    The game will start at 6:10 pm AEST or when the server is full

    EDIT: The games are over
    Posted in: Minecraft Survival Servers (archive)
  • 0

    posted a message on Real Time Zones in Minecraft!! :D
    Maybe, do you need it to work with other mods?
    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on Modifying the Minecraft Loading Screen
    I'm sorry but I can't help, I have to much other stuff to work on, sorry
    Posted in: Modification Development
  • 1

    posted a message on Modifying the Minecraft Loading Screen
    I'm agree with Bonboneater, I doubt you could do this you self if your just starting out because you would need to learn OpenGL.
    I could help you but I wont be able to work on it 24/7 because I'm currently writing a game.

    @EDIT:
    If you could send me the image/s you want in the background please
    Posted in: Modification Development
  • 0

    posted a message on [1.2.5][ForgeAPI Add-on]HD Textures
    I have added a poll to see what people want
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.2.5][ForgeAPI Add-on]HD Textures
    I will get right to work on it
    Posted in: Minecraft Mods
  • 1

    posted a message on [1.2.5][ForgeAPI Add-on]HD Textures
    So you guys want HD textures without forge or MCPatcher?
    And also I have found a bug which means the block texture id can't be more than zero :P, I will get right on to it
    Posted in: Minecraft Mods
  • 6

    posted a message on [1.2.5][ForgeAPI Add-on]HD Textures
    HD Textures(Forge Add-on)
    This is a simple add-on to the ForgeAPI with allows moders to have blocks with texture at higher
    resolutions than 16x16.
    The following is a example of how you achieve this

    BlockHiRes.java
    package net.minecraft.src;
    
    import net.minecraft.src.forge.IHiResTextureProvider;
    
    public class BlockHiRes extends Block implements IHiResTextureProvider {
    
    	 protected BlockHiRes(int par1) {
    		  super(par1, Material.ground);
    	 }
    
    	 @Override
    	 public String getTextureFile() {
    		  return "terrain32.png";
    	 }
    
    	 @Override
    	 public int getTextureSize() {
    		  return 32;
    	 }
    }


    mod_TestBlock.java

    package net.minecraft.src;
    
    import net.minecraft.src.forge.MinecraftForgeClient;
    
    public class mod_TestBlock extends BaseMod{
    
    		  @Override
    		  public String getVersion() {
    					 return "0.1";
    		  }
    
    		  @Override
    		  public void load() {
    					MinecraftForgeClient.preloadTexture("terrain32.png");
    					Block test = new BlockHiRes(200);
    					ModLoader.registerBlock(test);
    					ModLoader.addRecipe(new ItemStack(test, 1), new object[] {"#", '#', Block.dirt});
    		  }
    }


    terrain32.png

    Finished product

    Source files can be found here: https://github.com/W...tures-ForgeAPI-
    Posted in: Minecraft Mods
  • 0

    posted a message on Look for a few modders to help me with a mod
    Quote from MinecraftCuzs

    I myself am a modder, but the mod I want to work on will be big and I need some more people to help me with it.
    Please, only respond if your moderatly good at modding a java coding. If your a begginer you can reply, but you only will be selected if I decide to add more basic things to the mod. If you work on this mod you will recieve credit. The mod i'm working on is a robot mod based on F.I.R.S.T. Robotics. Many elements will be in this mod that why I need more modders then just myself. More details will be given later.
    - zoroarkkitsune


    Could you please share with us a bit more information about your idea and I may be able to help
    Posted in: Modification Development
  • 0

    posted a message on [WIP]Minecraft Admin Tool[1.2.4]
    Quote from simpaPWN

    Looks like a real scam, people be careful.


    I will make a video when I get the time, I'm currently working on version 1.1
    Posted in: Minecraft Tools
  • 0

    posted a message on [WIP]Minecraft Admin Tool[1.2.4]
    Upcoming in version 1.1:
    *Fixed baseFiles.list not downloading
    +New advanced UI
    +Javadoc for IntelliMod
    Posted in: Minecraft Tools
  • 1

    posted a message on [WIP]Minecraft Admin Tool[1.2.4]
    Minecraft Administration Tool
    Now replacing my older Minecraft Mod Installer

    Minecraft Administration Tool (M.A.T.) is a Mod manager/installer. It was originally known as the Minecraft Mod Installer.
    MAT uses a system call 'IntelliMod' to figure out if a Mod is Modloader Compatible, or
    if it should be installed directly into minecraft.

    NOTE: This software run on Java 1.6 and newer
    DEV-NOTE: If you are a java developer and you would like to help me code, PM me

    This software is covered by the HSCS licence, find out more here
    How to use MAT:

    MAT at this point of development only comes with a basic UI, however for those people that have little experience using the basic UI, here is a simple guide,

    1. Open MAT;
    If this is your first time running MAT, MAT will automatically download any files it needs.

    2. Choose your minecraft directory;
    If you want to install into your default minecraft directory, then skip this step.
    To change the directory you wish to install into, click the top-right hand button labelled 'Browse...'
    then select your '.minecraft' directory.

    3. Choose your Mod zip file;
    To browse for a Mod zip, click middle-right button labelled 'Browse...'. A file select dialog will appear, allowing you to browse to your selected Mod zip. Then click on it to highlight it and then click 'Open'.

    4. Install your Mod;
    If you have done everything correctly, the 'Install Mod' button should be enabled (NOTE: If you have done everything right and the button still isn't enabled, please PM me). Just click that button and there you go, your mod is installed.

    Addendum;
    I would ask again that if you get any problems that do not have an obvious solution, please PM me. My software is in constant development and improvement. Thank You!

    In the current release
    Has been disabled because of ongoing developmental requirements
    Features still to be released

    Current and Upcoming features in MAT:


    IntelliMod
    Basic UI
    Advanced UI
    Minecraft API detection
    Check from block/item id conflicts in mod config files
    Mod Pack Support

    UI's:
    (Basic UI - Available)

    (Advanced UI - Still In development)

    Posted in: Minecraft Tools
  • 0

    posted a message on Minecraft Forge is the devil
    Try using MCPatcher to install forge and OptiFine together
    Posted in: Mods Discussion
  • To post a comment, please or register a new account.