Jump to content

Recommended Posts

Posted (edited)

Hello,
As the title said I'm a Spigot Developer who wants to start developing mods,
I have gradle setup and everything is good.
But I have no idea where to start, I thought Spigot experience would make it easier but I was so wrong, it's a lot different.
My desire was to make features from hacked clients for experience,
I searched up modding tutorials and they all just explain how to make custom items, blocks, etc etc.
I then just left it at that and tried working on simple features, I tried to make Fly, couldn't understand what I should do,
then I tried to make easier ideas for example AutoEat and AutoSprint, but I couldn't make them as well.
I just have no idea where to start, I thought I would just need events for these features something like: Hunger/Saturation Event for AutoEat, or PlayerMoveEvent for AutoSprint but it's not the same as Spigot.
I tried looking up online Forge JavaDocs, and it explains just how to make simple events, it doesn't show all the events, searched up the list of events on google and I couldn't even find them.


So how do you start? it seems way harder to develop mods than plugins, since the JavaDocs is so poor with it's content, and there are significantly way less resources online.

Edited by Jasle
Posted

Hi, and welcome to forge modding! I would strongly recommend updating to a newer version of forge (preferably 1.15.2), since 1.12 is no longer supported on this forum.

 

When you have updated to 1.15.2, I strongly recommend following a tutorial such as Cadiboo's (here), to learn the very basics of forge modding.

 

As for a list of all events, you can find them in Eclipse as detailed here (if you are using Intellij I am sure there is a similar way to achieve it).

 

Hope this helps!

Posted
  On 7/15/2020 at 10:20 AM, vemerion said:

Hi, and welcome to forge modding! I would strongly recommend updating to a newer version of forge (preferably 1.15.2), since 1.12 is no longer supported on this forum.

 

When you have updated to 1.15.2, I strongly recommend following a tutorial such as Cadiboo's (here), to learn the very basics of forge modding.

 

As for a list of all events, you can find them in Eclipse as detailed here (if you are using Intellij I am sure there is a similar way to achieve it).

 

Hope this helps!

Expand  

Thank you for the response,
I'm using 1.12.2 since my final plan is to use these features on 2b2t (which is running on 1.12.2), and yes I know it will take time, but I thought I'd rather learn modding on 1.12.2 because maybe in more updated versions stuff have changed.
Also I managed to see the Events in Intellij, I scrolled through PlayerEvent and LivingEvent, and for example for AutoEat, the event that I see that fits it the most is LivingUpdateEvent, but it's probably not it.
I've taken a look at the tutorial you sent, but it pretty much explains how to make custom items, blocks, registering them, etc, I'm not an expert, far from it, but from how I see it, making custom items or blocks or any of these stuff won't help me in making "Hacked Clients" features, I could be wrong because as I said I'm not an expert, but I'm opened to anything that will help me learn modding, so will it actually help?

Posted

First, as said, please note that 1.12 is unsupported on these forums; any threads you make about unsupported versions will be locked by a moderator (in fact, I wouldn't be surprised if this thread gets locked). You won't receive any help also from the Discord or the subreddit, as the Forge team heavily discourages people from asking help for these versions. You'll have to learn on your own, until you update.

 

Second, although you may not have malicious intent, the Forge team is heavily against hacked clients, and custom clients in general. You may only do these for your own learning purposes, but do not seek help from the forums/discord/reddit/anywhere the light of LexManos touches if you plan to make mods emulating client-side hacks. I strongly suggest updating and learning mods by making simple mods.

 

Third, the Forge API is primarily for use by mod developers to modify both sides of Minecraft, the client and the server. It is possible for create a server-only or client-only mod, but there are many pitfalls that you may fall into because Forge expects most mods to be for both sides (and most documentation and tutorials assume so), and your code may be incompatible in some way.

 

If you wish to receive any support, please update to a modern version of Minecraft.

  • Thanks 1
Posted
  On 7/15/2020 at 12:08 PM, sciwhiz12 said:

First, as said, please note that 1.12 is unsupported on these forums; any threads you make about unsupported versions will be locked by a moderator (in fact, I wouldn't be surprised if this thread gets locked). You won't receive any help also from the Discord or the subreddit, as the Forge team heavily discourages people from asking help for these versions. You'll have to learn on your own, until you update.

 

Second, although you may not have malicious intent, the Forge team is heavily against hacked clients, and custom clients in general. You may only do these for your own learning purposes, but do not seek help from the forums/discord/reddit/anywhere the light of LexManos touches if you plan to make mods emulating client-side hacks. I strongly suggest updating and learning mods by making simple mods.

 

Third, the Forge API is primarily for use by mod developers to modify both sides of Minecraft, the client and the server. It is possible for create a server-only or client-only mod, but there are many pitfalls that you may fall into because Forge expects most mods to be for both sides (and most documentation and tutorials assume so), and your code may be incompatible in some way.

 

If you wish to receive any support, please update to a modern version of Minecraft.

Expand  

Okay thanks,
I'll take your advice and update to make my learning experience better,
didn't know the third one so thanks for letting me know.

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Different problem now. https://paste.ee/p/iDo8lS35
    • I would like to have a BoP sapling drop from my block if it is also installed. I think I have done everything and I cannot pinpoint the problem, which is the error in the logs that appears when joining a world:   [Worker-Main-11/ERROR] [ne.mi.co.ForgeHooks/]: Couldn't parse element loot_tables:grasses:blocks/leaves_block com.google.gson.JsonSyntaxException: Expected name to be an item, was unknown string 'biomesoplenty:magic_sapling' My code:   LootItemConditions.CONDITIONS.register(modEventBus); public class LootItemConditions { public static final DeferredRegister<LootItemConditionType> CONDITIONS = DeferredRegister.create(Registries.LOOT_CONDITION_TYPE, Grasses.MOD_ID); public static final RegistryObject<LootItemConditionType> IS_MOD_LOADED = CONDITIONS.register("is_mod_loaded", () -> new LootItemConditionType(new IsModLoaded.ConditionSerializer())); } public class IsModLoaded implements LootItemCondition { private final boolean exists; private final String modID; public IsModLoaded(String modID) { this.exists = ModList.get().isLoaded(modID); this.modID = modID; } @Override public LootItemConditionType getType() { return LootItemConditions.IS_MOD_LOADED.get(); } @Override public boolean test(LootContext context) { return this.exists; } public static LootItemCondition.Builder builder(String modid) { return () -> new IsModLoaded(modid); } public static class ConditionSerializer implements Serializer<IsModLoaded> { @Override public void serialize(JsonObject json, IsModLoaded instance, JsonSerializationContext ctx) { json.addProperty("modid", instance.modID); } @Override public IsModLoaded deserialize(JsonObject json, JsonDeserializationContext ctx) { return new IsModLoaded(GsonHelper.getAsString(json, "modid")); } } } protected LootTable.Builder createLeavesDropsWithModIDCheck(Block selfBlock, Item sapling, Property<?>[] properties, String modIDToCheck, float... chances) { CopyBlockState.Builder blockStateCopyBuilder = CopyBlockState.copyState(selfBlock); for(Property<?> property : properties) { blockStateCopyBuilder.copy(property); } return LootTable.lootTable() .withPool(LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)) .add(LootItem.lootTableItem(selfBlock) .when(HAS_SHEARS_OR_SILK_TOUCH) .apply(blockStateCopyBuilder))) .withPool(LootPool.lootPool().setRolls(ConstantValue.exactly(1.0F)) .add(this.applyExplosionCondition(selfBlock, LootItem.lootTableItem(sapling)) .when(IsModLoaded.builder(modIDToCheck))) .when(BonusLevelTableCondition.bonusLevelFlatChance(Enchantments.BLOCK_FORTUNE, chances)) .when(HAS_NO_SHEARS_OR_SILK_TOUCH)) .withPool(LootPool.lootPool().name("sticks").setRolls(ConstantValue.exactly(1.0F)) .add(this.applyExplosionDecay(selfBlock, LootItem.lootTableItem(Items.STICK). apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, 2.0F)))) .when(BonusLevelTableCondition.bonusLevelFlatChance(Enchantments.BLOCK_FORTUNE, NORMAL_LEAVES_STICK_CHANCES)) .when(HAS_NO_SHEARS_OR_SILK_TOUCH))); } I don't know. Am I making a mistake somewhere? Am I forgetting something? Should there be something else?
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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