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

ocome

Members
  • Posts

    15
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ocome's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Have there been any major changes in the way mobs are generated from 1.16 to 1.17? If there are any changes, please let me know.
  2. For a long time I have been looking for an article that can be used with 1.17, but I can't find it and can't implement it. I also understand that this is my little knowledge about Java Please let me know if you know of any articles that can give me some tips. If learning Java is the answer. Please let me know if you know of any articles that can give me some tips. Ignore please
  3. I was able to implement it. I was able to do it. Thank you very much. && isCorrectToolForDrops (stack,aState)
  4. Identification of inappropriate tools public boolean mineBlock(ItemStack stack, Level level, BlockState state, BlockPos pos, LivingEntity entityLiving) { baseBlock(stack, level, state, pos, entityLiving); return true; } public void baseBlock(ItemStack stack, Level level, BlockState state, BlockPos pos, LivingEntity entityLiving) { int a [] = {-1, 0, 1}; for (int ax = 0; ax < 3; ax++) { for (int ay = 0; ay < 3; ay++) { for (int az = 0; az < 3; az++) { BlockPos aPos = new BlockPos(pos.getX() + a[ax], pos.getY() + a[ay],pos.getZ() + a[az]); BlockState aState = level.getBlockState(aPos); if (aState.getBlock() == state.getBlock() && modeInt(stack) == 1 && aState.requiresCorrectToolForDrops() ){ level.destroyBlock(aPos, true); baseBlock(stack, level, state, aPos, entityLiving); stack.hurtAndBreak(1, entityLiving, (entity) -> { entity.broadcastBreakEvent(EquipmentSlot.MAINHAND); }); } } } } } But it crashes when you break a block without the proper tools. && aState.requiresCorrectToolForDrops() I know this is wrong, but I don't know what statement I can use for the condition when it's not the right tool In 1.16, I think you could use ToolType, but is there an equivalent? Is the block being dug with the corresponding tool? I want to add a condition to check
  5. Based on this Minecraft rarity, I'm going to create my own rarity. Rarity.java package net.minecraft.world.item; import net.minecraft.ChatFormatting; public enum Rarity implements net.minecraftforge.common.IExtensibleEnum { COMMON(ChatFormatting.WHITE), UNCOMMON(ChatFormatting.YELLOW), RARE(ChatFormatting.AQUA), EPIC(ChatFormatting.LIGHT_PURPLE); public final ChatFormatting color; private Rarity(ChatFormatting p_43028_) { this.color = p_43028_; } public static Rarity create(String name, ChatFormatting p_43028_) { throw new IllegalStateException("Enum not extended"); } } However, after creating it, when I tried to give it to the item, it came up with a problem NijiRarity.java package com.ocome.nijisanjiworld.item.tool; import net.minecraft.ChatFormatting; import net.minecraftforge.common.IExtensibleEnum; public enum NijiRarity implements IExtensibleEnum { COMMON(ChatFormatting.AQUA), UNCOMMON(ChatFormatting.YELLOW), RARE(ChatFormatting.AQUA), EPIC(ChatFormatting.LIGHT_PURPLE); public final ChatFormatting color; private NijiRarity(ChatFormatting p_43028_) { this.color = p_43028_; } public static NijiRarity create(String name, ChatFormatting p_43028_) { throw new IllegalStateException("Enum not extended"); } } The problem is. Error: Incompatible type: Cannot convert NijiRarity to Rarity: This is it. Why is it not applicable? public class Item_Custom_Pickaxe extends PickaxeItem { public Item_Custom_Pickaxe() { super(NijiTiers.OCOME, 1, -2.4F, new Properties().tab(OcomeNiji.OCOMEMOD_TAB).rarity(NijiRarity.EPIC));   =======Error====== } } I added it this way with a pickaxe. please help me
  6. My apologies. As it turns out, I've solved the problem by making player.getHandSlots(hand); to player.getItemInHand(hand)
  7. I'm trying to detect a right click on a sword. Did ActionResult change to InteractionResult from 1.16 to 1.17? I wrote below, but I get an error with hand in getHandSlot (hand) public boolean hurtEnemy(ItemStack stack, LivingEntity target, LivingEntity attacker) { attacker.addEffect(new MobEffectInstance(MobEffects.REGENERATION, 1, 6)); target.setDeltaMovement(target.getDeltaMovement().add(0.0D, (double)0.2F, 1.0D)); stack.hurtAndBreak(1, attacker, (entity) -> { entity.broadcastBreakEvent(EquipmentSlot.MAINHAND); }); return true; } public InteractionResult use (BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { ItemStack itemStack = player.getHandSlots(hand); ←this return InteractionResult.CONSUME; } I'm struggling to figure out how to solve this problem. Knowledgeable people, please.
  8. solved. The folder hierarchy was broken and my json specifications are strange thank you support.
  9. Oh Sorry ;( The translation was malfunctioning Will it be solved by reinstalling Minecraft? Or is it about the mod's data folder?
  10. Of course I'm checking But it doesn't work The json path may not be passed or the ID may be incorrect Is there a way to confirm that? I have been suffering from this for 3 hours Thank you for forum support 
  11. We have created a pickaxe.json below MInecraft-MOD-1.17/src/main/resources/data/minecraft.tags.blocks/mineable/pickaxe.json github link https://github.com/ocome85/MInecraft-MOD-1.17 I can't add Tag and you can't dig. Please help me.
×
×
  • Create New...

Important Information

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