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.

thedarkcolour

Members
  • Joined

  • Last visited

Everything posted by thedarkcolour

  1. Has anyone found a solution?
  2. I got it to work by not calling getWorld() and using IWorldGenerationReader#setBlockState, thanks!
  3. I just realized what I've done. I forgot to make the BeeNestGenerator method static. I'll check if that fixes it.
  4. I think I posted this topic in the wrong spot. Should I go post in Modder Support?
  5. It seems to be an issue with multi-threading. I'm not sure if I can patch somewhere else to avoid this, but it seems to be out of my control.
  6. Yes. I've written a working coremod in 1.12 that did a similar patch.
  7. I copy pasted it. Do you mean that the method name is cut off? It's also cut off in the log file.
  8. I'm using a coremod as part of my 1.14 mod. It inserts a static method call into TreeFeature#place. When I try to load into a world, an IncompatibleClassChangeError is thrown from a Server Worker thread, saying "expected static method thedarkcolour.futuremc.world.gen.BeeNestGenerator.generateBeeNestForSmallTrees..." The game freezes instead of crashing. How do I fix this? Log Coremod
  9. I have figured it out, the original item's burntime value I use does not work properly ?
  10. For some reason 0 / 1600 prints 78.125, rather than zero. It looks like there might be some weird math in my Gui method.
  11. Added the Pastebin versions of the classes, in case you cannot access Hastebin.
  12. I have a Custom Furnace block that works like the Smoker block from 1.14. I have gotten everything to work except the flame icon in between the two input slots. Instead of properly decreasing over time, it briefly disappears after a craft cycle and stays full the whole time. The white progress arrow works as intended. Here is an image of what the fire icon looks like while crafting. It stays like that until the coal runs out. Here are my classes: Tile Entity - https://hastebin.com/qocaxelofu.java Pastebin - https://pastebin.com/L4G2DMpb Container - https://hastebin.com/zodotevamu.java Pastebin - https://pastebin.com/MKGQSEdw GUI - https://hastebin.com/sanumopipo.java Pastebin - https://pastebin.com/TDum28ny
  13. Can't you just check if it is morning/daytime when the event is fired, and do your stuff if it isn't daytime?
  14. NEVERMIND: I got the stack.hasTagCompound to work, thanks
  15. Here is an example where a food item replaces itself with a bowl after it is consumed. public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving) { super.onItemUseFinish(stack, worldIn, entityLiving); return new ItemStack(Items.BOWL); } You should try to return a new Itemstack.
  16. I am trying to create an item that has a different effect based on its NBT tag. However, instead of picking a single effect, the item does every effect at once. Here is my return code: protected void onFoodEaten(ItemStack stack, World worldIn, EntityPlayer player) { //Only supposed to add one effect. if (!worldIn.isRemote) { String tag = (stack.getTagCompound().getString("effect")); switch(tag) { case "REGEN": player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 140, 1)); case "JUMP": player.addPotionEffect(new PotionEffect(MobEffects.JUMP_BOOST, 100, 1)); case "POISON": player.addPotionEffect(new PotionEffect(MobEffects.POISON, 220, 1)); case "WITHER": player.addPotionEffect(new PotionEffect(MobEffects.WITHER, 140, 1)); case "WEAKNESS":player.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, 160, 1)); case "BLINDNESS":player.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, 140, 1)); case "FIRE_RESISTANCE":player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 60, 1)); case "SATURATION":player.addPotionEffect(new PotionEffect(MobEffects.SATURATION, 100, 1)); case "SPEED":player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 100, 1)); } } } ...and here is the code for my tag. The tag works properly, so I doubt it is an error here: public void onUpdate(ItemStack stack, World world, Entity entity, int metadata, boolean bool) { NBTTagCompound nbt = stack.getTagCompound(); if(nbt == null) {stack.setTagCompound(new NBTTagCompound());} if(nbt.hasNoTags()) { nbt.setString("effect", "NULL"); } }

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.