diff --git a/README.md b/README.md index 165d39594..51489162b 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,38 @@ # How to install Forge: For Players -Go to [http://files.minecraftforge.net](http://files.minecraftforge.net) +Go to [the Forge website](http://files.minecraftforge.net) and select the minecraft version you wish to get forge for from the list. You can download the installer for the *Recommended Build* or the - *Lastest build* there. Latest builds may have newer features but may be + *Latest build* there. Latest builds may have newer features but may be more unstable as a result. The installer will attempt to install forge into your vanilla launcher environment, where you can then create a new profile using that version and play the game! + +For support and questions, visit [the Support Forum](http://www.minecraftforge.net/forum/forum/18-support-bug-reports/). -Here is a short video from Rorax showing how to install and setup Forge. +Here is a short video from Rorax showing how to install and setup Forge: [![HOWTO Install Forge](https://img.youtube.com/vi/lB3ArN_-3Oc/0.jpg)](https://www.youtube.com/watch?v=lB3ArN_-3Oc) -For support and user questions, visit [http://www.minecraftforge.net](http://www.minecraftforge.net). - # How to install Forge: For Modders -If you wish to setup a new mod for Forge, visit - [http://files.minecraftforge.net](http://files.minecraftforge.net) and - select the **MDK** download. +[See the "Getting Started" section in the Forge Documentation](http://mcforge.readthedocs.io/en/latest/gettingstarted/). -This is the `Modder Developer Kit` - basically, an example mod with all - the tooling needed to create a Forge mod workspace ready for use in your - IDE of choice. - -Here is a short video from @cpw showing how to install and setup the MDK - in Intellij. - -[![HOWTO Install MDK](https://img.youtube.com/vi/PfmlNiHonV0/0.jpg)](https://www.youtube.com/watch?v=PfmlNiHonV0) - # How to install Forge: For those wishing to work on Forge itself If you wish to actually inspect Forge, submit PRs or otherwise work - with Forge itself, you're in the right place! Clone this (either - directly, or make a Fork first if you want to make a PR) and run - ```gradlew.bat setupForge``` or ```gradlew setupForge```. This will download and - setup all the bits you need to have a functional Forge workspace. - -After that, open a workspace in your favorite IDE and import existing projects - the projects folder. + with Forge itself, you're in the right place! -Here is a short video from @cpw showing how to install and setup Forge - in Intellij. - -[![HOWTO Install MDK](https://img.youtube.com/vi/yanCpy8p2ZE/0.jpg)](https://www.youtube.com/watch?v=yanCpy8p2ZE) + [See the guide to setting up a Forge workspace](http://mcforge.readthedocs.io/en/latest/forgedev/). ## Pull requests -Pull requests should target the current default branch. Currently, that is - the 1.10.x branch for Minecraft 1.10.2. - -If you intend to modify a minecraft patch, or add a new one, always run -```gradlew genPatches``` to generate your patch and validate that you -are not doing anything unexpected in your patch. +[See the "Making Changes and Pull Requests" section in the Forge documentation](http://mcforge.readthedocs.io/en/latest/forgedev/#making-changes-and-pull-requests). ### Contributor License Agreement -As stated in the (https://github.com/MinecraftForge/MinecraftForge/blob/1.10.x/LICENSE-new.txt) +As stated in the [LICENSE-new](LICENSE-new.txt) file, we require all contributors to acknowledge the Forge Contributor License Agreement. Please ensure you have a valid email address associated with your github account to do this. If you have previously - signed it, you should be OK. \ No newline at end of file + signed it, you should be OK. diff --git a/mdk/README.txt b/mdk/README.txt index b45931f43..82be8dcd2 100644 --- a/mdk/README.txt +++ b/mdk/README.txt @@ -14,6 +14,9 @@ Source pack installation information: Standalone source installation ============================== +See the Forge Documentation online for more detailed instructions: +http://mcforge.readthedocs.io/en/latest/gettingstarted/ + Step 1: Open your command-line and browse to the folder where you extracted the zip file. Step 2: Once you have a command window up in the folder that the downloaded material was placed, type: @@ -24,7 +27,7 @@ Linux/Mac OS: "./gradlew setupDecompWorkspace" Step 3: After all that finished, you're left with a choice. For eclipse, run "gradlew eclipse" (./gradlew eclipse if you are on Mac/Linux) -If you preffer to use IntelliJ, steps are a little different. +If you prefer to use IntelliJ, steps are a little different. 1. Open IDEA, and import project. 2. Select your build.gradle file and have it import. 3. Once it's finished you must close IntelliJ and run the following command: @@ -33,14 +36,14 @@ If you preffer to use IntelliJ, steps are a little different. Step 4: The final step is to open Eclipse and switch your workspace to /eclipse/ (if you use IDEA, it should automatically start on your project) -If at any point you are missing libraries in your IDE, or you've run into problems you can run "gradlew --refresh-dependencies" to refresh the local cache. "gradlew clean" to reset everything {this does not effect your code} and then start the processs again. +If at any point you are missing libraries in your IDE, or you've run into problems you can run "gradlew --refresh-dependencies" to refresh the local cache. "gradlew clean" to reset everything {this does not affect your code} and then start the processs again. Should it still not work, Refer to #ForgeGradle on EsperNet for more information about the gradle environment. Tip: If you do not care about seeing Minecraft's source code you can replace "setupDecompWorkspace" with one of the following: -"setupDevWorkspace": Will patch, deobfusicated, and gather required assets to run minecraft, but will not generated human readable source code. +"setupDevWorkspace": Will patch, deobfuscate, and gather required assets to run minecraft, but will not generate human readable source code. "setupCIWorkspace": Same as Dev but will not download any assets. This is useful in build servers as it is the fastest because it does the least work. Tip: diff --git a/mdk/src/main/java/com/example/examplemod/ExampleMod.java b/mdk/src/main/java/com/example/examplemod/ExampleMod.java index f01de148e..42a155b77 100644 --- a/mdk/src/main/java/com/example/examplemod/ExampleMod.java +++ b/mdk/src/main/java/com/example/examplemod/ExampleMod.java @@ -4,17 +4,28 @@ import net.minecraft.init.Blocks; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import org.apache.logging.log4j.Logger; -@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION) +@Mod(modid = ExampleMod.MODID, name = ExampleMod.NAME, version = ExampleMod.VERSION) public class ExampleMod { public static final String MODID = "examplemod"; + public static final String NAME = "Example Mod"; public static final String VERSION = "1.0"; - + + private static Logger logger; + + @EventHandler + public void preInit(FMLPreInitializationEvent event) + { + logger = event.getModLog(); + } + @EventHandler public void init(FMLInitializationEvent event) { // some example code - System.out.println("DIRT BLOCK >> "+Blocks.DIRT.getUnlocalizedName()); + logger.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); } } diff --git a/patches/minecraft/net/minecraft/entity/EntityList.java.patch b/patches/minecraft/net/minecraft/entity/EntityList.java.patch index a3d820b6f..b3a681975 100644 --- a/patches/minecraft/net/minecraft/entity/EntityList.java.patch +++ b/patches/minecraft/net/minecraft/entity/EntityList.java.patch @@ -164,7 +164,7 @@ } public static class EntityEggInfo -@@ -428,5 +449,16 @@ +@@ -428,5 +450,16 @@ this.field_151512_d = StatList.func_151182_a(this); this.field_151513_e = StatList.func_151176_b(this); } diff --git a/patches/minecraft/net/minecraft/item/Item.java.patch b/patches/minecraft/net/minecraft/item/Item.java.patch index 226daf46b..b891ac477 100644 --- a/patches/minecraft/net/minecraft/item/Item.java.patch +++ b/patches/minecraft/net/minecraft/item/Item.java.patch @@ -68,7 +68,7 @@ CreativeTabs creativetabs = this.func_77640_w(); return creativetabs != null && (p_194125_1_ == CreativeTabs.field_78027_g || p_194125_1_ == creativetabs); } -@@ -435,11 +445,704 @@ +@@ -435,11 +441,704 @@ return false; } @@ -773,7 +773,7 @@ public static void func_150900_l() { func_179214_a(Blocks.field_150350_a, new ItemAir(Blocks.field_150350_a)); -@@ -999,6 +1702,8 @@ +@@ -999,6 +1698,8 @@ private final float field_78010_h; private final float field_78011_i; private final int field_78008_j; @@ -782,7 +782,7 @@ private ToolMaterial(int p_i1874_3_, int p_i1874_4_, float p_i1874_5_, float p_i1874_6_, int p_i1874_7_) { -@@ -1034,6 +1739,7 @@ +@@ -1034,6 +1735,7 @@ return this.field_78008_j; } @@ -790,7 +790,7 @@ public Item func_150995_f() { if (this == WOOD) -@@ -1057,5 +1763,21 @@ +@@ -1057,5 +1759,21 @@ return this == DIAMOND ? Items.field_151045_i : null; } } diff --git a/src/main/java/net/minecraftforge/client/IRenderContextHandler.java b/src/main/java/net/minecraftforge/client/IRenderContextHandler.java index 133ffa0ed..743cb3fae 100644 --- a/src/main/java/net/minecraftforge/client/IRenderContextHandler.java +++ b/src/main/java/net/minecraftforge/client/IRenderContextHandler.java @@ -19,14 +19,18 @@ package net.minecraftforge.client; +/** + * @deprecated TODO remove in 1.13. This has never been used + */ +@Deprecated public interface IRenderContextHandler { /** Run before the specified rendering context. */ - public void beforeRenderContext(); + void beforeRenderContext(); /** Run after the specified rendering context. */ - public void afterRenderContext(); + void afterRenderContext(); } diff --git a/src/main/java/net/minecraftforge/client/model/ICustomModelLoader.java b/src/main/java/net/minecraftforge/client/model/ICustomModelLoader.java index 2fb332d73..0dd6d3712 100644 --- a/src/main/java/net/minecraftforge/client/model/ICustomModelLoader.java +++ b/src/main/java/net/minecraftforge/client/model/ICustomModelLoader.java @@ -28,10 +28,10 @@ public interface ICustomModelLoader extends IResourceManagerReloadListener * Checks if given model should be loaded by this loader. * Reading file contents is inadvisable, if possible decision should be made based on the location alone. */ - public boolean accepts(ResourceLocation modelLocation); + boolean accepts(ResourceLocation modelLocation); /* * loads (or reloads) specified model */ - public IModel loadModel(ResourceLocation modelLocation) throws Exception; + IModel loadModel(ResourceLocation modelLocation) throws Exception; } diff --git a/src/main/java/net/minecraftforge/client/model/ModelLoader.java b/src/main/java/net/minecraftforge/client/model/ModelLoader.java index 6ff52a3f7..bfa12c353 100644 --- a/src/main/java/net/minecraftforge/client/model/ModelLoader.java +++ b/src/main/java/net/minecraftforge/client/model/ModelLoader.java @@ -106,6 +106,9 @@ import com.google.common.base.Joiner; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import java.util.Optional; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; + import com.google.common.base.Predicate; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; @@ -208,8 +211,10 @@ public final class ModelLoader extends ModelBakery @Override protected void loadBlocks() { - List blocks = Lists.newArrayList(Iterables.filter(Block.REGISTRY, block -> block.getRegistryName() != null)); - blocks.sort(Comparator.comparing(b -> b.getRegistryName().toString())); + List blocks = StreamSupport.stream(Block.REGISTRY.spliterator(), false) + .filter(block -> block.getRegistryName() != null) + .sorted(Comparator.comparing(b -> b.getRegistryName().toString())) + .collect(Collectors.toList()); ProgressBar blockBar = ProgressManager.push("ModelLoader: blocks", blocks.size()); BlockStateMapper mapper = this.blockModelShapes.getBlockStateMapper(); @@ -280,8 +285,10 @@ public final class ModelLoader extends ModelBakery registerVariantNames(); - List items = Lists.newArrayList(Iterables.filter(Item.REGISTRY, item -> item.getRegistryName() != null)); - Collections.sort(items, (i1, i2) -> i1.getRegistryName().toString().compareTo(i2.getRegistryName().toString())); + List items = StreamSupport.stream(Item.REGISTRY.spliterator(), false) + .filter(item -> item.getRegistryName() != null) + .sorted(Comparator.comparing(i -> i.getRegistryName().toString())) + .collect(Collectors.toList()); ProgressBar itemBar = ProgressManager.push("ModelLoader: items", items.size()); for(Item item : items) diff --git a/src/main/java/net/minecraftforge/client/model/pipeline/ForgeBlockModelRenderer.java b/src/main/java/net/minecraftforge/client/model/pipeline/ForgeBlockModelRenderer.java index a6a7ed4d2..bd522e63e 100644 --- a/src/main/java/net/minecraftforge/client/model/pipeline/ForgeBlockModelRenderer.java +++ b/src/main/java/net/minecraftforge/client/model/pipeline/ForgeBlockModelRenderer.java @@ -34,36 +34,18 @@ import net.minecraftforge.common.ForgeModContainer; public class ForgeBlockModelRenderer extends BlockModelRenderer { - private final ThreadLocal lighterFlat = new ThreadLocal() - { - @Override - protected VertexLighterFlat initialValue() - { - return new VertexLighterFlat(colors); - } - }; - - private final ThreadLocal lighterSmooth = new ThreadLocal() - { - @Override - protected VertexLighterSmoothAo initialValue() - { - return new VertexLighterSmoothAo(colors); - } - }; - + private final ThreadLocal lighterFlat; + private final ThreadLocal lighterSmooth; private final ThreadLocal wrFlat = new ThreadLocal<>(); private final ThreadLocal wrSmooth = new ThreadLocal<>(); private final ThreadLocal lastRendererFlat = new ThreadLocal<>(); private final ThreadLocal lastRendererSmooth = new ThreadLocal<>(); - private final BlockColors colors; - public ForgeBlockModelRenderer(BlockColors colors) { - // TODO Auto-generated constructor stub super(colors); - this.colors = colors; + lighterFlat = ThreadLocal.withInitial(() -> new VertexLighterFlat(colors)); + lighterSmooth = ThreadLocal.withInitial(() -> new VertexLighterSmoothAo(colors)); } @Override diff --git a/src/main/java/net/minecraftforge/common/ForgeChunkManager.java b/src/main/java/net/minecraftforge/common/ForgeChunkManager.java index 7c58abbbd..274ac7f6a 100644 --- a/src/main/java/net/minecraftforge/common/ForgeChunkManager.java +++ b/src/main/java/net/minecraftforge/common/ForgeChunkManager.java @@ -166,7 +166,7 @@ public class ForgeChunkManager * @param tickets The tickets to re-register. The list is immutable and cannot be manipulated directly. Copy it first. * @param world the world */ - public void ticketsLoaded(List tickets, World world); + void ticketsLoaded(List tickets, World world); } /** @@ -197,7 +197,7 @@ public class ForgeChunkManager * to "maxTicketCount" size after the call returns and then offered to the other callback * method */ - public List ticketsLoaded(List tickets, World world, int maxTicketCount); + List ticketsLoaded(List tickets, World world, int maxTicketCount); } public interface PlayerOrderedLoadingCallback extends LoadingCallback @@ -216,7 +216,7 @@ public class ForgeChunkManager * @return A list of the tickets this mod wishes to use. This list will subsequently be offered * to the main callback for action */ - public ListMultimap playerTicketsLoaded(ListMultimap tickets, World world); + ListMultimap playerTicketsLoaded(ListMultimap tickets, World world); } public enum Type { diff --git a/src/main/java/net/minecraftforge/common/IMinecartCollisionHandler.java b/src/main/java/net/minecraftforge/common/IMinecartCollisionHandler.java index ec868332c..0e0813d80 100644 --- a/src/main/java/net/minecraftforge/common/IMinecartCollisionHandler.java +++ b/src/main/java/net/minecraftforge/common/IMinecartCollisionHandler.java @@ -38,7 +38,7 @@ public interface IMinecartCollisionHandler * @param cart The cart that called the collision. * @param other The object it collided with. */ - public void onEntityCollision(EntityMinecart cart, Entity other); + void onEntityCollision(EntityMinecart cart, Entity other); /** * This function replaced the function of the same name in EntityMinecart. @@ -48,7 +48,7 @@ public interface IMinecartCollisionHandler * @param other The entity requesting the collision box. * @return The collision box or null. */ - public AxisAlignedBB getCollisionBox(EntityMinecart cart, Entity other); + AxisAlignedBB getCollisionBox(EntityMinecart cart, Entity other); /** * This function is used to define the box used for detecting minecart collisions. @@ -56,7 +56,7 @@ public interface IMinecartCollisionHandler * @param cart The cart for which the collision box was requested. * @return The collision box, cannot be null. */ - public AxisAlignedBB getMinecartCollisionBox(EntityMinecart cart); + AxisAlignedBB getMinecartCollisionBox(EntityMinecart cart); /** * This function replaces the function of the same name in EntityMinecart. @@ -64,6 +64,6 @@ public interface IMinecartCollisionHandler * @param cart The cart for which the bounding box was requested. * @return The bounding box or null. */ - public AxisAlignedBB getBoundingBox(EntityMinecart cart); + AxisAlignedBB getBoundingBox(EntityMinecart cart); } diff --git a/src/main/java/net/minecraftforge/common/IPlantable.java b/src/main/java/net/minecraftforge/common/IPlantable.java index 48cc5a389..de41bc0a5 100644 --- a/src/main/java/net/minecraftforge/common/IPlantable.java +++ b/src/main/java/net/minecraftforge/common/IPlantable.java @@ -25,6 +25,6 @@ import net.minecraft.world.IBlockAccess; public interface IPlantable { - public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos); - public IBlockState getPlant(IBlockAccess world, BlockPos pos); + EnumPlantType getPlantType(IBlockAccess world, BlockPos pos); + IBlockState getPlant(IBlockAccess world, BlockPos pos); } \ No newline at end of file diff --git a/src/main/java/net/minecraftforge/common/IShearable.java b/src/main/java/net/minecraftforge/common/IShearable.java index 1b9ee1cde..4c3367e4b 100644 --- a/src/main/java/net/minecraftforge/common/IShearable.java +++ b/src/main/java/net/minecraftforge/common/IShearable.java @@ -43,12 +43,12 @@ public interface IShearable * Checks if the object is currently shearable * Example: Sheep return false when they have no wool * - * @param item The itemstack that is being used, Possible to be null - * @param world The current world + * @param item The ItemStack that is being used, may be empty. + * @param world The current world. * @param pos Block's position in world. * @return If this is shearable, and onSheared should be called. */ - public boolean isShearable(@Nonnull ItemStack item, IBlockAccess world, BlockPos pos); + boolean isShearable(@Nonnull ItemStack item, IBlockAccess world, BlockPos pos); /** * Performs the shear function on this object. @@ -62,11 +62,12 @@ public interface IShearable * For entities, they should trust there internal location information * over the values passed into this function. * - * @param item The itemstack that is being used, Possible to be null - * @param world The current world + * @param item The ItemStack that is being used, may be empty. + * @param world The current world. * @param pos If this is a block, the block's position in world. - * @param fortune The fortune level of the shears being used - * @return A ArrayList containing all items from this shearing. Possible to be null. + * @param fortune The fortune level of the shears being used. + * @return A List containing all items from this shearing. May be empty. */ - public List onSheared(@Nonnull ItemStack item, IBlockAccess world, BlockPos pos, int fortune); + @Nonnull + List onSheared(@Nonnull ItemStack item, IBlockAccess world, BlockPos pos, int fortune); } diff --git a/src/main/java/net/minecraftforge/common/ISpecialArmor.java b/src/main/java/net/minecraftforge/common/ISpecialArmor.java index 4789fa35d..1034087a5 100644 --- a/src/main/java/net/minecraftforge/common/ISpecialArmor.java +++ b/src/main/java/net/minecraftforge/common/ISpecialArmor.java @@ -60,7 +60,7 @@ public interface ISpecialArmor * @param slot The armor slot the item is in. * @return A ArmorProperties instance holding information about how the armor effects damage. */ - public ArmorProperties getProperties(EntityLivingBase player, @Nonnull ItemStack armor, DamageSource source, double damage, int slot); + ArmorProperties getProperties(EntityLivingBase player, @Nonnull ItemStack armor, DamageSource source, double damage, int slot); /** * Get the displayed effective armor. @@ -70,7 +70,7 @@ public interface ISpecialArmor * @param slot The armor slot the item is in. * @return The number of armor points for display, 2 per shield. */ - public abstract int getArmorDisplay(EntityPlayer player, @Nonnull ItemStack armor, int slot); + int getArmorDisplay(EntityPlayer player, @Nonnull ItemStack armor, int slot); /** * Applies damage to the ItemStack. The mod is responsible for reducing the @@ -84,7 +84,7 @@ public interface ISpecialArmor * @param damage The amount of damage being applied to the armor * @param slot The armor slot the item is in. */ - public abstract void damageArmor(EntityLivingBase entity, @Nonnull ItemStack stack, DamageSource source, int damage, int slot); + void damageArmor(EntityLivingBase entity, @Nonnull ItemStack stack, DamageSource source, int damage, int slot); public static class ArmorProperties implements Comparable { diff --git a/src/main/java/net/minecraftforge/common/animation/ITimeValue.java b/src/main/java/net/minecraftforge/common/animation/ITimeValue.java index a6a454531..88f58b3c0 100644 --- a/src/main/java/net/minecraftforge/common/animation/ITimeValue.java +++ b/src/main/java/net/minecraftforge/common/animation/ITimeValue.java @@ -27,5 +27,5 @@ package net.minecraftforge.common.animation; */ public interface ITimeValue { - public float apply(float input); + float apply(float input); } diff --git a/src/main/java/net/minecraftforge/common/command/SelectorHandler.java b/src/main/java/net/minecraftforge/common/command/SelectorHandler.java index 9c0eb2f05..43c1f89f1 100644 --- a/src/main/java/net/minecraftforge/common/command/SelectorHandler.java +++ b/src/main/java/net/minecraftforge/common/command/SelectorHandler.java @@ -37,16 +37,16 @@ public interface SelectorHandler * * @param sender The {@link ICommandSender} that initiated the query */ - public List matchEntities(ICommandSender sender, String token, Class targetClass) throws CommandException; + List matchEntities(ICommandSender sender, String token, Class targetClass) throws CommandException; /** * Returns whether the selector string potentially matches multiple entities */ - public boolean matchesMultiplePlayers(String selectorStr) throws CommandException; + boolean matchesMultiplePlayers(String selectorStr) throws CommandException; /** * Returns whether the string matches the overall syntax of the selector
* Note: If this returns {@code false}, {@link #matchEntities} should return an empty list */ - public boolean isSelector(String selectorStr); + boolean isSelector(String selectorStr); } diff --git a/src/main/java/net/minecraftforge/common/config/Config.java b/src/main/java/net/minecraftforge/common/config/Config.java index 4d99980ea..6b80aa799 100644 --- a/src/main/java/net/minecraftforge/common/config/Config.java +++ b/src/main/java/net/minecraftforge/common/config/Config.java @@ -67,21 +67,21 @@ public @interface Config @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE}) - public @interface LangKey + @interface LangKey { String value(); } @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) - public @interface Comment + @interface Comment { String[] value(); } @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) - public @interface RangeInt + @interface RangeInt { int min() default Integer.MIN_VALUE; int max() default Integer.MAX_VALUE; @@ -89,7 +89,7 @@ public @interface Config @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) - public @interface RangeDouble + @interface RangeDouble { double min() default Double.MIN_VALUE; double max() default Double.MAX_VALUE; @@ -97,18 +97,18 @@ public @interface Config @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) - public @interface Name + @interface Name { String value(); } @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE}) - public @interface RequiresMcRestart + @interface RequiresMcRestart {} @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.TYPE}) - public @interface RequiresWorldRestart + @interface RequiresWorldRestart {} } diff --git a/src/main/java/net/minecraftforge/common/config/IFieldWrapper.java b/src/main/java/net/minecraftforge/common/config/IFieldWrapper.java index 4af7091fb..47065751d 100644 --- a/src/main/java/net/minecraftforge/common/config/IFieldWrapper.java +++ b/src/main/java/net/minecraftforge/common/config/IFieldWrapper.java @@ -9,27 +9,27 @@ public interface IFieldWrapper /** * @return The type adapter to serialize the values returned by getValue. Null if non-primitive. */ - public ITypeAdapter getTypeAdapter(); + ITypeAdapter getTypeAdapter(); /** * @param field the field about which to retrieve information * @param instance The instance whose field shall be queried. * @return a list of keys handled by this field */ - public String[] getKeys(); + String[] getKeys(); - public Object getValue(String key); + Object getValue(String key); - public void setValue(String key, Object value); + void setValue(String key, Object value); - public boolean hasKey(String name); + boolean hasKey(String name); - public boolean handlesKey(String name); + boolean handlesKey(String name); - public void setupConfiguration(Configuration cfg, String desc, String langKey, boolean reqMCRestart, boolean reqWorldRestart); + void setupConfiguration(Configuration cfg, String desc, String langKey, boolean reqMCRestart, boolean reqWorldRestart); /** * @return the category name in which the entries should be saved. */ - public String getCategory(); + String getCategory(); } diff --git a/src/main/java/net/minecraftforge/common/crafting/IConditionFactory.java b/src/main/java/net/minecraftforge/common/crafting/IConditionFactory.java index 3530dc744..ec2fb4455 100644 --- a/src/main/java/net/minecraftforge/common/crafting/IConditionFactory.java +++ b/src/main/java/net/minecraftforge/common/crafting/IConditionFactory.java @@ -23,5 +23,5 @@ import java.util.function.BooleanSupplier; import com.google.gson.JsonObject; public interface IConditionFactory { - public BooleanSupplier parse(JsonContext context, JsonObject json); + BooleanSupplier parse(JsonContext context, JsonObject json); } diff --git a/src/main/java/net/minecraftforge/common/crafting/IIngredientFactory.java b/src/main/java/net/minecraftforge/common/crafting/IIngredientFactory.java index 2c0edc10d..a9d342674 100644 --- a/src/main/java/net/minecraftforge/common/crafting/IIngredientFactory.java +++ b/src/main/java/net/minecraftforge/common/crafting/IIngredientFactory.java @@ -27,5 +27,5 @@ import net.minecraft.item.crafting.Ingredient; public interface IIngredientFactory { @Nonnull //If you would return null throw JsonSyntaxException to explain why - public Ingredient parse(JsonContext context, JsonObject json); + Ingredient parse(JsonContext context, JsonObject json); } diff --git a/src/main/java/net/minecraftforge/common/crafting/IRecipeFactory.java b/src/main/java/net/minecraftforge/common/crafting/IRecipeFactory.java index 16a3e54d8..486bc86c8 100644 --- a/src/main/java/net/minecraftforge/common/crafting/IRecipeFactory.java +++ b/src/main/java/net/minecraftforge/common/crafting/IRecipeFactory.java @@ -23,5 +23,5 @@ import com.google.gson.JsonObject; import net.minecraft.item.crafting.IRecipe; public interface IRecipeFactory { - public IRecipe parse(JsonContext context, JsonObject json); + IRecipe parse(JsonContext context, JsonObject json); } diff --git a/src/main/java/net/minecraftforge/common/crafting/IShapedRecipe.java b/src/main/java/net/minecraftforge/common/crafting/IShapedRecipe.java index 4b7ead4ee..12efeb25d 100644 --- a/src/main/java/net/minecraftforge/common/crafting/IShapedRecipe.java +++ b/src/main/java/net/minecraftforge/common/crafting/IShapedRecipe.java @@ -27,6 +27,6 @@ import net.minecraft.item.crafting.IRecipe; */ public interface IShapedRecipe extends IRecipe { - public int getRecipeWidth(); - public int getRecipeHeight(); + int getRecipeWidth(); + int getRecipeHeight(); } diff --git a/src/main/java/net/minecraftforge/common/model/ITransformation.java b/src/main/java/net/minecraftforge/common/model/ITransformation.java index a68d83f8c..2e76beaee 100644 --- a/src/main/java/net/minecraftforge/common/model/ITransformation.java +++ b/src/main/java/net/minecraftforge/common/model/ITransformation.java @@ -29,9 +29,9 @@ import net.minecraft.util.EnumFacing; */ public interface ITransformation { - public Matrix4f getMatrix(); + Matrix4f getMatrix(); - public EnumFacing rotate(EnumFacing facing); + EnumFacing rotate(EnumFacing facing); - public int rotate(EnumFacing facing, int vertexIndex); + int rotate(EnumFacing facing, int vertexIndex); } diff --git a/src/main/java/net/minecraftforge/common/property/ExtendedBlockState.java b/src/main/java/net/minecraftforge/common/property/ExtendedBlockState.java index ddb6f706d..63d5ee31e 100644 --- a/src/main/java/net/minecraftforge/common/property/ExtendedBlockState.java +++ b/src/main/java/net/minecraftforge/common/property/ExtendedBlockState.java @@ -19,25 +19,22 @@ package net.minecraftforge.common.property; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; - -import net.minecraft.block.Block; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.state.BlockStateContainer; -import net.minecraft.block.state.IBlockState; - import java.util.Optional; import com.google.common.base.Predicates; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableTable; import com.google.common.collect.Iterables; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; +import net.minecraft.block.Block; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; public class ExtendedBlockState extends BlockStateContainer { @@ -98,7 +95,7 @@ public class ExtendedBlockState extends BlockStateContainer return this; } - if (Iterables.all(unlistedProperties.values(), Predicates.>equalTo(Optional.empty()))) + if (unlistedProperties.values().stream().noneMatch(Optional::isPresent)) { // no dynamic properties present, looking up in the normal table return clean; } diff --git a/src/main/java/net/minecraftforge/common/util/EnumHelper.java b/src/main/java/net/minecraftforge/common/util/EnumHelper.java index 4a29e3a24..8feec72f9 100644 --- a/src/main/java/net/minecraftforge/common/util/EnumHelper.java +++ b/src/main/java/net/minecraftforge/common/util/EnumHelper.java @@ -46,6 +46,7 @@ import net.minecraft.util.text.TextFormatting; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.gen.structure.StructureStrongholdPieces.Stronghold.Door; import net.minecraftforge.classloading.FMLForgePlugin; +import org.apache.commons.lang3.ArrayUtils; import javax.annotation.Nullable; @@ -376,10 +377,8 @@ public class EnumHelper try { T[] previousValues = (T[])valuesField.get(enumType); - List values = new ArrayList(Arrays.asList(previousValues)); - T newValue = makeEnum(enumType, enumName, values.size(), paramTypes, paramValues); - values.add(newValue); - setFailsafeFieldValue(valuesField, null, values.toArray((T[]) Array.newInstance(enumType, 0))); + T newValue = makeEnum(enumType, enumName, previousValues.length, paramTypes, paramValues); + setFailsafeFieldValue(valuesField, null, ArrayUtils.add(previousValues, newValue)); cleanEnumCache(enumType); return newValue; diff --git a/src/main/java/net/minecraftforge/common/util/IDataFixerData.java b/src/main/java/net/minecraftforge/common/util/IDataFixerData.java index da6b05cc0..e8fb2f9aa 100644 --- a/src/main/java/net/minecraftforge/common/util/IDataFixerData.java +++ b/src/main/java/net/minecraftforge/common/util/IDataFixerData.java @@ -22,5 +22,5 @@ import net.minecraft.util.datafix.IDataFixer; public interface IDataFixerData extends IDataFixer { - public int getVersion(String mod); + int getVersion(String mod); } diff --git a/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java b/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java index 3e96f8969..7ed25afe6 100644 --- a/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java +++ b/src/main/java/net/minecraftforge/fml/client/FMLClientHandler.java @@ -675,7 +675,7 @@ public class FMLClientHandler implements IFMLSidedHandler } catch (NoSuchMethodException e) { - FMLLog.log.error("The container {} (type {}) returned an invalid class for it's resource pack.", container.getName(), container.getClass().getName()); + FMLLog.log.error("The container {} (type {}) returned an invalid class for its resource pack.", container.getName(), container.getClass().getName()); } catch (Exception e) { diff --git a/src/main/java/net/minecraftforge/fml/client/IModGuiFactory.java b/src/main/java/net/minecraftforge/fml/client/IModGuiFactory.java index a127d86a3..61a39085e 100644 --- a/src/main/java/net/minecraftforge/fml/client/IModGuiFactory.java +++ b/src/main/java/net/minecraftforge/fml/client/IModGuiFactory.java @@ -34,13 +34,13 @@ public interface IModGuiFactory { * * @param minecraftInstance the instance */ - public void initialize(Minecraft minecraftInstance); + void initialize(Minecraft minecraftInstance); /** * If this method returns false, the config button in the mod list will be disabled * @return true if this object provides a config gui screen, false otherwise */ - public boolean hasConfigGui(); + boolean hasConfigGui(); /** * Return an initialized {@link GuiScreen}. This screen will be displayed @@ -62,7 +62,7 @@ public interface IModGuiFactory { * @return A class that will be instantiated on clicks on the config button * or null if no GUI is desired. */ - public GuiScreen createConfigGui(GuiScreen parentScreen); + GuiScreen createConfigGui(GuiScreen parentScreen); /** * Return a list of the "runtime" categories this mod wishes to populate with @@ -84,7 +84,7 @@ public interface IModGuiFactory { * * @return the set of options this mod wishes to have available, or empty if none */ - public Set runtimeGuiCategories(); + Set runtimeGuiCategories(); /** * Represents an option category and entry in the runtime gui options list. diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiConfigEntries.java b/src/main/java/net/minecraftforge/fml/client/config/GuiConfigEntries.java index 00edd2608..ce2b3e52a 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiConfigEntries.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiConfigEntries.java @@ -1692,45 +1692,45 @@ public class GuiConfigEntries extends GuiListExtended * Gets the IConfigElement object owned by this entry. * @return */ - public IConfigElement getConfigElement(); + IConfigElement getConfigElement(); /** * Gets the name of the ConfigElement owned by this entry. */ - public String getName(); + String getName(); /** * Gets the current value of this entry. */ - public Object getCurrentValue(); + Object getCurrentValue(); /** * Gets the current values of this list entry. */ - public Object[] getCurrentValues(); + Object[] getCurrentValues(); /** * Is this list entry enabled? * * @return true if this entry's controls should be enabled, false otherwise. */ - public boolean enabled(); + boolean enabled(); /** * Handles user keystrokes for any GuiTextField objects in this entry. Call {@link GuiTextField#textboxKeyTyped(char, int)} for any GuiTextField * objects that should receive the input provided. */ - public void keyTyped(char eventChar, int eventKey); + void keyTyped(char eventChar, int eventKey); /** * Call {@link GuiTextField#updateCursorCounter()} for any GuiTextField objects in this entry. */ - public void updateCursorCounter(); + void updateCursorCounter(); /** * Call {@link GuiTextField#mouseClicked(int, int, int)} for and GuiTextField objects in this entry. */ - public void mouseClicked(int x, int y, int mouseEvent); + void mouseClicked(int x, int y, int mouseEvent); /** * Is this entry's value equal to the default value? Generally true should be returned if this entry is not a property or category @@ -1738,50 +1738,50 @@ public class GuiConfigEntries extends GuiListExtended * * @return true if this entry's value is equal to this entry's default value. */ - public boolean isDefault(); + boolean isDefault(); /** * Sets this entry's value to the default value. */ - public void setToDefault(); + void setToDefault(); /** * Handles reverting any changes that have occurred to this entry. */ - public void undoChanges(); + void undoChanges(); /** * Has the value of this entry changed? * * @return true if changes have been made to this entry's value, false otherwise. */ - public boolean isChanged(); + boolean isChanged(); /** * Handles saving any changes that have been made to this entry back to the underlying object. It is a good practice to check * isChanged() before performing the save action. This method should return true if the element has changed AND REQUIRES A RESTART. */ - public boolean saveConfigElement(); + boolean saveConfigElement(); /** * Handles drawing any tooltips that apply to this entry. This method is called after all other GUI elements have been drawn to the * screen, so it could also be used to draw any GUI element that needs to be drawn after all entries have had drawEntry() called. */ - public void drawToolTip(int mouseX, int mouseY); + void drawToolTip(int mouseX, int mouseY); /** * Gets this entry's label width. */ - public int getLabelWidth(); + int getLabelWidth(); /** * Gets this entry's right-hand x boundary. This value is used to control where the scroll bar is placed. */ - public int getEntryRightBound(); + int getEntryRightBound(); /** * This method is called when the parent GUI is closed. Most handlers won't need this; it is provided for special cases. */ - public void onGuiClosed(); + void onGuiClosed(); } } diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiEditArrayEntries.java b/src/main/java/net/minecraftforge/fml/client/config/GuiEditArrayEntries.java index 9693cb3b4..d1d4f85e6 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiEditArrayEntries.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiEditArrayEntries.java @@ -691,16 +691,16 @@ public class GuiEditArrayEntries extends GuiListExtended public static interface IArrayEntry extends GuiListExtended.IGuiListEntry { - public void keyTyped(char eventChar, int eventKey); + void keyTyped(char eventChar, int eventKey); - public void updateCursorCounter(); + void updateCursorCounter(); - public void mouseClicked(int x, int y, int mouseEvent); + void mouseClicked(int x, int y, int mouseEvent); - public void drawToolTip(int mouseX, int mouseY); + void drawToolTip(int mouseX, int mouseY); - public boolean isValueSavable(); + boolean isValueSavable(); - public Object getValue(); + Object getValue(); } } diff --git a/src/main/java/net/minecraftforge/fml/client/config/GuiSelectStringEntries.java b/src/main/java/net/minecraftforge/fml/client/config/GuiSelectStringEntries.java index 23a6b4e09..e9130b899 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/GuiSelectStringEntries.java +++ b/src/main/java/net/minecraftforge/fml/client/config/GuiSelectStringEntries.java @@ -200,6 +200,6 @@ public class GuiSelectStringEntries extends GuiListExtended public static interface IGuiSelectStringListEntry extends GuiListExtended.IGuiListEntry { - public Object getValue(); + Object getValue(); } } diff --git a/src/main/java/net/minecraftforge/fml/client/config/IConfigElement.java b/src/main/java/net/minecraftforge/fml/client/config/IConfigElement.java index 75c4c6895..b6d581754 100644 --- a/src/main/java/net/minecraftforge/fml/client/config/IConfigElement.java +++ b/src/main/java/net/minecraftforge/fml/client/config/IConfigElement.java @@ -35,7 +35,7 @@ public interface IConfigElement /** * [Property, Category] Is this object a property object? */ - public boolean isProperty(); + boolean isProperty(); /** * This method returns a class that implements {@link IConfigEntry} or null. This class MUST @@ -47,7 +47,7 @@ public interface IConfigElement * @see GuiConfigEntries.DoubleEntry * @see GuiConfigEntries.IntegerEntry */ - public Class getConfigEntryClass(); + Class getConfigEntryClass(); /** * This method returns a class that implements {@link IArrayEntry}. This class MUST provide a constructor with the @@ -59,131 +59,131 @@ public interface IConfigElement * @see GuiEditArrayEntries.DoubleEntry * @see GuiEditArrayEntries.IntegerEntry */ - public Class getArrayEntryClass(); + Class getArrayEntryClass(); /** * [Property, Category] Gets the name of this object. */ - public String getName(); + String getName(); /** * [Category] Gets the qualified name of this object. This is typically only used for category objects. */ - public String getQualifiedName(); + String getQualifiedName(); /** * [Property, Category] Gets a language key for localization of config GUI entry names. If the same key is specified with .tooltip * appended to the end, that key will return a localized tooltip when the mouse hovers over the property label/category button. */ - public String getLanguageKey(); + String getLanguageKey(); /** * [Property, Category] Gets the comment for this object. Used for the tooltip if getLanguageKey() + ".tooltip" is not defined in the * .lang file. */ - public String getComment(); + String getComment(); /** * [Category] Gets this category's child categories/properties. */ - public List getChildElements(); + List getChildElements(); /** * [Property, Category] Gets the ConfigGuiType value corresponding to the type of this property object, or CONFIG_CATEGORY if this is a * category object. */ - public ConfigGuiType getType(); + ConfigGuiType getType(); /** * [Property] Is this property object a list? */ - public boolean isList(); + boolean isList(); /** * [Property] Does this list property have to remain a fixed length? */ - public boolean isListLengthFixed(); + boolean isListLengthFixed(); /** * [Property] Gets the max length of this list property, or -1 if the length is unlimited. */ - public int getMaxListLength(); + int getMaxListLength(); /** * [Property] Is this property value equal to the default value? */ - public boolean isDefault(); + boolean isDefault(); /** * [Property] Gets this property's default value. If this element is an array, this method should return a String * representation of that array using Arrays.toString() */ - public Object getDefault(); + Object getDefault(); /** * [Property] Gets this property's default values. */ - public Object[] getDefaults(); + Object[] getDefaults(); /** * [Property] Sets this property's value to the default value. */ - public void setToDefault(); + void setToDefault(); /** * [Property, Category] Whether or not this element is safe to modify while a world is running. For Categories return false if ANY properties * in the category are modifiable while a world is running, true if all are not. */ - public boolean requiresWorldRestart(); + boolean requiresWorldRestart(); /** * [Property, Category] Whether or not this element should be allowed to show on config GUIs. */ - public boolean showInGui(); + boolean showInGui(); /** * [Property, Category] Whether or not this element requires Minecraft to be restarted when changed. */ - public boolean requiresMcRestart(); + boolean requiresMcRestart(); /** * [Property] Gets this property value. */ - public Object get(); + Object get(); /** * [Property] Gets this property value as a list. Generally you should be sure of whether the property is a list before calling this. */ - public Object[] getList(); + Object[] getList(); /** * [Property] Sets this property's value. */ - public void set(Object value); + void set(Object value); /** * [Property] Sets this property's value to the specified array. */ - public void set(Object[] aVal); + void set(Object[] aVal); /** * [Property] Gets a String array of valid values for this property. This is generally used for String properties to allow the user to * select a value from a list of valid values. */ - public String[] getValidValues(); + String[] getValidValues(); /** * [Property] Gets this property's minimum value. */ - public Object getMinValue(); + Object getMinValue(); /** * [Property] Gets this property's maximum value. */ - public Object getMaxValue(); + Object getMaxValue(); /** * [Property] Gets a Pattern object used in String property input validation. */ - public Pattern getValidationPattern(); + Pattern getValidationPattern(); } diff --git a/src/main/java/net/minecraftforge/fml/client/registry/IRenderFactory.java b/src/main/java/net/minecraftforge/fml/client/registry/IRenderFactory.java index 277937316..a08de60d2 100644 --- a/src/main/java/net/minecraftforge/fml/client/registry/IRenderFactory.java +++ b/src/main/java/net/minecraftforge/fml/client/registry/IRenderFactory.java @@ -25,5 +25,5 @@ import net.minecraft.entity.Entity; public interface IRenderFactory { - public Render createRenderFor(RenderManager manager); + Render createRenderFor(RenderManager manager); } diff --git a/src/main/java/net/minecraftforge/fml/common/ILanguageAdapter.java b/src/main/java/net/minecraftforge/fml/common/ILanguageAdapter.java index 968e53c02..69f490c68 100644 --- a/src/main/java/net/minecraftforge/fml/common/ILanguageAdapter.java +++ b/src/main/java/net/minecraftforge/fml/common/ILanguageAdapter.java @@ -28,10 +28,10 @@ import net.minecraftforge.fml.relauncher.Side; import org.apache.logging.log4j.Level; public interface ILanguageAdapter { - public Object getNewInstance(FMLModContainer container, Class objectClass, ClassLoader classLoader, Method factoryMarkedAnnotation) throws Exception; - public boolean supportsStatics(); - public void setProxy(Field target, Class proxyTarget, Object proxy) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException; - public void setInternalProxies(ModContainer mod, Side side, ClassLoader loader); + Object getNewInstance(FMLModContainer container, Class objectClass, ClassLoader classLoader, Method factoryMarkedAnnotation) throws Exception; + boolean supportsStatics(); + void setProxy(Field target, Class proxyTarget, Object proxy) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException; + void setInternalProxies(ModContainer mod, Side side, ClassLoader loader); public static class ScalaAdapter implements ILanguageAdapter { @Override diff --git a/src/main/java/net/minecraftforge/fml/common/IWorldGenerator.java b/src/main/java/net/minecraftforge/fml/common/IWorldGenerator.java index 1ebccc85f..6155c856c 100644 --- a/src/main/java/net/minecraftforge/fml/common/IWorldGenerator.java +++ b/src/main/java/net/minecraftforge/fml/common/IWorldGenerator.java @@ -45,5 +45,5 @@ public interface IWorldGenerator * @param chunkProvider : additionalData[2] {@link IChunkProvider} that is requesting the world generation. * */ - public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider); + void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider); } diff --git a/src/main/java/net/minecraftforge/fml/common/Mod.java b/src/main/java/net/minecraftforge/fml/common/Mod.java index 97608a5d1..1cd6dc9b5 100644 --- a/src/main/java/net/minecraftforge/fml/common/Mod.java +++ b/src/main/java/net/minecraftforge/fml/common/Mod.java @@ -49,15 +49,15 @@ import net.minecraftforge.fml.relauncher.Side; * at pre-defined times during the loading of the game, based on where you have applied the {@link EventHandler} * annotation. * - *

This is a simple example of a Mod. It has the modId of "MyModId", the name of "My example mod", it is + *

This is a simple example of a Mod. It has the modId of "mymodid", the name of "My example mod", it is * version 1.0, and depends on FML being loaded. *

{@code
  * package mymod;
- * // Declare that this is a mod with modId "MyModId", name "My example mod", version "1.0" and dependency on FML.
- * {@literal @}Mod(modId="MyModId",name="My example mod",version="1.0",dependencies="required-after:FML")
+ * // Declare that this is a mod with modId "mymodid", name "My example mod", version "1.0" and dependency on FML.
+ * {@literal @}Mod(modId="mymodid",name="My example mod",version="1.0",dependencies="required-after:FML")
  * public class MyMod {
  *      // Populate this field with the instance of the mod created by FML
- *      {@literal @}Instance("MyModId")
+ *      {@literal @}Instance("mymodid")
  *      public MyMod instance;
  *
  *      // Mark this method for receiving an {@link FMLEvent} (in this case, it's the {@link FMLPreInitializationEvent})
@@ -95,6 +95,8 @@ public @interface Mod
      *
      * The version string here should be just numbers separated by dots,
      * to make specifying {@link #dependencies()} simple for other mods.
+     *
+     * See also: "Versioning" on Maven Wiki
      */
     String version() default "";
 
@@ -253,7 +255,7 @@ public @interface Mod
      */
     @Retention(RetentionPolicy.RUNTIME)
     @Target({})
-    public @interface CustomProperty
+    @interface CustomProperty
     {
         /**
          * A key. Should be unique.
@@ -307,7 +309,7 @@ public @interface Mod
      */
     @Retention(RetentionPolicy.RUNTIME)
     @Target(ElementType.METHOD)
-    public @interface EventHandler{}
+    @interface EventHandler{}
 
     /**
      * Populate the annotated field with the mod instance based on the specified ModId. This can be used
@@ -317,7 +319,7 @@ public @interface Mod
      */
     @Retention(RetentionPolicy.RUNTIME)
     @Target(ElementType.FIELD)
-    public @interface Instance {
+    @interface Instance {
         /**
          * The mod object to inject into this field
          */
@@ -336,7 +338,7 @@ public @interface Mod
      */
     @Retention(RetentionPolicy.RUNTIME)
     @Target(ElementType.FIELD)
-    public @interface Metadata {
+    @interface Metadata {
         /**
          * The mod id specifying the metadata to load here
          */
@@ -356,7 +358,7 @@ public @interface Mod
      */
     @Retention(RetentionPolicy.RUNTIME)
     @Target(ElementType.METHOD)
-    public @interface InstanceFactory {
+    @interface InstanceFactory {
     }
 
     /**
@@ -364,7 +366,7 @@ public @interface Mod
      */
     @Retention(RetentionPolicy.RUNTIME)
     @Target(ElementType.TYPE)
-    public @interface EventBusSubscriber {
+    @interface EventBusSubscriber {
         Side[] value() default { Side.CLIENT, Side.SERVER };
 
         /**
diff --git a/src/main/java/net/minecraftforge/fml/common/Optional.java b/src/main/java/net/minecraftforge/fml/common/Optional.java
index 7cfe975cb..9c1ec8023 100644
--- a/src/main/java/net/minecraftforge/fml/common/Optional.java
+++ b/src/main/java/net/minecraftforge/fml/common/Optional.java
@@ -50,7 +50,7 @@ public final class Optional {
          * Mark a list of interfaces for optional removal.
          * @return
          */
-        public Interface[] value();
+        Interface[] value();
     }
     /**
      * Used to remove optional interfaces
@@ -65,20 +65,20 @@ public final class Optional {
          * The fully qualified name of the interface to be stripped
          * @return the interface name
          */
-        public String iface();
+        String iface();
 
         /**
          * The modid that is required to be present for stripping NOT to occur
          * @return the modid
          */
-        public String modid();
+        String modid();
 
         /**
          * Strip references to this interface in method declarations? (Useful to kill synthetic methods from scala f.e.)
          *
          * @return if references should be stripped
          */
-        public boolean striprefs() default false;
+        boolean striprefs() default false;
     }
     /**
      * Used to remove optional methods
@@ -92,6 +92,6 @@ public final class Optional {
          * The modid that is required to be present for stripping NOT to occur
          * @return the modid
          */
-        public String modid();
+        String modid();
     }
 }
diff --git a/src/main/java/net/minecraftforge/fml/common/WorldAccessContainer.java b/src/main/java/net/minecraftforge/fml/common/WorldAccessContainer.java
index f817fc17b..66954852b 100644
--- a/src/main/java/net/minecraftforge/fml/common/WorldAccessContainer.java
+++ b/src/main/java/net/minecraftforge/fml/common/WorldAccessContainer.java
@@ -27,6 +27,6 @@ import net.minecraft.world.storage.*;
 
 public interface WorldAccessContainer
 {
-    public NBTTagCompound getDataForWriting(SaveHandler handler, WorldInfo info);
-    public void readData(SaveHandler handler, WorldInfo info, Map propertyMap, NBTTagCompound tag);
+    NBTTagCompound getDataForWriting(SaveHandler handler, WorldInfo info);
+    void readData(SaveHandler handler, WorldInfo info, Map propertyMap, NBTTagCompound tag);
 }
diff --git a/src/main/java/net/minecraftforge/fml/common/discovery/ITypeDiscoverer.java b/src/main/java/net/minecraftforge/fml/common/discovery/ITypeDiscoverer.java
index c39607609..4dcdd8526 100644
--- a/src/main/java/net/minecraftforge/fml/common/discovery/ITypeDiscoverer.java
+++ b/src/main/java/net/minecraftforge/fml/common/discovery/ITypeDiscoverer.java
@@ -29,5 +29,5 @@ public interface ITypeDiscoverer
     // main class part, followed by an optional $ and an "inner class" part. $ cannot be last, otherwise scala breaks
     public static Pattern classFile = Pattern.compile("[^\\s\\$]+(\\$[^\\s]+)?\\.class$");
 
-    public List discover(ModCandidate candidate, ASMDataTable table);
+    List discover(ModCandidate candidate, ASMDataTable table);
 }
diff --git a/src/main/java/net/minecraftforge/fml/common/event/FMLPreInitializationEvent.java b/src/main/java/net/minecraftforge/fml/common/event/FMLPreInitializationEvent.java
index 0151be952..1b87ec55e 100644
--- a/src/main/java/net/minecraftforge/fml/common/event/FMLPreInitializationEvent.java
+++ b/src/main/java/net/minecraftforge/fml/common/event/FMLPreInitializationEvent.java
@@ -45,7 +45,6 @@ import javax.annotation.Nullable;
  * Load any configuration data you might have {@link #getSuggestedConfigurationFile()}
  * Search for a version.properties file and load it {@link #getVersionProperties()}
  * Configure your {@link ModMetadata} programmatically {@link #getModMetadata()}
- * Register your blocks and items with the {@link net.minecraftforge.fml.common.registry.GameRegistry}
  * Discover parts of your mod by using annotation search {@link #getAsmData()}
  *
  * @see net.minecraftforge.fml.common.Mod.EventHandler for how to subscribe to this event
@@ -147,8 +146,6 @@ public class FMLPreInitializationEvent extends FMLStateEvent
 
     /**
      * Get a logger instance configured to write to the FML Log as a parent, identified by modid. Handy for mod logging!
-     * Configurations can be applied through the config/logging.properties file, specifying logging levels
-     * for your ModID. Use this!
      *
      * @return A logger
      */
diff --git a/src/main/java/net/minecraftforge/fml/common/eventhandler/IEventListener.java b/src/main/java/net/minecraftforge/fml/common/eventhandler/IEventListener.java
index ce6788406..e8e48d434 100644
--- a/src/main/java/net/minecraftforge/fml/common/eventhandler/IEventListener.java
+++ b/src/main/java/net/minecraftforge/fml/common/eventhandler/IEventListener.java
@@ -23,5 +23,5 @@ package net.minecraftforge.fml.common.eventhandler;
 
 public interface IEventListener
 {
-    public void invoke(Event event);
+    void invoke(Event event);
 }
diff --git a/src/main/java/net/minecraftforge/fml/common/eventhandler/SubscribeEvent.java b/src/main/java/net/minecraftforge/fml/common/eventhandler/SubscribeEvent.java
index b7d91d946..8c2d853f6 100644
--- a/src/main/java/net/minecraftforge/fml/common/eventhandler/SubscribeEvent.java
+++ b/src/main/java/net/minecraftforge/fml/common/eventhandler/SubscribeEvent.java
@@ -29,6 +29,6 @@ import static java.lang.annotation.ElementType.*;
 @Target(value = METHOD)
 public @interface SubscribeEvent
 {
-    public EventPriority priority() default EventPriority.NORMAL;
-    public boolean receiveCanceled() default false;
+    EventPriority priority() default EventPriority.NORMAL;
+    boolean receiveCanceled() default false;
 }
diff --git a/src/main/java/net/minecraftforge/fml/common/network/simpleimpl/IMessage.java b/src/main/java/net/minecraftforge/fml/common/network/simpleimpl/IMessage.java
index d32453ae0..66193736f 100644
--- a/src/main/java/net/minecraftforge/fml/common/network/simpleimpl/IMessage.java
+++ b/src/main/java/net/minecraftforge/fml/common/network/simpleimpl/IMessage.java
@@ -33,11 +33,11 @@ public interface IMessage {
      *
      * @param buf
      */
-    public void fromBytes(ByteBuf buf);
+    void fromBytes(ByteBuf buf);
 
     /**
      * Deconstruct your message into the supplied byte buffer
      * @param buf
      */
-    public void toBytes(ByteBuf buf);
+    void toBytes(ByteBuf buf);
 }
diff --git a/src/main/java/net/minecraftforge/fml/common/network/simpleimpl/IMessageHandler.java b/src/main/java/net/minecraftforge/fml/common/network/simpleimpl/IMessageHandler.java
index c8799a822..8611bc4fd 100644
--- a/src/main/java/net/minecraftforge/fml/common/network/simpleimpl/IMessageHandler.java
+++ b/src/main/java/net/minecraftforge/fml/common/network/simpleimpl/IMessageHandler.java
@@ -39,5 +39,5 @@ public interface IMessageHandler {
      * @param message The message
      * @return an optional return message
      */
-    public REPLY onMessage(REQ message, MessageContext ctx);
+    REPLY onMessage(REQ message, MessageContext ctx);
 }
diff --git a/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java b/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java
index 5ba592da2..dcf20ee11 100644
--- a/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java
+++ b/src/main/java/net/minecraftforge/fml/common/registry/GameRegistry.java
@@ -298,21 +298,21 @@ public class GameRegistry
          *
          * @return The registry name
          */
-        public String value();
+        String value();
 
         /**
          * The metadata or damage value for the itemstack, defaults to 0.
          *
          * @return the metadata value
          */
-        public int meta() default 0;
+        int meta() default 0;
 
         /**
          * The string serialized nbt value for the itemstack. Defaults to empty for no nbt.
          *
          * @return a nbt string
          */
-        public String nbt() default "";
+        String nbt() default "";
     }
 
     /**
diff --git a/src/main/java/net/minecraftforge/fml/common/registry/IEntityAdditionalSpawnData.java b/src/main/java/net/minecraftforge/fml/common/registry/IEntityAdditionalSpawnData.java
index 47aeeaa3c..d7b0fdbdb 100644
--- a/src/main/java/net/minecraftforge/fml/common/registry/IEntityAdditionalSpawnData.java
+++ b/src/main/java/net/minecraftforge/fml/common/registry/IEntityAdditionalSpawnData.java
@@ -33,7 +33,7 @@ public interface IEntityAdditionalSpawnData
      *
      * @param buffer The packet data stream
      */
-    public void writeSpawnData(ByteBuf buffer);
+    void writeSpawnData(ByteBuf buffer);
 
     /**
      * Called by the client when it receives a Entity spawn packet.
@@ -41,5 +41,5 @@ public interface IEntityAdditionalSpawnData
      *
      * @param additionalData The packet data stream
      */
-    public void readSpawnData(ByteBuf additionalData);
+    void readSpawnData(ByteBuf additionalData);
 }
diff --git a/src/main/java/net/minecraftforge/fml/common/registry/IThrowableEntity.java b/src/main/java/net/minecraftforge/fml/common/registry/IThrowableEntity.java
index be259472a..f4813fd93 100644
--- a/src/main/java/net/minecraftforge/fml/common/registry/IThrowableEntity.java
+++ b/src/main/java/net/minecraftforge/fml/common/registry/IThrowableEntity.java
@@ -31,11 +31,11 @@ public interface IThrowableEntity
      * Gets the entity that threw/created this entity.
      * @return The owner instance, Null if none.
      */
-    public Entity getThrower();
+    Entity getThrower();
 
     /**
      * Sets the entity that threw/created this entity.
      * @param entity The new thrower/creator.
      */
-    public void setThrower(Entity entity);
+    void setThrower(Entity entity);
 }
diff --git a/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java b/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java
index bd026f439..86bdf3ff1 100644
--- a/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java
+++ b/src/main/java/net/minecraftforge/fml/relauncher/CoreModManager.java
@@ -640,7 +640,7 @@ public class CoreModManager {
                 }
                 else if (deobfuscatedEnvironment && location == null) // This is probably a mod dev workspace
                 {
-                    FMLLog.log.info("Ignoring missing certificate for coremod {} ({}), as this is a probably dev workspace", coreModName, coreModClass);
+                    FMLLog.log.info("Ignoring missing certificate for coremod {} ({}), as this is probably a dev workspace", coreModName, coreModClass);
                 }
                 else // This is a probably a normal minecraft workspace - log at warn
                 {
diff --git a/src/main/java/net/minecraftforge/fml/relauncher/IFMLLoadingPlugin.java b/src/main/java/net/minecraftforge/fml/relauncher/IFMLLoadingPlugin.java
index 8d6a62efc..40df6a865 100644
--- a/src/main/java/net/minecraftforge/fml/relauncher/IFMLLoadingPlugin.java
+++ b/src/main/java/net/minecraftforge/fml/relauncher/IFMLLoadingPlugin.java
@@ -93,9 +93,9 @@ public interface IFMLLoadingPlugin
      */
     @Retention(RetentionPolicy.RUNTIME)
     @Target(ElementType.TYPE)
-    public @interface TransformerExclusions
+    @interface TransformerExclusions
     {
-        public String[] value() default "";
+        String[] value() default "";
     }
 
     /**
@@ -107,9 +107,9 @@ public interface IFMLLoadingPlugin
      */
     @Retention(RetentionPolicy.RUNTIME)
     @Target(ElementType.TYPE)
-    public @interface MCVersion
+    @interface MCVersion
     {
-        public String value() default "";
+        String value() default "";
     }
 
     /**
@@ -119,16 +119,16 @@ public interface IFMLLoadingPlugin
      */
     @Retention(RetentionPolicy.RUNTIME)
     @Target(ElementType.TYPE)
-    public @interface Name
+    @interface Name
     {
-        public String value() default "";
+        String value() default "";
     }
 
     @Retention(RetentionPolicy.RUNTIME)
     @Target(ElementType.TYPE)
-    public @interface DependsOn
+    @interface DependsOn
     {
-        public String[] value() default {};
+        String[] value() default {};
     }
 
     /**
@@ -138,9 +138,9 @@ public interface IFMLLoadingPlugin
      */
     @Retention(RetentionPolicy.RUNTIME)
     @Target(ElementType.TYPE)
-    public @interface SortingIndex
+    @interface SortingIndex
     {
-        public int value() default 0;
+        int value() default 0;
     }
 
 }
diff --git a/src/main/java/net/minecraftforge/fml/relauncher/SideOnly.java b/src/main/java/net/minecraftforge/fml/relauncher/SideOnly.java
index 869e674d2..d2b2c2769 100644
--- a/src/main/java/net/minecraftforge/fml/relauncher/SideOnly.java
+++ b/src/main/java/net/minecraftforge/fml/relauncher/SideOnly.java
@@ -44,5 +44,5 @@ import net.minecraftforge.fml.common.SidedProxy;
 @Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
 public @interface SideOnly
 {
-    public Side value();
+    Side value();
 }
diff --git a/src/main/java/net/minecraftforge/registries/IForgeRegistry.java b/src/main/java/net/minecraftforge/registries/IForgeRegistry.java
index 13ebab6b3..a2bd3b7a7 100644
--- a/src/main/java/net/minecraftforge/registries/IForgeRegistry.java
+++ b/src/main/java/net/minecraftforge/registries/IForgeRegistry.java
@@ -35,7 +35,7 @@ import javax.annotation.Nullable;
  */
 public interface IForgeRegistry> extends Iterable
 {
-    public Class getRegistrySuperType();
+    Class getRegistrySuperType();
 
     void register(V value);
 
diff --git a/src/test/java/net/minecraftforge/debug/ModelAnimationDebug.java b/src/test/java/net/minecraftforge/debug/ModelAnimationDebug.java
index 27f122e9d..18753a2b8 100644
--- a/src/test/java/net/minecraftforge/debug/ModelAnimationDebug.java
+++ b/src/test/java/net/minecraftforge/debug/ModelAnimationDebug.java
@@ -504,7 +504,7 @@ public class ModelAnimationDebug
 
         public void handleEvents(float time, Iterable pastEvents)
         {
-            // TODO Auto-generated method stub
+
         }
 
         @Override