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;
}
}
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
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
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
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
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
0
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
ClientProxy.java
BlockRecordPlayer.java
ModelRecordPlayer.java
Any help and/or comments are welcome and are appreciated,
willam2405
0
Skype name: william2405
0
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
0
0
1
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
0
0
1
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
6
0
Could you please share with us a bit more information about your idea and I may be able to help
0
I will make a video when I get the time, I'm currently working on version 1.1
0
*Fixed baseFiles.list not downloading
+New advanced UI
+Javadoc for IntelliMod
1
In the current release
Has been disabled because of ongoing developmental requirements
Features still to be released
Current and Upcoming features in MAT:
0