Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About AzizD

  • Rank
    Tree Puncher

Recent Profile Visitors

230 profile views
  1. Wow that actually worked. Thank you very much!
  2. I made an event that ignites tnt if held item has fire aspect. I can ignite the tnt but i how can i detect the fire aspect enchantment? I tried using EnchantmentHelper but didn't find anything useful. Here is my code. @SubscribeEvent public static void fireAspectTnt(final PlayerInteractEvent event){ PlayerEntity player = event.getPlayer(); World world = event.getWorld(); BlockPos blockPos = event.getPos(); BlockState block = world.getBlockState(blockPos); Hand hand = event.getHand(); Item item = player.getHeldItem(hand).getItem();
  3. You can change config options without running the game. Config folder is in the same directory as mods folder.
  4. Maybe copper ore disabled in the config. Try to enable it.
  5. It looks way better. Thanks for the advice. @Override public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) { Set e = ImmutableSet.of( Enchantments.SHARPNESS, Enchantments.LOOTING, Enchantments.FIRE_ASPECT, Enchantments.UNBREAKING, Enchantments.KNOCKBACK ); return e.contains(enchantment); }
  6. @Override public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) { Enchantment[] enchantments = { Enchantments.SHARPNESS, Enchantments.LOOTING, Enchantments.FIRE_ASPECT, Enchantments.UNBREAKING, Enchantments.KNOCKBACK, Enchantments.MENDING, }; for(int i=0;i<enchantments.length;i++){ if(enchantments[i] == enchantment){ return true; } } return false; } I wrote this and it wo
  7. @Override public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) { if(enchantment == Enchantments.SHARPNESS) { enchantment.canApply(stack); } return true; } I changed with this but same error.
  8. @Override public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) { enchantment = Enchantments.SHARPNESS; return enchantment.canApply(stack.getItem().getDefaultInstance()); } I tried to override this method. Whenever i put the item in the enchantment table game crashes with java.lang.StackOverflowError.
  9. I created a custom item that extends TieredItem. I want it to be enchantable through the enchantment table with Sharpnes, Looting etc. I can enchant but only the unbreaking enchantment shows up.
  10. Finally i fixed the all problems. I added this condition and thats all. world.chunkExists(specialItemEntity.chunkCoordX,specialItemEntity.chunkCoordZ) Final code is : EventHandler class package com.azizd.thunderbird.events; import com.azizd.thunderbird.Thunderbird; import com.azizd.thunderbird.entities.SpecialItemEntity; import com.azizd.thunderbird.init.itemInit; import net.minecraft.entity.Entity; import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.event.entity.EntityJoinW
  11. But i still have a bug. If specialItemEntity is in the world. I can't join that world.
  12. Finally i fixed all the problems. Now it works exactly what i want. This is my EventHandler Method @SubscribeEvent public static void crimsonIngotCraft(EntityJoinWorldEvent event){ Entity entity = event.getEntity(); World world = entity.world; double posX = entity.getPosX(); double posY = entity.getPosY(); double posZ = entity.getPosZ(); if(entity instanceof ItemEntity && !(entity instanceof SpecialItemEntity)){ ItemEntity itemEntity = (ItemEntity) event.getEntity(); if(itemEntity.getItem().get
  13. I solved the pickup bug. The only problem is SpecialItemEntity motion.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.