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
{