mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-23 21:49:46 +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
@@ -1,130 +0,0 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* This software is provided under the terms of the Minecraft Forge Public
|
||||
* License v1.0.
|
||||
*/
|
||||
|
||||
package net.minecraftforge.common;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.stats.Achievement;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class AchievementPage
|
||||
{
|
||||
private String name;
|
||||
private LinkedList<Achievement> achievements;
|
||||
|
||||
public AchievementPage(String name, Achievement... achievements)
|
||||
{
|
||||
this.name = name;
|
||||
this.achievements = new LinkedList<Achievement>(Arrays.asList(achievements));
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public List<Achievement> getAchievements()
|
||||
{
|
||||
return achievements;
|
||||
}
|
||||
|
||||
private static LinkedList<AchievementPage> achievementPages = new LinkedList<AchievementPage>();
|
||||
|
||||
/**
|
||||
* Registers an achievement page.
|
||||
* @param page The page.
|
||||
*/
|
||||
public static void registerAchievementPage(AchievementPage page)
|
||||
{
|
||||
if (getAchievementPage(page.getName()) != null)
|
||||
{
|
||||
throw new RuntimeException("Duplicate achievement page name \"" + page.getName() + "\"!");
|
||||
}
|
||||
achievementPages.add(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* Will return an achievement page by its index on the list.
|
||||
* @param index The page's index.
|
||||
* @return the achievement page corresponding to the index or null if invalid index
|
||||
*/
|
||||
public static AchievementPage getAchievementPage(int index)
|
||||
{
|
||||
return achievementPages.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Will return an achievement page by its name.
|
||||
* @param name The page's name.
|
||||
* @return the achievement page with the given name or null if no such page
|
||||
*/
|
||||
@Nullable
|
||||
public static AchievementPage getAchievementPage(String name)
|
||||
{
|
||||
for (AchievementPage page : achievementPages)
|
||||
{
|
||||
if (page.getName().equals(name))
|
||||
{
|
||||
return page;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will return the list of achievement pages.
|
||||
* @return the list's size
|
||||
*/
|
||||
public static Set<AchievementPage> getAchievementPages()
|
||||
{
|
||||
return new HashSet<AchievementPage>(achievementPages);
|
||||
}
|
||||
|
||||
/**
|
||||
* Will return whether an achievement is in any page or not.
|
||||
* @param achievement The achievement.
|
||||
*/
|
||||
public static boolean isAchievementInPages(Achievement achievement)
|
||||
{
|
||||
for (AchievementPage page : achievementPages)
|
||||
{
|
||||
if (page.getAchievements().contains(achievement))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String getTitle(int index)
|
||||
{
|
||||
return index == -1 ? "Minecraft" : getAchievementPage(index).getName();
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,7 @@ import java.util.Map;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import net.minecraft.crash.ICrashReportDetail;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.stats.StatList;
|
||||
@@ -523,6 +524,7 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC
|
||||
{
|
||||
OreDictionary.rebakeMap();
|
||||
StatList.reinit();
|
||||
Ingredient.invalidateAll();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,17 +54,17 @@ public class ForgeVersion
|
||||
// This is Forge's Mod Id, used for the ForgeModContainer and resource locations
|
||||
public static final String MOD_ID = "forge";
|
||||
//This number is incremented every time we remove deprecated code/major API changes, never reset
|
||||
public static final int majorVersion = 13;
|
||||
public static final int majorVersion = 14;
|
||||
//This number is incremented every minecraft release, never reset
|
||||
public static final int minorVersion = 20;
|
||||
public static final int minorVersion = 21;
|
||||
//This number is incremented every time a interface changes or new major feature is added, and reset every Minecraft version
|
||||
public static final int revisionVersion = 0;
|
||||
//This number is incremented every time Jenkins builds Forge, and never reset. Should always be 0 in the repo code.
|
||||
public static final int buildVersion = 0;
|
||||
// This is the minecraft version we're building for - used in various places in Forge/FML code
|
||||
public static final String mcVersion = "1.11.2";
|
||||
public static final String mcVersion = "1.12";
|
||||
// This is the MCP data version we're using
|
||||
public static final String mcpVersion = "9.38";
|
||||
public static final String mcpVersion = "9.40";
|
||||
@SuppressWarnings("unused")
|
||||
private static Status status = PENDING;
|
||||
@SuppressWarnings("unused")
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
package net.minecraftforge.common.animation;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.MoreObjects;
|
||||
|
||||
|
||||
/**
|
||||
@@ -60,6 +60,6 @@ public final class Event implements Comparable<Event>
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return Objects.toStringHelper(getClass()).add("event", event).add("offset", offset).toString();
|
||||
return MoreObjects.toStringHelper(getClass()).add("event", event).add("offset", offset).toString();
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@
|
||||
package net.minecraftforge.common.model;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterators;
|
||||
import com.google.common.collect.UnmodifiableIterator;
|
||||
|
||||
@@ -38,6 +39,7 @@ public enum Models
|
||||
{
|
||||
return ((HiddenModelPart) part).getPath().iterator();
|
||||
}
|
||||
return Iterators.emptyIterator();
|
||||
ImmutableSet<String> ret = ImmutableSet.of();
|
||||
return ret.iterator();
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.commons.lang3.tuple.Triple;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
@@ -508,7 +508,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
|
||||
}
|
||||
|
||||
/*
|
||||
* Divides m by m33, sets last row to (0, 0, 0, 1), extracts linear and translation parts
|
||||
* Divides m by m33, sets last row to (0, 0, 0, 1), extracts linear and translation parts
|
||||
*/
|
||||
public static Pair<Matrix3f, Vector3f> toAffine(Matrix4f m)
|
||||
{
|
||||
@@ -607,7 +607,7 @@ public final class TRSRTransformation implements IModelState, ITransformation
|
||||
public String toString()
|
||||
{
|
||||
genCheck();
|
||||
return Objects.toStringHelper(this.getClass())
|
||||
return MoreObjects.toStringHelper(this.getClass())
|
||||
.add("matrix", matrix)
|
||||
.add("translation", translation)
|
||||
.add("leftRot", leftRot)
|
||||
|
||||
@@ -2,7 +2,7 @@ package net.minecraftforge.common.util;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.WorldProvider;
|
||||
import net.minecraft.world.WorldSavedData;
|
||||
import net.minecraft.world.storage.WorldSavedData;
|
||||
|
||||
public class WorldCapabilityData extends WorldSavedData
|
||||
{
|
||||
@@ -56,4 +56,4 @@ public class WorldCapabilityData extends WorldSavedData
|
||||
this.capNBT = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user