Further Java 8 cleanup (#4077)
This commit is contained in:
parent
3738a2e42b
commit
690c9bb76a
|
@ -1,6 +1,6 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/item/crafting/IRecipe.java
|
--- ../src-base/minecraft/net/minecraft/item/crafting/IRecipe.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/item/crafting/IRecipe.java
|
+++ ../src-work/minecraft/net/minecraft/item/crafting/IRecipe.java
|
||||||
@@ -4,35 +4,30 @@
|
@@ -4,35 +4,33 @@
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -19,7 +19,11 @@
|
||||||
|
|
||||||
ItemStack func_77571_b();
|
ItemStack func_77571_b();
|
||||||
|
|
||||||
NonNullList<ItemStack> func_179532_b(InventoryCrafting p_179532_1_);
|
- NonNullList<ItemStack> func_179532_b(InventoryCrafting p_179532_1_);
|
||||||
|
+ default NonNullList<ItemStack> func_179532_b(InventoryCrafting p_179532_1_)
|
||||||
|
+ {
|
||||||
|
+ return net.minecraftforge.common.ForgeHooks.defaultRecipeGetRemainingItems(p_179532_1_);
|
||||||
|
+ }
|
||||||
|
|
||||||
- @SideOnly(Side.CLIENT)
|
- @SideOnly(Side.CLIENT)
|
||||||
-default NonNullList<Ingredient> func_192400_c()
|
-default NonNullList<Ingredient> func_192400_c()
|
||||||
|
|
|
@ -929,8 +929,6 @@ public class ForgeHooks
|
||||||
* Default implementation of IRecipe.func_179532_b {getRemainingItems} because
|
* Default implementation of IRecipe.func_179532_b {getRemainingItems} because
|
||||||
* this is just copy pasted over a lot of recipes.
|
* this is just copy pasted over a lot of recipes.
|
||||||
*
|
*
|
||||||
* Another use case for java 8 but sadly we can't use it!
|
|
||||||
*
|
|
||||||
* @param inv Crafting inventory
|
* @param inv Crafting inventory
|
||||||
* @return Crafting inventory contents after the recipe.
|
* @return Crafting inventory contents after the recipe.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -199,6 +199,7 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC
|
||||||
if (config.getCategory(CATEGORY_GENERAL).containsKey("defaultSpawnFuzz")) config.getCategory(CATEGORY_GENERAL).remove("defaultSpawnFuzz");
|
if (config.getCategory(CATEGORY_GENERAL).containsKey("defaultSpawnFuzz")) config.getCategory(CATEGORY_GENERAL).remove("defaultSpawnFuzz");
|
||||||
if (config.getCategory(CATEGORY_GENERAL).containsKey("spawnHasFuzz")) config.getCategory(CATEGORY_GENERAL).remove("spawnHasFuzz");
|
if (config.getCategory(CATEGORY_GENERAL).containsKey("spawnHasFuzz")) config.getCategory(CATEGORY_GENERAL).remove("spawnHasFuzz");
|
||||||
if (config.getCategory(CATEGORY_GENERAL).containsKey("disableStitchedFileSaving")) config.getCategory(CATEGORY_GENERAL).remove("disableStitchedFileSaving");
|
if (config.getCategory(CATEGORY_GENERAL).containsKey("disableStitchedFileSaving")) config.getCategory(CATEGORY_GENERAL).remove("disableStitchedFileSaving");
|
||||||
|
if (config.getCategory(CATEGORY_CLIENT).containsKey("java8Reminder")) config.getCategory(CATEGORY_CLIENT).remove("java8Reminder");
|
||||||
|
|
||||||
prop = config.get(CATEGORY_GENERAL, "disableVersionCheck", false);
|
prop = config.get(CATEGORY_GENERAL, "disableVersionCheck", false);
|
||||||
prop.setComment("Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github.");
|
prop.setComment("Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github.");
|
||||||
|
|
|
@ -154,13 +154,6 @@ public class ShapedOreRecipe extends IForgeRegistryEntry.Impl<IRecipe> implement
|
||||||
return this.input;
|
return this.input;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Nonnull
|
|
||||||
public NonNullList<ItemStack> getRemainingItems(@Nonnull InventoryCrafting inv) //getRecipeLeftovers
|
|
||||||
{
|
|
||||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getWidth()
|
public int getWidth()
|
||||||
{
|
{
|
||||||
return width;
|
return width;
|
||||||
|
|
|
@ -131,13 +131,6 @@ public class ShapelessOreRecipe extends IForgeRegistryEntry.Impl<IRecipe> implem
|
||||||
return this.input;
|
return this.input;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Nonnull
|
|
||||||
public NonNullList<ItemStack> getRemainingItems(@Nonnull InventoryCrafting inv)
|
|
||||||
{
|
|
||||||
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nonnull
|
@Nonnull
|
||||||
public String getGroup()
|
public String getGroup()
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
/*package net.minecraftforge.fml.debug;
|
|
||||||
|
|
||||||
import net.minecraftforge.fml.common.Mod;
|
|
||||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
|
||||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
|
||||||
|
|
||||||
@Mod(modid = Java8Debug.MODID, version = Java8Debug.VERSION)
|
|
||||||
public class Java8Debug implements ITest
|
|
||||||
{
|
|
||||||
public static final String MODID = "Java8Debug";
|
|
||||||
public static final String VERSION = "1.0";
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void init(FMLInitializationEvent event)
|
|
||||||
{
|
|
||||||
System.out.println("Java8Debug mod loaded");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ITest
|
|
||||||
{
|
|
||||||
default int test()
|
|
||||||
{
|
|
||||||
return 42;
|
|
||||||
}
|
|
||||||
}*/
|
|
Loading…
Reference in New Issue