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

HeidFanatic

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

About HeidFanatic

  • Rank
    Tree Puncher
  1. I wrote code to remove effect from player suck as blindness under certain situcation: @SubscribeEvent public static void shadowbornEnchantmentEvent(TickEvent.PlayerTickEvent event){ if(!event.player.world.isRemote()){ if(event.player.isPotionActive(Effects.BLINDNESS)){ if(event.player.world.getLight(new BlockPos(event.player.getPosition()))>=5){ if(PlayerUtil.isPlayerArmorEnchanted(event.player,EnchantmentRegistry.shadowborn_enchantment.get())){ event.player.removeActivePotionEffect(Effects.BLINDNESS
  2. Hello. I've registered an enchantment which can be applied to sword and axe: public class CustomEnchantment extends Enchantment{ public CustomEnchantment(Rarity p_i46731_1_) { super(p_i46731_1_,EnchantmentType.create("AXE_AND_SWORD", (item)->(item instanceof SwordItem || item instanceof AxeItem)), new EquipmentSlotType[]{EquipmentSlotType.MAINHAND}); } } But it doesn't show up in either Tool Tab or BattleGear Tab like other enchantment. The only way to find it in creative mode is to search it via searchbar. How can I fix it? Thank you so much!
  3. Problem Solved. I've checked other people's code: package x.x.flowingagony.registry; import love.marblegate.flowingagony.enchantment.ShadowbornEnchantment; import net.minecraft.enchantment.Enchantment; import net.minecraft.inventory.EquipmentSlotType; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; public class EnchantmentRegistry { private static final EquipmentSlotType[] ARMOR_SLOTS = new EquipmentSlotType[]{EquipmentSlotType.HEAD, EquipmentSlotType.CHEST, EquipmentSlotTy
  4. Ok, I made a new enchantment and tried to register it. But the IDE told me "Inferred type 'I' for type parameter 'I' is not within its bound; should extend 'net.minecraft.enchantment.Enchantment'". The question is: I've already "extends Enchantment" in my custom enchantment code. What is wrong with my code or registry? Really Grateful for helping! My Custom Enchantment Code: package x.x.enchantment; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentType; import net.minecraft.inventory.EquipmentSlotType; public class ShadowbornEnchantment
  5. I'm really sorry I didn't add forge.logging.mojang.level=DEBUG correctly. I have already used stacktrace find my bugs. Really thank you for your help and your patience!
  6. OK... Sometimes There is one more sentence after that: [18八月2020 20:01:50.440] [Netty Client IO #2/DEBUG] [net.minecraftforge.coremod.transformer.CoreModBaseTransformer/COREMOD]: Transforming func_192799_a with desc (Lnet/minecraft/network/play/server/SAdvancementInfoPacket;)V
  7. I checked it for several time including repeatedly reconnecting. I'm sure that the debug.log stop logging at the exact moment this sentence show up: [Netty Client IO #8/INFO] [net.minecraftforge.fml.network.NetworkHooks/]: Connected to a modded server. Here is what I got from server console when I set -Dforge.logging.console.level=all Gist
  8. Thank you so much! I added server & client debug.log to the post!
  9. THIS SITUATION IS CAUSED BY PACKET ERROR! ----------------------------------------------------------------- Original post: Hello Everyone, it's a newbee modder here. My mod works fine when runClient. And runServer also works fine until player is trying to join in server. Here is what happen when player trying to connect server: ON SERVER CONSOLE: [18八月2020 15:14:05.120] [Server thread/INFO] [net.minecraftforge.common.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.advancements.PlayerAdvancements@3f183a2a [18八月2020 15:14:05.1
×
×
  • Create New...

Important Information

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