Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Goodmorning everyone

I did some work on a material called Silver...Added ores, items, recipes and armor but I stumbled into some issues:

1. Can't seem to fix the appendHoverText for my WoodenStake item. It should display "Only kills vampires..."

2. How can I put my custom silver armor onto a ArmorStand

3. I added silver horse armor. This works fine but when I put it on a horse, the texture seems missing

Can you guys help me out?

 

Thnx

 

https://github.com/DefDaemon/Daemons_Horror_Moon

Edited by Def Daemon

1. Create a subclass of the item, override the method and append to the text component list.

2. Click on it. Armor stands are made to take any ArmorItem.

3. Create a model texture for the horse and put it in the ResourceLocation specified by your second variable (note you can't just put 'silver' for that value, supply it a resource location with your mod id).

  • Author

1. I did create a subclass called WoodenStake and did override the appendHooverText method but still doesn't work.

2. Clicking on the Armor Stand doesn't work, but I just found out that when clicking on the Armor Stand, the following bug appears:

    [17:26:44] [Server thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Server java.lang.NullPointerException: null
    at net.minecraft.util.ResourceLocation.decompose(ResourceLocation.java:60) ~[forge:?] {re:classloading}
    at net.minecraft.util.ResourceLocation.<init>(ResourceLocation.java:38) ~[forge:?] {re:classloading}
    at com.defdaemon.horrormoon.lists.AmorMaterialList.getEquipSound(AmorMaterialList.java:61) ~[?:?] {re:classloading}
    at net.minecraft.entity.LivingEntity.playEquipSound(LivingEntity.java:573) ~[forge:?] {re:classloading}
    at net.minecraft.entity.item.ArmorStandEntity.setItemSlot(ArmorStandEntity.java:140) ~[forge:?] {re:classloading}
    at net.minecraft.entity.item.ArmorStandEntity.swapItem(ArmorStandEntity.java:391) ~[forge:?] {re:classloading}
    at net.minecraft.entity.item.ArmorStandEntity.interactAt(ArmorStandEntity.java:333) ~[forge:?] {re:classloading}
    at net.minecraft.network.play.ServerPlayNetHandler.handleInteract(ServerPlayNetHandler.java:1197) ~[forge:?] {re:classloading}
    at net.minecraft.network.play.client.CUseEntityPacket.handle(CUseEntityPacket.java:80) ~[forge:?] {re:classloading}
    at net.minecraft.network.play.client.CUseEntityPacket.handle(CUseEntityPacket.java:15) ~[forge:?] {re:classloading}
    at net.minecraft.network.PacketThreadUtil.lambda$ensureRunningOnSameThread$0(PacketThreadUtil.java:19) ~[forge:?] {re:classloading}
    at net.minecraft.util.concurrent.TickDelayedTask.run(TickDelayedTask.java:17) ~[forge:?] {re:classloading}
    at net.minecraft.util.concurrent.ThreadTaskExecutor.doRunTask(ThreadTaskExecutor.java:136) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.util.concurrent.RecursiveEventLoop.doRunTask(RecursiveEventLoop.java:22) ~[forge:?] {re:classloading}
    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:734) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:159) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.util.concurrent.ThreadTaskExecutor.pollTask(ThreadTaskExecutor.java:109) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:717) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:711) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.util.concurrent.ThreadTaskExecutor.managedBlock(ThreadTaskExecutor.java:119) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:697) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:646) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:232) ~[forge:?] {re:classloading,pl:accesstransformer:B}
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_281] {}

3. Fixed this problem. changed "silver" into  new ResourceLocation().

 

1. I didn't even look at your class, I looked at the item being registered to which there is no reference to your subclass.

2. The sound is null because it doesn't exist. SoundEvents are objects that need to be registered and then pointed to in the sounds.json. You cannot create them on the fly.

  • Def Daemon changed the title to [SOLVED] Start modding part #2
  • Author

1. Fixed the registration for WoodenStake class...works fine now

2. Forgot to create a private variable for the soundstring. Also working fine now.

 

thnx a lot m8

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.