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

1.10.2 Server crash


kwpugh
 Share

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • This doesn't make any sense. There is no stack here.
    • Hello, Sorry for writing back again but despite several attempts I did not manage to change/create the tags. They always have the value 0.0 here's my code: package net.the_goldbeards.lootdebugs.Items.Weapons.Drills; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.sounds.SoundSource; import net.minecraft.tags.BlockTags; import net.minecraft.tags.Tag; import net.minecraft.util.Mth; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.*; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.TorchBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.Tags; import net.the_goldbeards.lootdebugs.util.ModSounds; import net.the_goldbeards.lootdebugs.util.ModTags; import org.jetbrains.annotations.Nullable; import java.util.List; public class DrillsItem extends Item { @Override public int getItemStackLimit(ItemStack stack) { return 1; } public DrillsItem(Properties pProperties, float FUELAMMOUNT) { super(pProperties); ItemStack pStack = new ItemStack(this); pStack.getOrCreateTag().putFloat("lootdebugs.drillfuel", FUELAMMOUNT); } @Override public InteractionResult useOn(UseOnContext pContext) { ItemStack pStack = new ItemStack(pContext.getPlayer().getItemInHand(pContext.getHand()).getItem()); pStack.getOrCreateTag().putFloat("lootdebugs.drillfuel", 12f);//Debug return InteractionResult.PASS; } @Override public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List<Component> pTooltipComponents, TooltipFlag pIsAdvanced) { Float val = pStack.getOrCreateTag().getFloat("lootdebugs.drillfuel"); pTooltipComponents.add(new TextComponent(val.toString())); } }   Thanks
    • Just a gradle plugin that can use yarn mapping for forge developing
    • Well, it's ok. Caused by the modid shouldn't include "-". Replaced with "_"
    • You registered something to the event bus, but it has no event handler methods. So nothing happens. Use OverlayRegistry to add something to the HUD.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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