Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/07/19 in all areas

  1. Yes. The client loses the attribute (which may be a Vanilla bug, I'm not sure), but the server retains the correct value and re-syncs it to the client.
    2 points
  2. It looks to me like they're trying to make a mod: and probably following HarryTalks' tutorial:
    2 points
  3. @LexManos I think I've made a lot more concise!!!! package jetcobblestone.firstmod; import jetcobblestone.firstmod.lists.itemList; import net.minecraft.item.Foods; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.util.ResourceLocation; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) public class ItemsLoader { @SubscribeEvent public static void registerItems(final RegistryEvent.Register<Item> event) { event.getRegistry().registerAll ( itemList.hair_fibre = new Item(new Item.Properties().food(Foods.COOKIE).group(ItemGroup.FOOD).maxStackSize(1)).setRegistryName(location("hair_fibre")) ); } private static ResourceLocation location(String name) { return new ResourceLocation(FirstMod.modid, name); } } I didn't realise you could have the @Mod.EventBus... outside of a class, but I understand now that it's meant to go outside a class, thanks to your reply Also I think you have a few haters Don't know why though... you've been really helpful Also, do you have any suggested improvements? Like for efficiency or smmin. For example I don't know if there is a better way to do that helper method at the end, or if it's even advised. I'm really happy I got this to work without copying code straight from a tutorial! I'm now really excited for this, as it will be really easy to navigate in the future. Again, is it advised to separate everything into different classes for efficiency? It certainly makes code easier to navigate. Edit: I only just realised ur the guy who makes forge lmao Really nice to see somebody so high up in the community help on small posts like this one!
    1 point
  4. I'm pretty sure this method worked in 1.12.2, the linked code is for 1.14.4 but I haven't tested it yet.
    1 point
  5. From what I remember Matmos was (or is) client-only mod so say goodbye to anything server related unless you want it to NOT be just client related. Assuming you want it to be client-only ("If I were to make a mod like Matmos...") you will be able to do most of it with: * ClientTickEvent - check if Minecraft#thePlayer or whatever other entity loaded on client-world is in some biome in Minecraft#theWorld, or maybe at some height and play a sound of "chirping birds" or any other stuff like running through high grass and shit. This solves most of your problems. * All other events like interaction events, attack events (attack event is called on client as opposed to hurt event) and seriously... ALL OF THEM (called from client logical side). And going top-bottom: (1-1 to list you gave) * ClientTickEvent * ClientTickEvent * ClientTickEvent * ClientTickEvent or maybe PlayerTickEvent or even LivingUpdateEvent (client side) if you want it for all entities. * Above ^ * ClientTickEvent Everything is a matter of detecting changes on entity (player or not, you can use any of ticking event and any of loaded entities) in question and playing some sound to it. Note: Client-only or not - it will have almost same outcome for end user with slight change of getting/not orders from server when to play sound. P.S: I know it works, because...SPOILER ALERT...I've done same thing
    1 point
×
×
  • Create New...

Important Information

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