Jump to content

rob_bb

Members
  • Posts

    47
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    Too old to be new...

rob_bb's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. By multi textured, do you mean each side is a different texture or just the top and sides are different?
  2. The following fixed that issue @Override public boolean canBeReplacedByLeaves(World world, int x, int y, int z) { return false; } But I still have an issues with vines replacing my trunk blocks. See Image here http://s15.postimg.org/xgz4geyrv/vines.png
  3. Hi I have a class generating trees. The problem is it appears my tree is being spawned, then other trees in the forest or jungle are being spawned, and their leaf blocks are replacing my tree trunk blocks. How would I have it the other way around, that is my tree trunk growing through the other trees leaves? Is it about the order of the tree generators? I am adding my class in preInit() with GameRegistry.registerWorldGenerator(new SmallTreeWorldGen()); Can I make my trees spawn last in a chunk?
  4. Ok, I have that sorted, because I am using 1.5.1 the code is a little different, here is the code for any one interested: But I now have another problem. Using this code to create saplings: http://paste.minecraftforge.net/view/9901cb84 and code similar to the above for the ItemBlock, I get the correct names, and I get the correct icon when I plant a sapling, but in the creative tab I get the same icon for both saplings, that being the first icon. Any clues as to why both items have the same icon?
  5. You need to lookup the tutorial on sub blocks from the main wiki http://www.minecraftforge.net/wiki/Metadata_Based_Subblocks
  6. Hi, I am using the following code to create an item block, and to name the items. The problem I am having is the code creates a blank line in the item name, and I assume it is because I am using addInformation(). How do I give each item in a multiblock it's own name? public class TreeSmall_Logs_IB extends ItemBlock { public static final String blockType[] = { "banana", "orange" }; public TreeSmall_Logs_IB(int par1) { super(par1); this.setMaxDamage(0); this.setHasSubtypes(true); } @Override public int getMetadata(int metadata) { return metadata; } @Override public String getUnlocalizedName(ItemStack itemstack) { int i = MathHelper.clamp_int(itemstack.getItemDamage(), 0, 3); return new StringBuilder().append(blockType[i]).append("Log").toString(); } @SuppressWarnings({ "unchecked", "rawtypes" }) @Override @SideOnly(Side.CLIENT) public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4) { switch (stack.getItemDamage() % blockType.length) { case 0: list.add("Banana Tree Wood"); break; case 1: list.add("Orange Tree Wood"); break; } } }
  7. Hi What does @SideOnly(Side.CLIENT) actually do? I had thought it meant the code only ran or applied to the client or server side of the mod. But in my block I have this: @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister iconRegister) { String tex; LogHelper.detail("Loading " + this.getUnlocalizedName2() + " rotting textures..."); iconBuffer = new Icon[16]; tex = Reference.MOD_ID + ":" + this.getUnlocalizedName2() + "_00"; iconBuffer[0] = iconRegister.registerIcon(tex); LogHelper.verbose("Loaded " + tex); tex = Reference.MOD_ID + ":" + this.getUnlocalizedName2() + "_01"; iconBuffer[1] = iconRegister.registerIcon(tex); Yet the log messages are being logged twice, so what is happening? I am trying to understand what it does? Thanks,
  8. Is there a way without decompiling them? I have tried putting the zips in folders relative the the bin folder but that just crashes minecraft in eclipse.
  9. Hi. Is there a way to load other mods via forge when developing with eclipse? Mods where I only have a normal zip and no source? I am looking for a way to test comparability with other mods etc
  10. Yes, hence it being important how you get your world object, Minecraft.getMinecraft().theWorld; retruns a world obejct that does nothing on shcheduelBlockUpdate() so calling that does nothing, load World.java and WorldServer.java for more info.
  11. And it is, but it seems to be not said anywhere Please correct me if I am wrong, but the code runs on both the server and the client, but not at the same time, see here (http://www.minecraftforge.net/forum/index.php/topic,7929.msg40041.html#msg40041) for my original post and imagine a lot of head banging on a desk and me saying "why why why"
  12. The answer is perhaps so simple that no one thought to mention it. In my ItemTossEvent I was simply grabbing a world from the client, not from the server. The solution is to get a world from the player like this: EntityPlayer player = event.player; World world = player.worldObj; // Not from Minecraft.getMinecraft().theWorld;
  13. MC 1.5.1 MCP 744 and Forge 7.7.1-6xx Are these incompatible?
  14. I know, I imagine once one knows how to get them into a method the server reads it will be really simple and it will all make sense. But how, as laifsjo asked back in december, do we do that? World world = Minecraft.getMinecraft().theWorld; returns a world object, but the method scheduleBlockUpdate() of this world object does nothing, so calling world.setBlock() of this would to place for example a block of sand does not schedule an update, so the sand never starts to fall. So, how do we get the server world. how do we call methods from our mod on the server, either a real server on another machine, or the local one started by the minecraft client? How do we write code that is called by the server?
×
×
  • Create New...

Important Information

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