Update to 1.17

Update to Official classnames
Patchwork
Make the game compile and run
Merge in the new HUD overlay API
Merge in the new render properties API
PEEL
Use Gradle 7.2 snapshot to fix eclipse integration bug in 7.1, Would use 7.0 but FG needs 7.1 for some reason.
New FML installer
Update to 1.17.1

Co-authored-by: LexManos <[email protected]>
Co-authored-by: SizableShrimp <[email protected]>
Co-authored-by: cpw <[email protected]>
Co-authored-by: Curle <[email protected]>
Co-authored-by: Unnoen <[email protected]>
Co-authored-by: covers1624 <[email protected]>
Co-authored-by: DaemonUmbra <[email protected]>
Co-authored-by: gigaherz <[email protected]>
Signed-off-by: SizableShrimp <[email protected]>
This commit is contained in:
authored and Curle committed 2021-07-22 19:57:02 +01:00
1 parent 064ae6961b
commit be5446b91c
1990 files changed
+35661 -37544

No files matched your search

@@ -1,46 +0,0 @@
/*
* Minecraft Forge
* Copyright (c) 2016-2021.
*
* 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
*/
package net.minecraftforge.resource;
import java.util.function.Predicate;
import net.minecraft.resources.IResourceManager;
import net.minecraft.resources.IResourceManagerReloadListener;
public interface ISelectiveResourceReloadListener extends IResourceManagerReloadListener
{
@Override
default void onResourceManagerReload(IResourceManager resourceManager)
{
// For compatibility, call the selective version from the non-selective function
onResourceManagerReload(resourceManager, SelectiveReloadStateHandler.INSTANCE.get());
}
/**
* A version of onResourceManager that selectively chooses {@link net.minecraftforge.resource.IResourceType}s
* to reload.
* When using this, the given predicate should be called to ensure the relevant resources should
* be reloaded at this time.
*
* @param resourceManager the resource manager being reloaded
* @param resourcePredicate predicate to test whether any given resource type should be reloaded
*/
void onResourceManagerReload(IResourceManager resourceManager, Predicate<IResourceType> resourcePredicate);
}
@@ -1,85 +0,0 @@
/*
* Minecraft Forge
* Copyright (c) 2016-2021.
*
* 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
*/
package net.minecraftforge.resource;
import javax.annotation.Nullable;
import java.util.function.Predicate;
import net.minecraft.resources.IResourceManagerReloadListener;
import net.minecraftforge.common.ForgeConfig;
/**
* Handles reload parameters for selective loaders.
*/
public enum SelectiveReloadStateHandler
{
INSTANCE;
@Nullable
private Predicate<IResourceType> currentPredicate = null;
/***
* Pushes a resource type predicate for the current reload.
* Should only be called when initiating a resource reload.
* If a reload is already in progress when this is called, an exception will be thrown.
*
* @param resourcePredicate the resource requirement predicate for the current reload
*/
public void beginReload(Predicate<IResourceType> resourcePredicate)
{
if (this.currentPredicate != null)
{
throw new IllegalStateException("Recursive resource reloading detected");
}
this.currentPredicate = resourcePredicate;
}
/**
* Gets the current reload resource predicate for the initiated reload.
*
* @return the active reload resource predicate, or an accepting one if none in progress
*/
public Predicate<IResourceType> get()
{
if (this.currentPredicate == null || !ForgeConfig.CLIENT.selectiveResourceReloadEnabled.get())
{
return ReloadRequirements.all();
}
return this.currentPredicate;
}
/**
* Finishes the current reload and deletes the previously added reload predicate.
*/
public void endReload()
{
this.currentPredicate = null;
}
//Helpder function for testing if vanilla listeners should reload.
@SuppressWarnings("deprecation")
public boolean test(IResourceManagerReloadListener listener)
{
IResourceType type = listener.getResourceType();
return type == null || get() == null || get().test(type);
}
}
@@ -21,6 +21,7 @@
@MethodsReturnNonnullByDefault
package net.minecraftforge.resource;
import net.minecraft.MethodsReturnNonnullByDefault;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;