• 1

    posted a message on Trying to get Custom Biome to generate custom Liquid Lake
    Change
    WorldGenerator genLakesOfLight = new WorldGenLiquids(LordRhysModMain.lightLiquid.blockID);

    to
    WorldGenerator genLakesOfLight = new WorldGenLakes(LordRhysModMain.lightLiquid.blockID);


    WorldGenLiquids is actually what causes the single streams of lava or water in ravines and caves.
    WorldGenLakes creates pools of liquid.
    Posted in: Modification Development
  • 0

    posted a message on Chunk Generation Help
    You need to add 1, not subtract 1.

    Change
    int l2 = (l * 16 + k) * 128 + k1-1;

    to
    int l2 = (l * 16 + k) * 128 + k1+1;
    Posted in: Modification Development
  • 0

    posted a message on Chunk Generation Help
    Replace
    l2 == biome.waterBlock

    with
    par3ArrayOfByte[l2] == biome.waterBlock
    Posted in: Modification Development
  • 0

    posted a message on casting an Int to a byte[] ?
    To make a new array (MSB order)
    byte[] bytes = ByteBuffer.allocate(4).putInt(intValue).array();

    Write to an existing array (MSB order)
    byte[] bytes = new byt[4];
    
    ByteBuffer.wrap(bytes).putInt(intValue);

    Write int to new array in LSB order
    byte[] bytes = ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(intValue).array();
    Posted in: Modification Development
  • 0

    posted a message on Request: Writing a Book Doesn't Pause Game in Single-Player
    Assuming you're using Forge, you can use a class transformer to insert the method 'doesGuiPauseGame' into the class GuiScreenBook to override the return value with false.

    I've made this mod for 1.6.4 which may work.
    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on Forge throwing a random error?

    java.lang.ClassNotFoundException: injected.main.client.


    Look at your @SidedProxy annotation in your main class file, you probably forgot to append the name of the class to the packet name.
    @SidedProxy(clientSide="injected.main.client.(name of your client proxy class)")
    Posted in: Modification Development
  • 1

    posted a message on Need help with minecraft mods and forge please.
    @ The first error log

    2013-12-16 15:52:38 [FINE] [ForgeModLoader] Found a candidate zip or jar file Myths&MonsterModmcv1.4.6d24.12.12.zip

    1.4.6 != 1.5.2
    You need to make sure your mods are for the correct version of Minecraft.

    @ The second error log

    The configLoadBiomes method in the main mod class specifies default biome IDs that are outside of the allowed range (must be <= 255, should be > 22 to avoid conflicting with vanilla 1.5.2 biome ids).

    To fix this, go to the minecraft directory (the one that contains the 'mods' folder), and open the 'config' folder.
    Find the file 'Myths&Monsters.cfg' and open it in a plain text editor.
    Find these lines
      I:"DeepOcean Biome ID"=1165
      I:"IceSheet Biome ID"=1166

    And replace each number with a unique number below 256
        I:"DeepOcean Biome ID"=126
        I:"IceSheet Biome ID"=127
    Posted in: Java Edition Support
  • 1

    posted a message on Override block break sound? [FORGE]
    Calling setStepSound with a StepSound object instantiated with a volume parameter <= -1.0F should prevent the sound from being played.
    Posted in: Modification Development
  • 3

    posted a message on Override block break sound? [FORGE]
    For the 'break' sound of a block, RenderGlobal.playAuxSFX uses block.stepSound.getBreakSound()

    So if you have something like this for your Block instantiation:
    public static Block myBlock = new BlockClass(blockId);


    You would need to add .setStepSound with a new StepSound specifying the name of your sound.
    new BlockClass(blockId).setStepSound(new StepSound("myblocksound", 1.0f, 1.0f)); // Float arguments are volume and pitch respectively


    When an entity walks/lands on your block, or a player digs the block, it will play "step.myblocksound".

    When the player removes the block, it will play the sound "dig.myblocksound".

    For the 'place' sound, the ItemBlock/ItemReed/ItemSlab classes use stepSound.getPlaceSound(), which usually also returns "dig.(soundname)". You can use a custom Item class for your block to override this.

    If you want to use a sound that already exists and is not prefixed with "dig." or "step.", you will need to make a class that extends StepSound and overrides getBreakSound() and getStepSound() to return the proper sound.

    Example StepSound class:
    import net.minecraft.block.StepSound;
    
    public class UnprefixedStepSound extends StepSound {
      public final String breakSoundName, placeSoundName;
      public UnprefixedStepSound(String stepSound, String breakSound, String placeSound, float volume, float pitch) {
        super(stepSound, volume, pitch);
        this.breakSoundName = breakSound;
        this.placeSoundName = placeSound;
      }
    	  @Override
        public String getBreakSound() {
    	  return this.breakSoundName;
        }
        @Override
        public String getStepSound() {
    	  return this.stepSoundName;
        }
        @Override
        public String getPlaceSound() {
    	  return this.placeSoundName;
        }
    }


    Then for your Block instantiation:
      new BlockClass(blockId).setStepSound(new UnprefixedStepSound("mob.ghast.moan", "mob.wolf.bark", "mob.chicken.hurt", 1.0f, 1.0f)); // Should play ghast idle sound when walked upon, wolf bark when broken, and chicken hurt sound when placed.


    Note that you can also call .setStepSound on an already initialized block.
      Block.blockClay.setStepSound(new UnprefixedStepSound("mob.ghast.moan", "mob.wolf.bark", "mob.chicken.hurt", 1.0f, 1.0f));
    Posted in: Modification Development
  • 0

    posted a message on Null Pointer Exception When Creating Custom Biome
    You are executing GameRegistry.addBiome with a parameter equal to null when the statement is executed.

    Try checking all instances where you call GameRegistry.addBiome, if necessary, add some print statements before the lines to check if the parameter is null.
    Posted in: Modification Development
  • 1

    posted a message on [1.6.4][Forge][Solved] How to save an integer/string in a block? And how to make the block drop an item on right click?
    Replace
    if(Owner == player.username)

    With
    if(Owner.equals(player.username))
    Posted in: Modification Development
  • 0

    posted a message on Help with custom furnace [1.5.2]

    Caused by: java.lang.ClassFormatError: Duplicate method name&signature in class file gearz/common/TileEntityInfusor

    func_102008_b == canExtractItem
    func_102007_a == canInsertItem

    @Override
    public boolean canInsertItem(int i, ItemStack itemstack, int j) {
        return this.isStackValidForSlot(i, itemstack);
    }
    
    @Override
    public boolean canExtractItem(int i, ItemStack itemstack, int j) {
        return j != 0 || i != 1 || itemstack.itemID == Item.bucketEmpty.itemID;
    }

    Then delete methods func_102008_b and func_102007_a.
    Posted in: Modification Development
  • 0

    posted a message on [1.5.2][Forge] Item Spawning Cow instead of Mooshroom
    The class is called ItemMonsterPlacer for MCP.
    Posted in: Modification Development
  • 0

    posted a message on 1.6 Horse Armor File Location
    Look in the directory
    /assets/minecraft/textures/entity/horse/armor

    in the 1.6.jar archive.
    Posted in: Modification Development
  • 1

    posted a message on Enchantment Glow
    Add this method to your item.
        @Override
        public boolean hasEffect(ItemStack par1ItemStack)
        {
    	    return true;
        }
    Posted in: Modification Development
  • To post a comment, please .