Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • SaltBeard

SaltBeard

Members
 View Profile  See their activity
  • Content Count

    18
  • Joined

    December 19, 2020
  • Last visited

    February 17

Community Reputation

0 Neutral

About SaltBeard

  • Rank
    Tree Puncher
  1. SaltBeard

    Missing library?

    SaltBeard replied to Kadenogi's topic in ForgeGradle

    Have you installed Forge MDK and Java 8?
    • December 31, 2020
    • 4 replies
  2. SaltBeard

    LivingDeathEvent Listener code problem

    SaltBeard replied to SaltBeard's topic in Modder Support

    Oh I am an idiot, thank you very much for patience
    • December 29, 2020
    • 9 replies
  3. SaltBeard

    LivingDeathEvent Listener code problem

    SaltBeard replied to SaltBeard's topic in Modder Support

    -
    • December 29, 2020
    • 9 replies
  4. SaltBeard

    LivingDeathEvent Listener code problem

    SaltBeard replied to SaltBeard's topic in Modder Support

    package com.saltbeard.potc; import com.google.common.eventbus.Subscribe; import com.saltbeard.potc.util.RegistryBlocksHandler; import com.saltbeard.potc.util.RegistryItemsHandler; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @Mod("potc") public class PotC { private static final Logger LOGGER = LogManager.getLogger(); public static final String MOD_ID = "potc"; public PotC() { FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); MinecraftForge.EVENT_BUS.register(this); RegistryItemsHandler.init(); RegistryBlocksHandler.init(); } private void setup(final FMLCommonSetupEvent event){ } private void doClientStuff(final FMLClientSetupEvent event) { } public static final ItemGroup MISC_TAB = new ItemGroup("miscTab"){ @Override public ItemStack createIcon(){ return new ItemStack(RegistryItemsHandler.JADE.get()); } }; @Subscribe public static void onLivingDeathEvent (LivingDeathEvent deadEntity){ if ( deadEntity.getSource() == DamageSource.DROWN) { System.out.println("Entity died: drown"); } else{ System.out.println("Entity died: other reasons"); } } }
    • December 29, 2020
    • 9 replies
  5. SaltBeard

    LivingDeathEvent Listener code problem

    SaltBeard replied to SaltBeard's topic in Modder Support

    Ohh sorry , now I reread it, and I tried with same, but static method: @Subscribe public static void onLivingDeathEvent (LivingDeathEvent deadEntity){ if ( deadEntity.getSource() == DamageSource.DROWN) { System.out.println("Entity died: drown"); } else{ System.out.println("Entity died: other reasons"); } } And it still doesn't work - I am confused, why should it be static?
    • December 29, 2020
    • 9 replies
  6. SaltBeard

    LivingDeathEvent Listener code problem

    SaltBeard replied to SaltBeard's topic in Modder Support

    How can I avoid it? And second question it should still work? Thanks for reply tho
    • December 29, 2020
    • 9 replies
  7. SaltBeard

    LivingDeathEvent Listener code problem

    SaltBeard posted a topic in Modder Support

    After some debugging I still can't figure out why this code (code below) don't print expected - when print line was outside if, it also didn't work @Subscribe public void onLivingDeathEvent (LivingDeathEvent deadEntity){ if ( deadEntity.getSource() == DamageSource.DROWN) { System.out.println("Entity died: drown"); } else{ System.out.println("Entity died: other reasons"); } } This code is in main class, class is registered to MinecraftForge.EVENT_BUS Thanks for your time
    • December 29, 2020
    • 9 replies
  8. SaltBeard

    How to detect when player drowned?

    SaltBeard replied to SaltBeard's topic in Modder Support

    Oh thank you very much
    • December 29, 2020
    • 2 replies
  9. SaltBeard

    How to detect when player drowned?

    SaltBeard posted a topic in Modder Support

    I want to teleport player somewhere when he had drown, how can I "listen" (detect) for that? For example send "special message" in chat when that happened or anything else.
    • December 29, 2020
    • 2 replies
  10. SaltBeard

    Creating dimension

    SaltBeard replied to SaltBeard's topic in Modder Support

    When I create my dimension, where I can define biome, terrain, structures generation?
    • December 26, 2020
    • 5 replies
  11. SaltBeard

    Creating dimension

    SaltBeard replied to SaltBeard's topic in Modder Support

    thanks
    • December 26, 2020
    • 5 replies
  12. SaltBeard

    Creating dimension

    SaltBeard replied to SaltBeard's topic in Modder Support

    oh sorry for late answer, v15.2
    • December 24, 2020
    • 5 replies
  13. SaltBeard

    Creating dimension

    SaltBeard posted a topic in Modder Support

    Does anyone knows for good article for dimensions in Minecraft (something that will help me in creating my own), and probably some basic terrain generation?
    • December 24, 2020
    • 5 replies
  14. SaltBeard

    Better way of registering Item to register then using ItemBase

    SaltBeard replied to SaltBeard's topic in Modder Support

    nvm guys, it all works now, thank you so much for help
    • December 21, 2020
    • 9 replies
  15. SaltBeard

    Better way of registering Item to register then using ItemBase

    SaltBeard replied to SaltBeard's topic in Modder Support

    I want to specify properties when I create item "JADE", and I tried that with that piece of code above This is ItemBase code: package com.saltbeard.potc.items; import com.saltbeard.potc.PotC; import net.minecraft.item.Item; public class ItemBaseMisc extends Item { public ItemBaseMisc(){ super(new Properties().group(PotC.MISC_TAB)); } } This is old code for registering item "JADE": public static final RegistryObject<Item> JADE = ITEMS.register("jade", ItemBaseMisc::new);
    • December 21, 2020
    • 9 replies
  • All Activity
  • Home
  • SaltBeard
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community