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:
LexManos authored and cpw committed 2017-06-10 22:22:02 -04:00
1 parent 286777b824
commit f1cca475ea
342 files changed
+3878 -2936

No files matched your search

@@ -145,7 +145,7 @@ public class DynBucketTest
//GameRegistry.registerItem(dynBucket, "dynbucket");
GameRegistry.register(dynBottle);
ItemStack filledBucket = UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, TestFluid.instance);
GameRegistry.addShapelessRecipe(new ItemStack(Items.DIAMOND), filledBucket);
//GameRegistry.addShapelessRecipe(new ItemStack(Items.DIAMOND), filledBucket);
proxy.setupModels();
//MinecraftForge.EVENT_BUS.register(this);
@@ -236,8 +236,10 @@ public class DynBucketTest
}
@Override
public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> subItems)
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems)
{
if (!this.func_194125_a(tab))
return;
for (int i = 0; i < 4; i++)
{
ItemStack bucket = new ItemStack(this, 1, i);
@@ -134,7 +134,7 @@ public class FluidHandlerTest
{
for (CreativeTabs tab : item.getCreativeTabs())
{
item.getSubItems(item, tab, list);
item.getSubItems(tab, list);
}
}
return list;
@@ -6,6 +6,7 @@ import net.minecraft.client.renderer.ItemMeshDefinition;
import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@@ -17,6 +18,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
@@ -235,7 +237,7 @@ public class FluidPlacementTest
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
public void addInformation(ItemStack stack, @Nullable World playerIn, List<String> tooltip, ITooltipFlag advanced)
{
FluidStack fluid = getFluid(stack);
if (fluid != null)
@@ -245,8 +247,10 @@ public class FluidPlacementTest
}
@Override
public void getSubItems(@Nonnull Item itemIn, @Nullable CreativeTabs tab, @Nonnull NonNullList<ItemStack> subItems)
public void getSubItems(@Nullable CreativeTabs tab, @Nonnull NonNullList<ItemStack> subItems)
{
if (!this.func_194125_a(tab))
return;
Fluid[] fluids = new Fluid[]{FluidRegistry.WATER, FluidRegistry.LAVA, FiniteFluid.instance, ModelFluidDebug.TestFluid.instance};
// add 16 variable fillings
for (Fluid fluid : fluids)
@@ -278,4 +282,4 @@ public class FluidPlacementTest
return new FluidHandlerItemStack.SwapEmpty(stack, new ItemStack(EmptyFluidContainer.instance), 1000);
}
}
}
}
@@ -113,7 +113,7 @@ public class ItemTileDebug
}
@Override
public void renderTileEntityAt(CustomTileEntity p_180535_1_, double x, double y, double z, float p_180535_8_, int p_180535_9_)
public void func_192841_a(CustomTileEntity p_180535_1_, double x, double y, double z, float p_180535_8_, int p_180535_9_, float partial)
{
glPushMatrix();
glTranslated(x, y, z);
@@ -39,7 +39,7 @@ public class NBTShareTagItemTest
NBTTagCompound craftedNBT = new NBTTagCompound();
craftedNBT.setBoolean("crafted", true);
crafted.setTagCompound(craftedNBT);
CraftingManager.getInstance().addShapelessRecipe(crafted, new ItemStack(Items.STICK));
//CraftingManager.getInstance().addShapelessRecipe(crafted, new ItemStack(Items.STICK));
}
public static class ShareTagItem extends Item
@@ -61,9 +61,11 @@ public class NBTShareTagItemTest
}
@Override
public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> subItems)
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems)
{
ItemStack creativeMenuItem = new ItemStack(itemIn);
if (!this.func_194125_a(tab))
return;
ItemStack creativeMenuItem = new ItemStack(this);
NBTTagCompound creativeMenuNBT = new NBTTagCompound();
creativeMenuNBT.setBoolean("creativeMenu", true);
creativeMenuItem.setTagCompound(creativeMenuNBT);
@@ -2,6 +2,7 @@ package net.minecraftforge.debug;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayer.SleepResult;
import net.minecraft.item.Item;
@@ -79,9 +80,9 @@ public class NoBedSleepingTest
public static class EventHandler
{
@SubscribeEvent
public void onEntityConstruct(AttachCapabilitiesEvent.Entity evt)
public void onEntityConstruct(AttachCapabilitiesEvent<Entity> evt)
{
if (!(evt.getEntity() instanceof EntityPlayer))
if (!(evt.getObject() instanceof EntityPlayer))
{
return;
}
@@ -3,9 +3,9 @@ package net.minecraftforge.debug;
import gnu.trove.set.TIntSet;
import gnu.trove.set.hash.TIntHashSet;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.VertexBuffer;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
@@ -81,7 +81,7 @@ public class PotionRegistryDebug
float a = (float) (potion.getLiquidColor() & 255) / 255.0F;
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer buf = tessellator.getBuffer();
BufferBuilder buf = tessellator.getBuffer();
buf.begin(7, DefaultVertexFormats.POSITION_TEX);
GlStateManager.color(r, g, b, a);
buf.pos((double) x, (double) (y + height), 0.0D).tex(sprite.getMinU(), sprite.getMaxV()).endVertex();
@@ -110,7 +110,7 @@ public class PotionRegistryDebug
float b = (float) (potion.getLiquidColor() >> 8 & 255) / 255.0F;
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer buf = tessellator.getBuffer();
BufferBuilder buf = tessellator.getBuffer();
buf.begin(7, DefaultVertexFormats.POSITION_TEX);
GlStateManager.color(r, g, b, alpha);
buf.pos((double) x, (double) (y + height), 0.0D).tex(sprite.getMinU(), sprite.getMaxV()).endVertex();
@@ -4,6 +4,7 @@ import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.Capability.IStorage;
@@ -41,9 +42,9 @@ public class WorldCapabilityRainTimerTest
public static class NormalEventHandler
{
@SubscribeEvent
public void attatchTimer(AttachCapabilitiesEvent.World event)
public void attatchTimer(AttachCapabilitiesEvent<World> event)
{
if (!event.getWorld().isRemote && !event.getWorld().provider.hasNoSky())
if (!event.getObject().isRemote && !event.getObject().provider.hasNoSky())
{
event.addCapability(new ResourceLocation(MODID, "rainTimer"), new RainTimerProvider());
}