Jump to content
  • Home
  • Files
  • Docs
All Content
  • All Content

  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Forge Mods
  • Mods
  • Glitchfiend
  • Biomes O' Plenty
  • Announcements

    • LexManos

      Forge 1.12 and Announcement   06/17/17

      Please read this: http://www.minecraftforge.net/forum/topic/58706-regarding-minecraft-112-and-policy-changes/  

Biomes O' Plenty

Sign in to follow this  
Followers 1

Subforums

Announcements
2
Biomes O' Plenty on Reddit
By Forstride
December 10, 2013
Releases
45
[1.6.x] Biomes O' Plenty (…
By Ender4060
February 16, 2014
Discussion
43
Large combination of mods …
By RadicalTaoist
March 31, 2017
Servers
2
Same Seed, different world
By Adubbz
October 27, 2013
Suggestions
36
Some biome ideas, plus twe…
By Sunconure11
May 6, 2014

0 topics in this forum

There are no topics in this forum yet

Sign in to follow this  
Followers 1
  • Posts

    • iKreal
      Condition "block water"

      By iKreal · Posted 9 minutes ago

      Hi, Thank you so much for your help. Although, no any message is displayed when I right click with the item. So the problem is at start... and it's frightening... The class of the item contains exactly this: package net.dev.premiermod.items; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.SoundEvents; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class pan extends Item {     public pan() {         this.maxStackSize = 1;         this.setMaxDamage(40);         this.setCreativeTab(CreativeTabs.TOOLS);         this.setRegistryName("pan");         this.setUnlocalizedName("pan");              }    public EnumActionResult onItemRightClick(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)      {              System.out.println("onItemRightClick with item = "+stack.getItem()+" at position = "+pos);              IBlockState iblockstate = worldIn.getBlockState(pos);              Block block = iblockstate.getBlock();             if (worldIn.getBlockState(pos.up()).getMaterial() == Material.AIR && block == Blocks.WATER || block == Blocks.FLOWING_WATER)              {                  System.out.println("Condition met -- block pos is surface water");                  worldIn.playSound(playerIn, pos, SoundEvents.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);                         if(!worldIn.isRemote) {                      worldIn.spawnEntityInWorld(new EntityItem(worldIn, playerIn.posX, playerIn.posY, playerIn.posZ, new ItemStack(net.dev.premiermod.init.ModItems.speck_gold, 1)));                      stack.damageItem(1, playerIn);                  }                 return EnumActionResult.SUCCESS;              }              else              {                  System.out.println("Condition not met -- block pos isn't surface water");                  return EnumActionResult.PASS;              }          }             }     So what should I do? It's in principle an easy "system" but it doesn't work.   Thanks for the future helps
    • xTekBlue
      Model Bug with Ores

      By xTekBlue · Posted 38 minutes ago

      Bug Demonstration   Code of Ore package xtekblue.mod.objects.blocks; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; import xtekblue.mod.Main; import xtekblue.mod.init.BlockInit; import xtekblue.mod.init.ItemInit; import xtekblue.mod.objects.blocks.item.ItemBlockVariants; import xtekblue.mod.util.IHasModel; import xtekblue.mod.util.handlers.EnumHandler; import xtekblue.mod.util.handlers.EnumHandler.EnumType; import xtekblue.mod.util.interfaces.IMetaName; public class OreBase extends Block implements IHasModel, IMetaName { public static final PropertyEnum<EnumHandler.EnumType> VARIANT = PropertyEnum.<EnumHandler.EnumType>create("variant", EnumHandler.EnumType.class); private String name, dimension; public OreBase(String name, String dimension) { super(Material.ROCK); setUnlocalizedName(name); setRegistryName(name); setCreativeTab(Main.xtrablocks); setHardness(3); setHarvestLevel("pickaxe", 2); setResistance(15); setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, EnumType.RUBY)); this.name = name; this.dimension = dimension; BlockInit.BLOCKS.add(this); ItemInit.ITEMS.add(new ItemBlockVariants(this).setRegistryName(this.getRegistryName())); } @Override public void dropXpOnBlockBreak(World worldIn, BlockPos pos, int amount) { super.dropXpOnBlockBreak(worldIn, pos, 10); } @Override protected ItemStack getSilkTouchDrop(IBlockState state) { return super.getSilkTouchDrop(state); } @Override public Item getItemDropped(IBlockState state, Random rand, int fortune) { if(getMetaFromState(state) == 0) { return ItemInit.RUBY_GEM; }else if(getMetaFromState(state) == 1){ return ItemInit.SAPPHIRE_GEM; }else { return ItemInit.RUBY_GEM; } } @Override public int quantityDropped(Random random) { return random.nextInt(1) + 1; } @Override public int damageDropped(IBlockState state) { return ((EnumHandler.EnumType)state.getValue(VARIANT)).getMeta(); } @Override public int getMetaFromState(IBlockState state) { return ((EnumHandler.EnumType)state.getValue(VARIANT)).getMeta(); } @Override public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(VARIANT, EnumHandler.EnumType.byMetadata(meta)); } /*@Override public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) { return new ItemStack(Item.getItemFromBlock(this), 1, getMetaFromState(world.getBlockState(pos))); }*/ @Override public void getSubBlocks(CreativeTabs itemIn, NonNullList<ItemStack> items) { for(EnumHandler.EnumType variant : EnumHandler.EnumType.values()) { items.add(new ItemStack(this, 1, variant.getMeta())); } } @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] {VARIANT}); } @Override public String getSpecialName(ItemStack stack) { return EnumHandler.EnumType.values()[stack.getItemDamage()].getName(); } @Override public void registerModels() { for(int i = 0; i < EnumHandler.EnumType.values().length; i++) { Main.proxy.registerVariantRenderer(Item.getItemFromBlock(this), i, "ore_" + this.dimension + "_" + EnumHandler.EnumType.values()[i].getName(), "inventory"); } } }   Code of Gems package xtekblue.mod.objects.items; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.Item.ToolMaterial; import xtekblue.mod.Main; import xtekblue.mod.init.ItemInit; import xtekblue.mod.tabs.XtraItemsTab; import xtekblue.mod.util.IHasModel; public class ItemBase extends Item implements IHasModel { public ItemBase(String name) { setUnlocalizedName(name); setRegistryName(name); setCreativeTab(Main.xtraitems); ItemInit.ITEMS.add(this); } @Override public void registerModels() { Main.proxy.registerItemRenderer(this, 0, "inventory"); } } Sapphire Model JSON { "parent": "item/generated", "textures": { "layer0": "xi:items/sapphire_gem" } }   Additional things to say I also do not believe the EXP is dropping either, unless the amount is too low.   
    • jabelar
      Condition "block water"

      By jabelar · Posted 53 minutes ago

      Okay, that wasn't quite what I meant by debug mode. Assuming you're using Eclipse you would set a breakpoint (google how to do that) on the first line of code in your onItemRightClick() method. Then use a debug run configuration to run the game. Eclipse should then reorganize into a debug view and what will happen is that you can start to play but as soon as you do a right click interaction with your item the execution of the game should halt and a bunch of information should show up in Eclipse that allows you to see what the values of all the fields are. Then there are buttons in Eclipse that allow you to progress one "step" at time (meaning one line of code) and again you can check what is happening.   If that is too advanced for you, the other way is to add your own console print statements to give you information about what is going on. For example, using your previous code as an example, I would do something like this:    public EnumActionResult onItemRightClick(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)         {   System.out.println("onItemRightClick with item = "+stack.getItem()+" at position = "+pos);                 IBlockState iblockstate = worldIn.getBlockState(pos);                 Block block = iblockstate.getBlock();         if (worldIn.getBlockState(pos.up()).getMaterial() == Material.AIR && block == Blocks.WATER || block == Blocks.FLOWING_WATER)                 { System.out.println("Condition met -- block pos is surface water");                     worldIn.playSound(playerIn, pos, SoundEvents.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);                     if(!worldIn.isRemote) {                         worldIn.spawnEntityInWorld(new EntityItem(worldIn, playerIn.posX, playerIn.posY, playerIn.posZ, new ItemStack(net.dev.premiermod.init.ModItems.speck_gold, 1)));                         stack.damageItem(1, playerIn);                     }             return EnumActionResult.SUCCESS;                 }                 else                 {   System.out.println("Condition not met -- block pos isn't surface water");                     return EnumActionResult.PASS;                 }             }   With the added lines above, run the game normally but look at the console when you right click. It will tell you firstly whether your code is running at all and secondly it will tell you which code path it is taking. Depending on what you see, then you can dig in further to figure out what is going wrong.
    • Dragonisser
      [1.11.2] Custom Portal rotationyaw not working correctly

      By Dragonisser · Posted 1 hour ago

        Shouldnt the portal be placed in the dimension like it is in the overworld - hole facing north/south and then same when its made?
    • PhilipMyCub
      [HELP] MCP 9.18 Twitch Error During Decompile

      By PhilipMyCub · Posted 4 hours ago

      I have been solving this error for days and it does not work, someone could tell me how to fix it     == MCP 9.18 (data: 9.18, client: 1.8.8, server: 1.8.8) ==
      "scalac" is not found on the PATH.  Scala files will not be recompiled
      # found ff, ff patches, srgs, name csvs, doc csvs, param csvs, astyle, astyle config, rg, ss
      == Decompiling client using fernflower ==
      > Creating SRGs
      > Applying SpecialSource
      > Applying MCInjector
      > Creating renamed srg
      > Filtering classes
      > Decompiling
      '"C:\Program Files\Java\jdk1.8.0_121\bin\java" -jar runtime\bin\fernflower.jar -din=1 -rbr=1 -dgs=1 -asc=1 -rsy=1 -iec=1 -jvn=1 -log=WARN "-e=jars\libraries\net/java/jinput\jinput\2.0.5\jinput-2.0.5.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl-platform\2.9.4-nightly-20150209\lwjgl-platform-2.9.4-nightly-20150209-natives-windows.jar" "-e=jars\libraries\com/ibm/icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar" "-e=jars\libraries\tv/twitch\twitch-external-
      pclient-4.3.3.jar" "-e=jars\libraries\org/apache/commons\commons-compress\1.8.1\commons-compress-1.8.1.jar" "-e=jars\libraries\net/java/dev/jna\platform\3.4.0\platform-3.4.0.jar" "-e=jars\libraries\com/paulscode\codecjorbis\20101023\codecjorbis-20101023.jar" "-e=jars\libraries\com/paulscode\soundsystem\20120107\soundsystem-20120107.jar" "-e=jars\libraries\com/paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar" "-e=jars\libraries\org/lwjgl/l
      twitch\twitch\6.5\twitch-6.5.jar" "-e=jars\libraries\com/paulscode\codecwav\20101023\codecwav-20101023.jar" "-e=jars\libraries\tv/twitch\twitch-platform\6.5\twitch-platform-6.5-natives-windows-32.jar" "-e=jars\libraries\net/java/jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar" "-e=jars\libraries\org/apache/logging/log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar" "-e=jars\libraries\io/netty\netty-all\4.0.23.Final\netty-all-4.0.23.Fin
      Decompile failed
      Presione una tecla para continuar . . .
       
  • Topics

    • iKreal
      14
      Condition "block water"

      By iKreal
      Started 22 hours ago

    • xTekBlue
      0
      Model Bug with Ores

      By xTekBlue
      Started 38 minutes ago

    • Dragonisser
      1
      [1.11.2] Custom Portal rotationyaw not working correctly

      By Dragonisser
      Started Yesterday at 06:37 AM

    • PhilipMyCub
      0
      [HELP] MCP 9.18 Twitch Error During Decompile

      By PhilipMyCub
      Started 4 hours ago

    • ssherris
      4
      Get list of blocks in a chunk (1.12)

      By ssherris
      Started 11 hours ago

  • Who's Online (See full list)

    • iKreal
    • Dragonisser
    • moonlyer
    • xTekBlue
    • mateuszkozak
    • Curly_dev
  • All Activity
  • Home
  • Forge Mods
  • Mods
  • Glitchfiend
  • Biomes O' Plenty
  • Theme
  • Contact Us

Copyright © 2017 ForgeDevelopment LLC Powered by Invision Community