Jump to content

The_Brook

Members
  • Posts

    13
  • Joined

  • Last visited

The_Brook's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. If you post your mod on GitHub, I can help you more. But like this it's difficult.
  2. It should be OK. I don't know what can be causing this.
  3. In your mod assets, do you have all the textures listed ? It's they are all vanilla textures but you have the mod prefix with.
  4. Have you validated the JSON file ? If there is any error within the synthax, it will show it. https://jsonlint.com/
  5. Have you tried with just a simple model ?
  6. Actually I made the problematic class not used so it wasn't crashing when I was coding other things. Now, you should have the same problem on GitHub.
  7. Here it is https://github.com/The-Brook/Astrea/tree/master/Astrea
  8. This one ModItems.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName()));
  9. Yeah, sorry I forgot... public class BlockBase extends Block implements IHasModel { public BlockBase(String name, Material material) { super(material); setUnlocalizedName(name); setRegistryName(name); setCreativeTab(AstreaTab.INSTANCE); ModBlocks.BLOCKS.add(this); ModItems.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName())); } @Override public void registerModels() { Main.proxy.registerItemRenderer(Item.getItemFromBlock(this), 0, "inventory"); } }
  10. Hi ! I'm making a mod for the first time and I have some problems when initializing a block. In the crash report, it's said it has been caused an item. I don't understand why. The crash report is attached to the post. Thank you for your help ! The block class : public class BlockCryingObsidian extends BlockBase { public BlockCryingObsidian(String name, Material material) { super(name, material); setSoundType(SoundType.STONE); setLightLevel(5); setHardness(25.0F); } public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) { boolean activate = true; if(playerIn.experienceLevel >= 10 || playerIn.isCreative()) { playerIn.addExperienceLevel(-10); playerIn.setSpawnPoint(playerIn.getPosition(), true); worldIn.playSound(null, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, SoundEvents.BLOCK_NOTE_CHIME, SoundCategory.BLOCKS, 0.5F, 1F); double rx = pos.getX() + worldIn.rand.nextFloat(); double ry = pos.getY() + worldIn.rand.nextFloat(); double rz = pos.getZ() + worldIn.rand.nextFloat(); for(int i = 0; i <= 50; i++) { worldIn.spawnParticle(EnumParticleTypes.TOTEM, rx, ry, rz, worldIn.rand.nextFloat(), worldIn.rand.nextFloat(), worldIn.rand.nextFloat()); worldIn.spawnParticle(EnumParticleTypes.TOTEM, rx, ry, rz, -worldIn.rand.nextFloat(), worldIn.rand.nextFloat(), -worldIn.rand.nextFloat()); } } else { worldIn.playSound(null, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, SoundEvents.BLOCK_WOOD_BUTTON_CLICK_ON, SoundCategory.BLOCKS, 0.5F, 1F); activate = false; } return activate; } } The item class public class ItemXPInfusedAxe extends ItemAxe { public static int MIN_XP_ORBS = 1; public static int MAX_XP_ORBS = 3; public ItemXPInfusedAxe() { this(AstreaAPI.infusedIngotToolMaterial, AstreaNames.XP_INFUSED_AXE); } public ItemXPInfusedAxe(ToolMaterial toolMaterial, String name) { super(toolMaterial); setCreativeTab(AstreaTab.INSTANCE); setRegistryName(new ResourceLocation(Reference.MOD_ID, name)); } @Override public boolean onBlockDestroyed(@Nonnull ItemStack stack, @Nonnull World world, @Nonnull IBlockState state, @Nonnull BlockPos pos, @Nonnull EntityLivingBase entity) { if(state.getBlockHardness(world, pos) != 0F) { ToolCommons.damageItem(stack, 1, entity); } if (world.isRemote) { for (int i = 0 ; i < 10 ; i++) { world.spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f, world.rand.nextGaussian() / 3.0f, world.rand.nextGaussian() / 3.0f, world.rand.nextGaussian() / 3.0f); } } return true; } } crash-2018-04-13_21.25.10-client.txt
  11. How can it be implement to right click on a cauldron to fill it with a specific liquid ?
×
×
  • Create New...

Important Information

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