diff --git a/If-you-want-to-contribute-to-Forge.md b/If-you-want-to-contribute-to-Forge.md index bd753b4..977da24 100644 --- a/If-you-want-to-contribute-to-Forge.md +++ b/If-you-want-to-contribute-to-Forge.md @@ -24,7 +24,7 @@ Whenever a new update of Minecraft is released, these patches are applied to the #### While coding: - Prevent to add extra spaces/line breaks, even when there are already existing ones in the code between statements. Below is an example that comes from `net.minecraft.entity.item.EntityItem#attackEntityFrom(DamageSourc, float)`: ```java - +//snip this.setBeenAttacked(); this.health = (int)((float)this.health - p_70097_2_); @@ -34,7 +34,7 @@ if (this.health <= 0) } return false; - +// +//snip import net.minecraft.otherimports import net.minecraftforge.otherimports - +//snip if (isCondition) MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.GenericEvent()); - +//snip ``` Sidenote: The previous example can be improved further. As FML/Forge is trying to move away from imports try to use `net.minecraftforge.common.MinecraftForge` even when an existing import is already there. An even better way is to add a function in `net.minecraftforge.event.EventFactory` or `net.minecraftforge.common.ForgeHooks` and use the full qualification function names.