mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 14:34:28 +00:00
Initial patch update to 1.12.
Some things to note: Netty is screwy so currently can't join single player. @cpw Crafting has been MAJORY reworked. The current GameRegistry functions are nooped, this is IN THE WORKS. Just need to move the recipe list to a full class registry, and then re implement the in-code recipe registration. Also, it IS advised that modders move to JSON, because ideally we'll see a S->C recipe syncing system in 1.13 which would allow servers to have custom recipes. OreDictionary currently 1/2 works, need to write a better algorithm for replacing ingredients. Please be patient Rendering: A lot of functions got a new float parameter, this is similar to partial ticks, needs more research
This commit is contained in:
1 parent
286777b824
commit
f1cca475ea
342 files changed
+3878
-2936
No files matched your search
@@ -22,8 +22,8 @@ package net.minecraftforge.fml.common;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.IChunkGenerator;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,6 +35,7 @@ import org.apache.logging.log4j.Level;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.Type;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -98,7 +99,7 @@ public class ASMModParser
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return Objects.toStringHelper("ASMAnnotationDiscoverer")
|
||||
return MoreObjects.toStringHelper("ASMAnnotationDiscoverer")
|
||||
.add("className", asmType.getClassName())
|
||||
.add("classVersion", classVersion)
|
||||
.add("superName", asmSuperType.getClassName())
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraftforge.fml.common.discovery.asm.ASMModParser.AnnotationType;
|
||||
|
||||
import org.objectweb.asm.Type;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ModAnnotation
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return Objects.toStringHelper("Annotation")
|
||||
return MoreObjects.toStringHelper("Annotation")
|
||||
.add("type",type)
|
||||
.add("name",asmType.getClassName())
|
||||
.add("member",member)
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ import org.apache.logging.log4j.Level;
|
||||
|
||||
// TODO build test suites to validate the behaviour of this stuff and make it less annoyingly magical
|
||||
public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet<?>> implements ChannelOutboundHandler {
|
||||
private static boolean DEBUG_HANDSHAKE = Boolean.parseBoolean(System.getProperty("fml.debugNetworkHandshake", "false"));
|
||||
private static boolean DEBUG_HANDSHAKE = Boolean.parseBoolean(System.getProperty("fml.debugNetworkHandshake", "true"));
|
||||
private static enum ConnectionState {
|
||||
OPENING, AWAITING_HANDSHAKE, HANDSHAKING, HANDSHAKECOMPLETE, FINALIZING, CONNECTED;
|
||||
}
|
||||
|
||||
@@ -54,8 +54,6 @@ import net.minecraftforge.fml.common.registry.EntityRegistry.EntityRegistration;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.apache.logging.log4j.core.helpers.Integers;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
@@ -64,8 +62,8 @@ import javax.annotation.Nullable;
|
||||
|
||||
public class FMLNetworkHandler
|
||||
{
|
||||
public static final int READ_TIMEOUT = Integers.parseInt(System.getProperty("fml.readTimeout","30"),30);
|
||||
public static final int LOGIN_TIMEOUT = Integers.parseInt(System.getProperty("fml.loginTimeout","600"),600);
|
||||
public static final int READ_TIMEOUT = Integer.parseInt(System.getProperty("fml.readTimeout","30"));
|
||||
public static final int LOGIN_TIMEOUT = Integer.parseInt(System.getProperty("fml.loginTimeout","600"));
|
||||
private static EnumMap<Side, FMLEmbeddedChannel> channelPair;
|
||||
|
||||
public static void fmlServerHandshake(PlayerList scm, NetworkManager manager, EntityPlayerMP player)
|
||||
|
||||
@@ -41,7 +41,6 @@ import net.minecraftforge.fml.common.network.handshake.NetworkDispatcher;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.core.helpers.Integers;
|
||||
|
||||
import com.google.common.collect.ConcurrentHashMultiset;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -58,7 +57,7 @@ public class FMLProxyPacket implements Packet<INetHandler> {
|
||||
private INetHandler netHandler;
|
||||
private NetworkDispatcher dispatcher;
|
||||
private static Multiset<String> badPackets = ConcurrentHashMultiset.create();
|
||||
private static int packetCountWarning = Integers.parseInt(System.getProperty("fml.badPacketCounter", "100"), 100);
|
||||
private static int packetCountWarning = Integer.parseInt(System.getProperty("fml.badPacketCounter", "100"));
|
||||
|
||||
public FMLProxyPacket(SPacketCustomPayload original)
|
||||
{
|
||||
|
||||
@@ -43,6 +43,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.nbt.JsonToNBT;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTException;
|
||||
@@ -51,8 +52,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.IChunkGenerator;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
import net.minecraftforge.fml.common.IFuelHandler;
|
||||
import net.minecraftforge.fml.common.IWorldGenerator;
|
||||
@@ -272,24 +273,25 @@ public class GameRegistry
|
||||
GameData.getMain().registerSubstitutionAlias(nameToSubstitute, type, object);
|
||||
}
|
||||
|
||||
public static void addRecipe(@Nonnull ItemStack output, Object... params)
|
||||
@Deprecated //TODO Make IRecipe a registry
|
||||
public static IRecipe addShapedRecipe(ResourceLocation name, @Nonnull ItemStack output, Object... params)
|
||||
{
|
||||
addShapedRecipe(output, params);
|
||||
throw new RuntimeException("TODO: Forge implement IRecipe registry");
|
||||
//return CraftingManager.addRecipe(output, params);
|
||||
}
|
||||
|
||||
public static IRecipe addShapedRecipe(@Nonnull ItemStack output, Object... params)
|
||||
@Deprecated //TODO Make IRecipe a registry
|
||||
public static void addShapelessRecipe(ResourceLocation name, @Nonnull ItemStack output, Ingredient... params)
|
||||
{
|
||||
return CraftingManager.getInstance().addRecipe(output, params);
|
||||
throw new RuntimeException("TODO: Forge implement IRecipe registry");
|
||||
//CraftingManager.getInstance().addShapelessRecipe(output, params);
|
||||
}
|
||||
|
||||
public static void addShapelessRecipe(@Nonnull ItemStack output, Object... params)
|
||||
@Deprecated //TODO Make IRecipe a registry
|
||||
public static void addRecipe(ResourceLocation name, IRecipe recipe)
|
||||
{
|
||||
CraftingManager.getInstance().addShapelessRecipe(output, params);
|
||||
}
|
||||
|
||||
public static void addRecipe(IRecipe recipe)
|
||||
{
|
||||
CraftingManager.getInstance().getRecipeList().add(recipe);
|
||||
throw new RuntimeException("TODO: Forge implement IRecipe registry");
|
||||
//CraftingManager.getInstance().getRecipeList().add(recipe);
|
||||
}
|
||||
|
||||
public static void addSmelting(Block input, @Nonnull ItemStack output, float xp)
|
||||
|
||||
Reference in new issue
Block a user