1.16.3 Update

Also included a bunch of warning cleanups.
This commit is contained in:
LexManos 2020-09-10 12:01:34 -07:00
parent 2353cd982a
commit c75eb9e7cf
73 changed files with 73 additions and 381 deletions

View file

@ -54,8 +54,8 @@ ext {
}
MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20200514-1.16'
MC_VERSION = '1.16.2'
MCP_VERSION = '20200812.004259'
MC_VERSION = '1.16.3'
MCP_VERSION = '20200910.110331'
}
project(':mcp') {
@ -197,7 +197,7 @@ project(':forge') {
}
ext {
SPEC_VERSION = '33.0' // This is overwritten by git tag, but here so dev time doesnt explode
SPEC_VERSION = '34.0' // This is overwritten by git tag, but here so dev time doesnt explode
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
// ForgeMC is a unique identifier for every MC version we have supported.
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.

View file

@ -6,7 +6,7 @@
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
loaderVersion="[33,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
loaderVersion="[34,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
license="All rights reserved"
@ -45,7 +45,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
# Does this dependency have to exist - if not, ordering below must be specified
mandatory=true #mandatory
# The version range of the dependency
versionRange="[33,)" #mandatory
versionRange="[34,)" #mandatory
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
ordering="NONE"
# Side this dependency is applied on - BOTH, CLIENT or SERVER
@ -54,6 +54,6 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn
[[dependencies.examplemod]]
modId="minecraft"
mandatory=true
versionRange="[1.16.2]"
versionRange="[1.16.3]"
ordering="NONE"
side="BOTH"

View file

@ -32,7 +32,7 @@
if (entity != null) {
double d0 = entity.func_70068_e(this);
int i = this.func_200600_R().func_220339_d().func_233671_f_();
@@ -878,6 +887,8 @@
@@ -879,6 +888,8 @@
}
public static EquipmentSlotType func_184640_d(ItemStack p_184640_0_) {
@ -41,7 +41,7 @@
Item item = p_184640_0_.func_77973_b();
if (item != Blocks.field_196625_cS.func_199767_j() && (!(item instanceof BlockItem) || !(((BlockItem)item).func_179223_d() instanceof AbstractSkullBlock))) {
if (item instanceof ArmorItem) {
@@ -885,7 +896,7 @@
@@ -886,7 +897,7 @@
} else if (item == Items.field_185160_cR) {
return EquipmentSlotType.CHEST;
} else {

View file

@ -25,6 +25,8 @@ import org.apache.logging.log4j.util.StringBuilderFormattable;
import java.util.function.Consumer;
public class AdvancedLogMessageAdapter implements Message, StringBuilderFormattable {
private static final long serialVersionUID = -8291754833965087436L;
private static final Object[] EMPTY = new Object[0];
private final Consumer<StringBuilder> logMessageBuilder;

View file

@ -19,20 +19,17 @@
package net.minecraftforge.fml.loading;
import com.google.common.collect.Streams;
import cpw.mods.modlauncher.api.LamdbaExceptionUtils;
import net.minecraftforge.fml.loading.moddiscovery.BackgroundScanHandler;
import net.minecraftforge.fml.loading.moddiscovery.ModFile;
import net.minecraftforge.fml.loading.moddiscovery.ModFileInfo;
import net.minecraftforge.fml.loading.moddiscovery.ModInfo;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* Master list of all mods <em>in the loading context. This class cannot refer outside the
@ -44,6 +41,7 @@ public class LoadingModList
private final List<ModFileInfo> modFiles;
private final List<ModInfo> sortedList;
private final Map<String, ModFileInfo> fileById;
@SuppressWarnings("unused")
private BackgroundScanHandler scanner;
private final List<EarlyLoadingException> preLoadErrors;
private List<ModFile> brokenFiles;

View file

@ -19,7 +19,6 @@
package net.minecraftforge.fml.loading;
import com.google.common.collect.Streams;
import com.google.common.graph.GraphBuilder;
import com.google.common.graph.MutableGraph;
import net.minecraftforge.forgespi.language.IModFileInfo;

View file

@ -29,7 +29,6 @@ import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

View file

@ -21,7 +21,6 @@ package net.minecraftforge.fml.loading.moddiscovery;
import com.google.common.collect.ImmutableMap;
import net.minecraftforge.fml.loading.progress.StartupMessageManager;
import net.minecraftforge.forgespi.Environment;
import net.minecraftforge.fml.loading.FMLLoader;
import net.minecraftforge.forgespi.language.IModFileInfo;
import net.minecraftforge.forgespi.language.IModInfo;

View file

@ -19,9 +19,6 @@
package net.minecraftforge.fml.loading.moddiscovery;
import com.electronwill.nightconfig.core.UnmodifiableConfig;
import net.minecraftforge.fml.loading.StringSubstitutor;
import net.minecraftforge.fml.loading.StringUtils;
import net.minecraftforge.forgespi.language.IConfigurable;
import net.minecraftforge.forgespi.language.IModFileInfo;
@ -145,4 +142,9 @@ public class ModFileInfo implements IModFileInfo, IConfigurable
{
return license;
}
public URL getIssueURL()
{
return issueURL;
}
}

View file

@ -22,12 +22,12 @@ package net.minecraftforge.client;
import com.google.common.collect.ImmutableList;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import net.minecraft.client.GameSettings;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.MouseHelper;
import net.minecraft.client.audio.ISound;
import net.minecraft.client.audio.SoundEngine;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.ClientBossInfo;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.screen.MainMenuScreen;
@ -73,8 +73,6 @@ import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.IBlockDisplayReader;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
import net.minecraftforge.client.event.*;
import net.minecraftforge.client.event.sound.PlaySoundEvent;
import net.minecraftforge.client.model.ModelLoader;
@ -135,8 +133,9 @@ public class ForgeHooksClient
case ENTITY:
if (!(target instanceof EntityRayTraceResult)) return false;
return MinecraftForge.EVENT_BUS.post(new DrawHighlightEvent.HighlightEntity(context, info, target, partialTicks, matrix, buffers));
default:
return MinecraftForge.EVENT_BUS.post(new DrawHighlightEvent(context, info, target, partialTicks, matrix, buffers));
}
return MinecraftForge.EVENT_BUS.post(new DrawHighlightEvent(context, info, target, partialTicks, matrix, buffers));
}
public static void dispatchRenderLast(WorldRenderer context, MatrixStack mat, float partialTicks, Matrix4f projectionMatrix, long finishTimeNano)
@ -223,54 +222,6 @@ public class ForgeHooksClient
return event.getFOV();
}
private static int skyX, skyZ;
private static boolean skyInit;
private static int skyRGBMultiplier;
public static int getSkyBlendColour(World world, BlockPos center)
{
if (center.getX() == skyX && center.getZ() == skyZ && skyInit)
{
return skyRGBMultiplier;
}
skyInit = true;
GameSettings settings = Minecraft.getInstance().gameSettings;
int[] ranges = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34 };
int distance = 0;
//TODO, GraphicsFanciness changed, and is getSkyBlendColour used still?
// if (settings.fancyGraphics && ranges.length > 0)
// {
// distance = ranges[MathHelper.clamp(settings.renderDistanceChunks, 0, ranges.length-1)];
// }
int r = 0;
int g = 0;
int b = 0;
int divider = 0;
for (int x = -distance; x <= distance; ++x)
{
for (int z = -distance; z <= distance; ++z)
{
BlockPos pos = center.add(x, 0, z);
Biome biome = world.getNoiseBiome(pos.getX(), pos.getY(), pos.getZ());
int colour = 0xFFFFFF; // TODO: biome.getSkyColorByTemp(biome.getTemperature(pos));
r += (colour & 0xFF0000) >> 16;
g += (colour & 0x00FF00) >> 8;
b += colour & 0x0000FF;
divider++;
}
}
int multiplier = (r / divider & 255) << 16 | (g / divider & 255) << 8 | b / divider & 255;
skyX = center.getX();
skyZ = center.getZ();
skyRGBMultiplier = multiplier;
return skyRGBMultiplier;
}
/**
* Initialization of Forge Renderers.
*/
@ -287,9 +238,9 @@ public class ForgeHooksClient
{
// render a warning at the top of the screen,
ITextComponent line = new TranslationTextComponent("forge.update.beta.1", TextFormatting.RED, TextFormatting.RESET).func_240699_a_(TextFormatting.RED);
gui.func_238472_a_(mStack, font, line, width / 2, 4 + (0 * (font.FONT_HEIGHT + 1)), -1);
AbstractGui.func_238472_a_(mStack, font, line, width / 2, 4 + (0 * (font.FONT_HEIGHT + 1)), -1);
line = new TranslationTextComponent("forge.update.beta.2");
gui.func_238472_a_(mStack, font, line, width / 2, 4 + (1 * (font.FONT_HEIGHT + 1)), -1);
AbstractGui.func_238472_a_(mStack, font, line, width / 2, 4 + (1 * (font.FONT_HEIGHT + 1)), -1);
}
String line = null;

View file

@ -20,15 +20,9 @@
package net.minecraftforge.client;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.BitSet;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
@ -37,7 +31,6 @@ import javax.annotation.Nonnull;
import net.minecraft.client.renderer.RenderType;
import org.apache.commons.lang3.tuple.Pair;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;

View file

@ -60,6 +60,7 @@ public abstract class EntityViewRenderEvent extends net.minecraftforge.eventbus.
private static class FogEvent extends EntityViewRenderEvent
{
private final FogType type;
@SuppressWarnings("resource")
protected FogEvent(FogType type, ActiveRenderInfo info, double renderPartialTicks)
{
super(Minecraft.getInstance().gameRenderer, info, renderPartialTicks);
@ -125,6 +126,7 @@ public abstract class EntityViewRenderEvent extends net.minecraftforge.eventbus.
private float green;
private float blue;
@SuppressWarnings("resource")
public FogColors(ActiveRenderInfo info, float partialTicks, float red, float green, float blue)
{
super(Minecraft.getInstance().gameRenderer, info, partialTicks);

View file

@ -27,11 +27,10 @@ import net.minecraft.client.gui.screen.Screen;
* This event is called before any Gui will open.
* If you don't want this to happen, cancel the event.
* If you want to override this Gui, simply set the gui variable to your own Gui.
*
* @author jk-5
*
*/
@net.minecraftforge.eventbus.api.Cancelable
public class GuiOpenEvent extends net.minecraftforge.eventbus.api.Event
@Cancelable
public class GuiOpenEvent extends Event
{
private Screen gui;
public GuiOpenEvent(Screen gui)

View file

@ -35,7 +35,7 @@ import javax.annotation.Nonnull;
* You can set canceled to do no further vanilla processing.
*/
@Cancelable
public class RenderItemInFrameEvent extends net.minecraftforge.eventbus.api.Event
public class RenderItemInFrameEvent extends Event
{
private final ItemStack item;
private final ItemFrameEntity entityItemFrame;

View file

@ -24,11 +24,8 @@ import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraft.client.renderer.entity.PlayerRenderer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.entity.player.PlayerEvent;
import javax.annotation.Nonnull;
public abstract class RenderPlayerEvent extends PlayerEvent
{
private final PlayerRenderer renderer;
@ -53,7 +50,7 @@ public abstract class RenderPlayerEvent extends PlayerEvent
public IRenderTypeBuffer getBuffers() { return buffers; }
public int getLight() { return light; }
@net.minecraftforge.eventbus.api.Cancelable
@Cancelable
public static class Pre extends RenderPlayerEvent
{
public Pre(PlayerEntity player, PlayerRenderer renderer, float tick, MatrixStack stack, IRenderTypeBuffer buffers, int light) {
@ -67,5 +64,5 @@ public abstract class RenderPlayerEvent extends PlayerEvent
super(player, renderer, tick, stack, buffers, light);
}
}
}

View file

@ -50,7 +50,6 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StringUtils;
import net.minecraft.util.Util;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.GameType;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
@ -60,6 +59,7 @@ import org.lwjgl.opengl.GL11;
import com.mojang.blaze3d.systems.RenderSystem;
@SuppressWarnings("deprecation")
public class ForgeIngameGui extends IngameGui
{
//private static final ResourceLocation VIGNETTE = new ResourceLocation("textures/misc/vignette.png");

View file

@ -64,6 +64,7 @@ public class NotificationModUpdateScreen extends Screen
}
}
@SuppressWarnings("deprecation")
@Override
public void func_230430_a_(MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
{

View file

@ -182,6 +182,7 @@ public abstract class ScrollPanel extends FocusableGui implements IRenderable
return false;
}
@SuppressWarnings("deprecation")
@Override
public void func_230430_a_(MatrixStack matrix, int mouseX, int mouseY, float partialTicks)
{

View file

@ -57,8 +57,6 @@ import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
// TODO: Write a model loader and test/fix as needed
public final class FluidModel implements IModelGeometry<FluidModel>

View file

@ -158,6 +158,7 @@ public final class ModelLoader extends ModelBakery
public static final class White {
public static final ResourceLocation LOCATION = new ResourceLocation("white");
private static TextureAtlasSprite instance = null;
@SuppressWarnings("deprecation")
public static final TextureAtlasSprite instance()
{
if (instance == null)

View file

@ -175,11 +175,13 @@ public class ModelLoaderRegistry
return blockMaterial(tex);
}
@SuppressWarnings("deprecation")
public static RenderMaterial blockMaterial(String location)
{
return new RenderMaterial(AtlasTexture.LOCATION_BLOCKS_TEXTURE, new ResourceLocation(location));
}
@SuppressWarnings("deprecation")
public static RenderMaterial blockMaterial(ResourceLocation location)
{
return new RenderMaterial(AtlasTexture.LOCATION_BLOCKS_TEXTURE, location);

View file

@ -61,6 +61,7 @@ public final class AnimationItemOverrideList extends ItemOverrideList
this.bakedTextureGetter = bakedTextureGetter;
}
@SuppressWarnings("resource")
@Override
public IBakedModel func_239290_a_(IBakedModel originalModel, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity)
{

View file

@ -1,141 +0,0 @@
/*
* Minecraft Forge
* Copyright (c) 2016-2020.
*
* 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.client.model.animation;
import java.util.List;
import java.util.Random;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.model.Model;
import net.minecraft.entity.Entity;
import net.minecraft.block.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.client.model.ModelLoaderRegistry;
import net.minecraftforge.client.model.pipeline.VertexLighterFlat;
import net.minecraftforge.client.model.pipeline.VertexBufferConsumer;
import net.minecraftforge.common.animation.Event;
import net.minecraftforge.common.animation.IEventHandler;
import net.minecraftforge.common.model.animation.CapabilityAnimation;
import org.lwjgl.opengl.GL11;
import com.mojang.blaze3d.platform.GlStateManager;
/**
* ModelBase that works with the Forge model system and animations.
* Some quirks are still left, deprecated for the moment.
*/
/*
@Deprecated
public class AnimationModelBase<T extends Entity> extends Model implements IEventHandler<T>
{
private final VertexLighterFlat lighter;
private final ResourceLocation modelLocation;
public AnimationModelBase(ResourceLocation modelLocation, VertexLighterFlat lighter)
{
this.modelLocation = modelLocation;
this.lighter = lighter;
}
@SuppressWarnings("unchecked")
//@Override
public void render(Entity entity, float limbSwing, float limbSwingSpeed, float timeAlive, float yawHead, float rotationPitch, float scale)
{
entity.getCapability(CapabilityAnimation.ANIMATION_CAPABILITY, null)
.map(cap -> cap.apply(timeAlive / 20))
.map(pair -> {
handleEvents((T) entity, timeAlive / 20, pair.getRight());
IUnbakedModel unbaked = ModelLoaderRegistry.getModelOrMissing(modelLocation);
// TODO where should uvlock data come from?
return unbaked.bake(ModelLoader.defaultModelGetter(), ModelLoader.defaultTextureGetter(), new BasicState(pair.getLeft(), false), DefaultVertexFormats.ITEM);
}).ifPresent(model -> drawModel(model, entity));
}
private void drawModel(IBakedModel bakedModel, Entity entity)
{
BlockPos pos = new BlockPos(entity.posX, entity.posY + entity.height, entity.posZ);
RenderHelper.disableStandardItemLighting();
GlStateManager.pushMatrix();
GlStateManager.rotatef(180, 0, 0, 1);
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder builder = tessellator.getBuffer();
builder.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
builder.setTranslation(-0.5, -1.5, -0.5);
lighter.setParent(new VertexBufferConsumer(builder));
lighter.setWorld(entity.world);
lighter.setState(Blocks.AIR.getDefaultState());
lighter.setBlockPos(pos);
boolean empty = true;
Random random = new Random();
random.setSeed(42);
List<BakedQuad> quads = bakedModel.getQuads(null, null, random);
if(!quads.isEmpty())
{
lighter.updateBlockInfo();
empty = false;
for(BakedQuad quad : quads)
{
quad.pipe(lighter);
}
}
for(Direction side : Direction.values())
{
random.setSeed(42);
quads = bakedModel.getQuads(null, side, random);
if(!quads.isEmpty())
{
if(empty) lighter.updateBlockInfo();
empty = false;
for(BakedQuad quad : quads)
{
quad.pipe(lighter);
}
}
}
// debug quad
//VertexBuffer.pos(0, 1, 0).color(0xFF, 0xFF, 0xFF, 0xFF).tex(0, 0).lightmap(240, 0).endVertex();
//VertexBuffer.pos(0, 1, 1).color(0xFF, 0xFF, 0xFF, 0xFF).tex(0, 1).lightmap(240, 0).endVertex();
//VertexBuffer.pos(1, 1, 1).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 1).lightmap(240, 0).endVertex();
//VertexBuffer.pos(1, 1, 0).color(0xFF, 0xFF, 0xFF, 0xFF).tex(1, 0).lightmap(240, 0).endVertex();
builder.setTranslation(0, 0, 0);
tessellator.draw();
GlStateManager.popMatrix();
RenderHelper.enableStandardItemLighting();
}
@Override
public void handleEvents(T instance, float time, Iterable<Event> pastEvents) {}
}
*/

View file

@ -50,7 +50,6 @@ import net.minecraftforge.client.model.animation.ModelBlockAnimation.Parameter.I
import net.minecraftforge.client.model.animation.ModelBlockAnimation.Parameter.Type;
import net.minecraftforge.client.model.animation.ModelBlockAnimation.Parameter.Variable;
import net.minecraftforge.common.animation.Event;
import net.minecraftforge.common.model.TransformationHelper;
import net.minecraftforge.common.model.animation.IClip;
import net.minecraftforge.common.model.animation.IJoint;
import net.minecraftforge.common.model.animation.IJointClip;

View file

@ -55,7 +55,7 @@ public class TileEntityRendererAnimation<T extends TileEntity> extends TileEntit
}
protected static BlockRendererDispatcher blockRenderer;
@Override
public void render(T te, float partialTick, MatrixStack mat, IRenderTypeBuffer renderer, int light, int otherlight)
{
@ -72,6 +72,7 @@ public class TileEntityRendererAnimation<T extends TileEntity> extends TileEntit
IModelData data = model.getModelData(world, pos, state, ModelDataManager.getModelData(te.getWorld(), pos));
if (data.hasProperty(Properties.AnimationProperty))
{
@SuppressWarnings("resource")
float time = Animation.getWorldTime(Minecraft.getInstance().world, partialTick);
cap
.map(asm -> asm.apply(time))

View file

@ -93,6 +93,7 @@ import net.minecraftforge.common.property.Properties;
* If you need more control over accepted resources - extend the class, and register a new instance with ModelLoaderRegistry.
*/
// TODO: Implement as a new model loader
@SuppressWarnings("unused")
public enum B3DLoader implements ISelectiveResourceReloadListener
{
INSTANCE;
@ -111,7 +112,6 @@ public enum B3DLoader implements ISelectiveResourceReloadListener
cache.clear();
}
@SuppressWarnings("unchecked")
public IUnbakedModel loadModel(ResourceLocation modelLocation) throws Exception
{
ResourceLocation file = new ResourceLocation(modelLocation.getNamespace(), modelLocation.getPath());
@ -445,6 +445,7 @@ public enum B3DLoader implements ISelectiveResourceReloadListener
return path;
}
@SuppressWarnings("deprecation")
@Override
public Collection<RenderMaterial> getTextures(Function<ResourceLocation, IUnbakedModel> modelGetter, Set<com.mojang.datafixers.util.Pair<String, String>> missingTextureErrors)
{
@ -459,6 +460,7 @@ public enum B3DLoader implements ISelectiveResourceReloadListener
return Collections.emptyList();
}
@SuppressWarnings("deprecation")
@Nullable
@Override
public IBakedModel bakeModel(ModelBakery bakery, Function<RenderMaterial, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform, ResourceLocation modelLocation)

View file

@ -39,7 +39,6 @@ import net.minecraftforge.client.model.geometry.IModelGeometryPart;
import net.minecraftforge.client.model.geometry.IMultipartModelGeometry;
import net.minecraftforge.client.model.pipeline.BakedQuadBuilder;
import net.minecraftforge.client.model.pipeline.IVertexConsumer;
import net.minecraftforge.common.model.TransformationHelper;
import org.apache.commons.lang3.tuple.Pair;
import javax.annotation.Nonnull;

View file

@ -23,7 +23,6 @@ import net.minecraft.entity.ai.attributes.Attribute;
import net.minecraft.entity.ai.attributes.RangedAttribute;
import net.minecraft.util.SoundEvent;
import net.minecraft.world.storage.IServerConfiguration;
import net.minecraft.world.storage.IWorldInfo;
import net.minecraft.world.storage.SaveFormat;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@ -31,14 +30,10 @@ import net.minecraftforge.fml.*;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLModIdMappingEvent;
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
import net.minecraftforge.fml.event.server.FMLServerStoppingEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.fml.loading.progress.StartupMessageManager;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.server.command.ConfigCommand;
import net.minecraftforge.server.command.ForgeCommand;
import net.minecraftforge.versions.forge.ForgeVersion;
import net.minecraftforge.versions.mcp.MCPVersion;

View file

@ -19,14 +19,11 @@
package net.minecraftforge.common;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.common.collect.Lists;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import net.minecraft.entity.merchant.villager.VillagerProfession;

View file

@ -32,7 +32,6 @@ import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import javax.annotation.Nullable;

View file

@ -24,8 +24,6 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionBrewing;
import javax.annotation.Nonnull;
/**
* Used in BrewingRecipeRegistry to maintain the vanilla behaviour.
*

View file

@ -46,7 +46,6 @@ import net.minecraft.item.crafting.Ingredient.IItemList;
import net.minecraft.item.crafting.Ingredient.TagList;
import net.minecraft.item.crafting.Ingredient.SingleItemList;
import net.minecraft.tags.ITag;
import net.minecraft.tags.Tag;
import net.minecraft.util.IItemProvider;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.Tags;
@ -90,7 +89,7 @@ public class ForgeRecipeProvider extends RecipeProvider
exclude(Blocks.DIAMOND_BLOCK);
exclude(Blocks.EMERALD_BLOCK);
exclude(Blocks.field_235397_ng_);
exclude(Blocks.COBBLESTONE_STAIRS);
exclude(Blocks.COBBLESTONE_SLAB);
exclude(Blocks.COBBLESTONE_WALL);

View file

@ -19,11 +19,8 @@
package net.minecraftforge.common.extensions;
import java.util.Collection;
import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
import javax.annotation.Nullable;
import net.minecraft.block.*;
@ -43,17 +40,13 @@ import net.minecraft.entity.projectile.WitherSkullEntity;
import net.minecraft.fluid.FluidState;
import net.minecraft.potion.Effects;
import net.minecraft.item.AxeItem;
import net.minecraft.item.DyeColor;
import net.minecraft.item.HoeItem;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ShovelItem;
import net.minecraft.pathfinding.PathNodeType;
import net.minecraft.state.Property;
import net.minecraft.state.properties.BedPart;
import net.minecraft.tags.BlockTags;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
@ -911,7 +904,7 @@ public interface IForgeBlock
else if(toolType == ToolType.HOE) return HoeItem.getHoeTillingState(state);
else return toolType == ToolType.SHOVEL ? ShovelItem.getShovelPathingState(state) : null;
}
/**
* Checks if a player or entity handles movement on this block like scaffolding.
*

View file

@ -24,7 +24,6 @@ import java.util.Set;
import javax.annotation.Nullable;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.entity.Entity;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.FluidState;
@ -98,6 +97,7 @@ public interface IForgeFluid
* @param explosion The explosion
* @return The amount of the explosion absorbed.
*/
@SuppressWarnings("deprecation")
default float getExplosionResistance(FluidState state, IBlockReader world, BlockPos pos, Explosion explosion)
{
return state.getExplosionResistance();

View file

@ -24,7 +24,6 @@ import java.util.function.Consumer;
import javax.annotation.Nullable;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Multimap;
import net.minecraft.block.BlockState;
@ -54,14 +53,11 @@ import net.minecraft.util.ActionResultType;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.IFormattableTextComponent;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.Tags;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.common.animation.ITimeValue;
// TODO review most of the methods in this "patch"
public interface IForgeItem
@ -241,6 +237,7 @@ public interface IForgeItem
* @param itemStack The current ItemStack
* @return The resulting ItemStack
*/
@SuppressWarnings("deprecation")
default ItemStack getContainerItem(ItemStack itemStack)
{
if (!hasContainerItem(itemStack))

View file

@ -21,7 +21,6 @@ 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;
public enum Models

View file

@ -28,14 +28,6 @@ import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.eventbus.api.GenericEvent;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.eventbus.api.GenericEvent;
/**
* Fired whenever an object with Capabilities support {currently TileEntity/Item/Entity)
* is created. Allowing for the attachment of arbitrary capability providers.

View file

@ -22,7 +22,6 @@ package net.minecraftforge.event;
import net.minecraft.world.Difficulty;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.eventbus.api.Event.HasResult;
@ -31,13 +30,11 @@ import net.minecraftforge.eventbus.api.Event.HasResult;
* <br>
* This event is fired via the {@link ForgeHooks#onDifficultyChange(EnumDifficulty, EnumDifficulty)}.<br>
* <br>
* This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.<br>
* <br>
* This event does not have a result. {@link HasResult}<br>
* <br>
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
**/
public class DifficultyChangeEvent extends net.minecraftforge.eventbus.api.Event
public class DifficultyChangeEvent extends Event
{
private final Difficulty difficulty;
private final Difficulty oldDifficulty;

View file

@ -28,7 +28,6 @@ import javax.annotation.Nullable;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.brigadier.CommandDispatcher;
import net.minecraft.block.NetherPortalBlock;
import net.minecraft.block.PortalSize;
import net.minecraft.block.BlockState;
import net.minecraft.client.util.ITooltipFlag;
@ -69,7 +68,6 @@ import net.minecraft.util.RegistryKey;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.RayTraceResult;
@ -81,8 +79,6 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraft.world.WorldSettings;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.MobSpawnInfo;
import net.minecraft.world.storage.IServerWorldInfo;
import net.minecraft.world.storage.PlayerData;

View file

@ -76,7 +76,7 @@ public class PotionBrewEvent extends Event
* <br>
* If this event is canceled, and items have been modified, PotionBrewEvent.Post will automatically be fired.
**/
@net.minecraftforge.eventbus.api.Cancelable
@Cancelable
public static class Pre extends PotionBrewEvent
{
public Pre(NonNullList<ItemStack> stacks)

View file

@ -36,17 +36,17 @@ import net.minecraftforge.eventbus.api.Event.HasResult;
* This event does not have a result. {@link HasResult}<br>
*<br>
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
*
*
*/
@net.minecraftforge.eventbus.api.Cancelable
@Cancelable
public class EntityMountEvent extends EntityEvent
{
private final Entity entityMounting;
private final Entity entityBeingMounted;
private final World worldObj;
private final boolean isMounting;
public EntityMountEvent(Entity entityMounting, Entity entityBeingMounted, World entityWorld, boolean isMounting)
@ -57,12 +57,12 @@ public class EntityMountEvent extends EntityEvent
this.worldObj = entityWorld;
this.isMounting = isMounting;
}
public boolean isMounting()
{
return isMounting;
}
public boolean isDismounting()
{
return !isMounting;

View file

@ -32,7 +32,7 @@ import net.minecraftforge.eventbus.api.Cancelable;
* This event is {@link net.minecraftforge.eventbus.api.Cancelable}. If canceled, taming the animal will fail.
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
*/
@net.minecraftforge.eventbus.api.Cancelable
@Cancelable
public class AnimalTameEvent extends LivingEvent
{
private final AnimalEntity animal;

View file

@ -28,8 +28,8 @@ import net.minecraftforge.eventbus.api.Cancelable;
* the amount of experience points dropped or completely prevent dropping of experience
* by canceling the event.
*/
@net.minecraftforge.eventbus.api.Cancelable
public class LivingExperienceDropEvent extends LivingEvent
@Cancelable
public class LivingExperienceDropEvent extends LivingEvent
{
private final PlayerEntity attackingPlayer;
private final int originalExperiencePoints;

View file

@ -40,7 +40,7 @@ import net.minecraft.entity.LivingEntity;
* <br>
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
**/
@net.minecraftforge.eventbus.api.Cancelable
@Cancelable
public class LivingFallEvent extends LivingEvent
{
private float distance;

View file

@ -39,7 +39,7 @@ import net.minecraft.entity.LivingEntity;
* <br>
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
**/
@net.minecraftforge.eventbus.api.Cancelable
@Cancelable
public class LivingHealEvent extends LivingEvent
{
private float amount;

View file

@ -22,7 +22,6 @@ package net.minecraftforge.event.entity.player;
import net.minecraft.advancements.Advancement;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
/**
* This event is fired when a player gets an advancement.

View file

@ -38,7 +38,7 @@ import javax.annotation.Nullable;
* ItemStack to your inventory and reducing the stack size to process.
* setResult(ALLOW) is the same as the old setHandled();
*/
@net.minecraftforge.eventbus.api.Cancelable
@Cancelable
@Event.HasResult
public class FillBucketEvent extends PlayerEvent
{

View file

@ -35,7 +35,7 @@ import java.util.List;
* Canceling the event will cause the player to receive no items at all.
* The hook will still take the damage specified
*/
@net.minecraftforge.eventbus.api.Cancelable
@Cancelable
public class ItemFishedEvent extends PlayerEvent
{
private final NonNullList<ItemStack> stacks = NonNullList.create();

View file

@ -23,7 +23,6 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerEntity.SleepResult;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import java.util.Optional;
@ -35,8 +34,6 @@ import java.util.Optional;
* <br>
* {@link #result} contains whether the player is able to sleep. <br>
* <br>
* This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.
* <br>
* This event does not have a result. {@link HasResult}
* <br>
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.

View file

@ -25,16 +25,13 @@ import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraftforge.fml.common.ICrashCallable;
import net.minecraftforge.fml.loading.moddiscovery.ModFileInfo;
import net.minecraftforge.forgespi.language.IModFileInfo;
import net.minecraftforge.forgespi.language.IModInfo;
import net.minecraftforge.forgespi.locating.IModFile;
import org.apache.logging.log4j.Logger;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.Callable;
import java.util.stream.Collectors;
public class CrashReportExtender
{

View file

@ -29,7 +29,6 @@ import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent;
import net.minecraftforge.fml.javafmlmod.FMLModContainer;
import org.apache.commons.lang3.time.StopWatch;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

View file

@ -19,12 +19,8 @@
package net.minecraftforge.fml;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;
import org.apache.logging.log4j.core.config.Configurator;
public class Logging
{

View file

@ -21,16 +21,12 @@ package net.minecraftforge.fml;
import com.google.common.collect.ImmutableList;
import cpw.mods.modlauncher.TransformingClassLoader;
import net.minecraft.util.registry.Bootstrap;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.common.data.ExistingFileHelper;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.fml.config.ConfigTracker;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.lifecycle.GatherDataEvent;
import net.minecraftforge.fml.event.lifecycle.IModBusEvent;
import net.minecraftforge.fml.event.lifecycle.ModLifecycleEvent;
import net.minecraftforge.fml.loading.FMLLoader;
import net.minecraftforge.fml.loading.FMLPaths;
import net.minecraftforge.fml.loading.LoadingModList;
@ -48,7 +44,6 @@ import net.minecraftforge.versions.forge.ForgeVersion;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
@ -56,7 +51,6 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.concurrent.Executor;

View file

@ -20,9 +20,7 @@
package net.minecraftforge.fml;
import com.google.common.collect.Streams;
import net.minecraft.util.StringUtils;
import net.minecraftforge.fml.loading.EarlyLoadingException;
import net.minecraftforge.fml.loading.moddiscovery.ModInfo;
import net.minecraftforge.forgespi.language.IModInfo;
import java.util.Arrays;
@ -34,6 +32,7 @@ import java.util.stream.Stream;
*/
public class ModLoadingException extends RuntimeException
{
private static final long serialVersionUID = 2048947398536935507L;
/**
* Mod Info for mod with issue
*/

View file

@ -21,7 +21,6 @@ package net.minecraftforge.fml;
import com.google.common.io.ByteStreams;
import com.google.gson.Gson;
import net.minecraftforge.common.ForgeConfig;
import net.minecraftforge.fml.loading.FMLConfig;
import net.minecraftforge.fml.loading.moddiscovery.ModInfo;
import net.minecraftforge.forgespi.language.IModInfo;
@ -45,23 +44,6 @@ import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import static net.minecraftforge.fml.VersionChecker.Status.*;
public class VersionChecker
@ -191,7 +173,6 @@ public class VersionChecker
throw new IOException("Too many redirects while trying to fetch " + url);
}
@SuppressWarnings("UnstableApiUsage")
private void process(IModInfo mod)
{
Status status = PENDING;

View file

@ -35,7 +35,6 @@ import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.gui.screen.MultiplayerScreen;
import net.minecraft.client.gui.screen.WorldSelectionScreen;
import net.minecraft.client.multiplayer.PlayerController;
import net.minecraft.util.text.StringTextComponent;
import net.minecraftforge.client.event.ClientPlayerNetworkEvent;
@ -52,7 +51,6 @@ import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;
import com.google.common.base.CharMatcher;
import com.google.common.base.MoreObjects;
import com.google.common.base.Strings;
@ -185,6 +183,7 @@ public class ClientHooks
return description.endsWith(":NOFML§r") ? description.substring(0, description.length() - 8)+"§r" : description;
}
@SuppressWarnings("resource")
static File getSavesDir()
{
return new File(Minecraft.getInstance().gameDir, "saves");

View file

@ -23,7 +23,6 @@ import static net.minecraftforge.fml.Logging.CORE;
import static net.minecraftforge.fml.loading.LogMarkers.LOADING;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.CompletableFuture;
@ -32,8 +31,6 @@ import java.util.concurrent.TimeUnit;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.resources.IFutureReloadListener;
import net.minecraft.resources.IPackNameDecorator;
import net.minecraft.resources.IReloadableResourceManager;
@ -42,7 +39,6 @@ import net.minecraft.resources.ResourcePackInfo;
import net.minecraft.resources.ResourcePackList;
import net.minecraft.util.datafix.codec.DatapackCodec;
import net.minecraftforge.fml.*;
import net.minecraftforge.fml.loading.moddiscovery.ModFileInfo;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

View file

@ -45,6 +45,7 @@ public class EarlyLoaderGUI {
this.window = window;
}
@SuppressWarnings("deprecation")
private void setupMatrix() {
RenderSystem.clear(256, Minecraft.IS_RUNNING_ON_MAC);
RenderSystem.matrixMode(5889);
@ -63,6 +64,7 @@ public class EarlyLoaderGUI {
renderMessages();
}
@SuppressWarnings("deprecation")
void renderTick() {
if (handledElsewhere) return;
int guiScale = window.calcGuiScale(0, false);
@ -116,6 +118,7 @@ public class EarlyLoaderGUI {
renderMessage(memory, memorycolour, 1, 1.0f);
}
@SuppressWarnings("deprecation")
void renderMessage(final String message, final float[] colour, int line, float alpha) {
GlStateManager.enableClientState(GL11.GL_VERTEX_ARRAY);
ByteBuffer charBuffer = MemoryUtil.memAlloc(message.length() * 270);
@ -124,9 +127,9 @@ public class EarlyLoaderGUI {
RenderSystem.enableBlend();
RenderSystem.disableTexture();
// STBEasyFont's quads are in reverse order or what OGGL expects, so it gets culled for facing the wrong way.
// STBEasyFont's quads are in reverse order or what OGGL expects, so it gets culled for facing the wrong way.
// So Disable culling https://github.com/MinecraftForge/MinecraftForge/pull/6824
RenderSystem.disableCull();
RenderSystem.disableCull();
GL14.glBlendColor(0,0,0, alpha);
RenderSystem.blendFunc(GlStateManager.SourceFactor.CONSTANT_ALPHA, GlStateManager.DestFactor.ONE_MINUS_CONSTANT_ALPHA);
RenderSystem.color3f(colour[0],colour[1],colour[2]);

View file

@ -20,28 +20,18 @@
package net.minecraftforge.fml.client.gui;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IReorderingProcessor;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.vector.Matrix4f;
import net.minecraft.util.text.ITextProperties;
import net.minecraftforge.client.event.RenderTooltipEvent;
import net.minecraftforge.common.MinecraftForge;
import org.lwjgl.opengl.GL11;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnull;
/**
@ -157,6 +147,7 @@ public class GuiUtils
* @param rightBorder the size of the box's right border
* @param zLevel the zLevel to draw at
*/
@SuppressWarnings("deprecation")
public static void drawContinuousTexturedBox(int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight,
int topBorder, int bottomBorder, int leftBorder, int rightBorder, float zLevel)
{
@ -426,6 +417,7 @@ public class GuiUtils
}
*/
@SuppressWarnings("deprecation")
public static void drawGradientRect(Matrix4f mat, int zLevel, int left, int top, int right, int bottom, int startColor, int endColor)
{
float startAlpha = (float)(startColor >> 24 & 255) / 255.0F;

View file

@ -409,6 +409,7 @@ public class ModListScreen extends Screen
List<String> lines = new ArrayList<>();
VersionChecker.CheckResult vercheck = VersionChecker.getResult(selectedMod);
@SuppressWarnings("resource")
Pair<ResourceLocation, Size2i> logoData = selectedMod.getLogoFile().map(logoFile->
{
TextureManager tm = this.field_230706_i_.getTextureManager();

View file

@ -22,7 +22,6 @@ package net.minecraftforge.fml.client.gui.widget;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.util.text.IFormattableTextComponent;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraftforge.fml.client.gui.GuiUtils;

View file

@ -88,7 +88,7 @@ public class FMLPlayMessages
SpawnEntity(Entity e)
{
this.entity = e;
this.typeId = Registry.ENTITY_TYPE.getId(e.getType());
this.typeId = Registry.ENTITY_TYPE.getId(e.getType()); //TODO: Codecs
this.entityId = e.getEntityId();
this.uuid = e.getUniqueID();
this.posX = e.getPosX();

View file

@ -55,13 +55,12 @@ import org.apache.maven.artifact.versioning.ArtifactVersion;
import com.google.common.io.ByteStreams;
import com.google.common.io.Files;
import net.minecraftforge.versions.forge.ForgeVersion;
import net.minecraftforge.fml.loading.FMLEnvironment;
public class LibraryManager
{
private static final Logger LOGGER = LogManager.getLogger();
public static final boolean DISABLE_EXTERNAL_MANIFEST = Boolean.parseBoolean(System.getProperty("forge.disable_external_manifest", "false"));
public static final boolean ENABLE_AUTO_MOD_MOVEMENT = Boolean.parseBoolean(System.getProperty("forge.enable_auto_mod_movement", "false"));
private static final String LIBRARY_DIRECTORY_OVERRIDE = System.getProperty("forge.lib_folder", null);
@ -447,7 +446,6 @@ public class LibraryManager
{
List<File> list = new ArrayList<>();
@SuppressWarnings("unchecked")
Map<String,String> args = Collections.emptyMap(); // TODO Launch args - do we need this? (Map<String, String>)Launcher.INSTANCE.blackboard().get("launchArgs");
String extraMods = args.get("--mods");
if (extraMods != null)

View file

@ -40,8 +40,6 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonSyntaxException;
import net.minecraftforge.versions.forge.ForgeVersion;
public class ModList
{
private static final Logger LOGGER = LogManager.getLogger();

View file

@ -19,17 +19,12 @@
package net.minecraftforge.fml.server;
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.*;
import net.minecraftforge.fml.loading.moddiscovery.ModFileInfo;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.concurrent.CompletableFuture;

View file

@ -37,13 +37,11 @@ import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands;
import net.minecraft.command.ISuggestionProvider;
import net.minecraft.command.arguments.DimensionArgument;
import net.minecraft.entity.Entity;
import net.minecraft.util.RegistryKey;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.DimensionType;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.registries.ForgeRegistries;

View file

@ -24,9 +24,6 @@ import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.loading.moddiscovery.ModFileInfo;
import net.minecraftforge.fml.loading.moddiscovery.ModInfo;
import java.util.stream.Collectors;
public class CommandModList {

View file

@ -22,7 +22,6 @@ package net.minecraftforge.server.permission;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.MinecraftServer;
import net.minecraftforge.fml.server.ServerLifecycleHooks;
import net.minecraftforge.fml.server.ServerModLoader;
import net.minecraftforge.server.permission.context.IContext;
import javax.annotation.Nullable;

View file

@ -35,6 +35,7 @@ public class AreaContext extends PlayerContext
area = Preconditions.checkNotNull(aabb, "AxisAlignedBB can't be null in AreaContext!");
}
@SuppressWarnings("unchecked")
@Override
@Nullable
public <T> T get(ContextKey<T> key)

View file

@ -70,7 +70,6 @@ import net.minecraft.tags.BlockTags;
import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.world.biome.Biomes;
import net.minecraftforge.client.model.generators.BlockStateProvider;
import net.minecraftforge.client.model.generators.ConfiguredModel;
import net.minecraftforge.client.model.generators.ItemModelProvider;
@ -181,8 +180,6 @@ public class DataGeneratorTest
public static class Tags extends BlockTagsProvider
{
private Set<ResourceLocation> filter;
public Tags(DataGenerator gen, ExistingFileHelper existingFileHelper)
{
super(gen, MODID, existingFileHelper);

View file

@ -23,23 +23,17 @@ import net.minecraft.block.DispenserBlock;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.AbstractClientPlayerEntity;
import net.minecraft.client.renderer.entity.IEntityRenderer;
import net.minecraft.client.renderer.entity.PlayerRenderer;
import net.minecraft.client.renderer.entity.layers.ElytraLayer;
import net.minecraft.client.renderer.entity.model.ElytraModel;
import net.minecraft.client.renderer.entity.model.PlayerModel;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.*;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.thread.EffectiveSide;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.registries.DeferredRegister;

View file

@ -22,7 +22,6 @@ package net.minecraftforge.userdev;
import cpw.mods.modlauncher.api.IEnvironment;
import cpw.mods.modlauncher.api.ILaunchHandlerService;
import cpw.mods.modlauncher.api.ITransformingClassLoader;
import cpw.mods.modlauncher.api.ITransformingClassLoaderBuilder;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.loading.FMLCommonLaunchHandler;
import net.minecraftforge.fml.loading.LibraryFinder;

View file

@ -21,10 +21,7 @@ package net.minecraftforge.userdev;
import cpw.mods.modlauncher.api.ILaunchHandlerService;
import cpw.mods.modlauncher.api.ITransformingClassLoader;
import cpw.mods.modlauncher.api.ITransformingClassLoaderBuilder;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.loading.LibraryFinder;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;