Update to 1.15

Due to the massive rendering changes, certain features, such as emissive item rendering and the forge block rendering/lighting pipeline are currently disabled.

Co-authored-by: David Quintana <[email protected]>
Co-authored-by: tterrag <[email protected]>
Co-authored-by: Unnoen <[email protected]>
This commit is contained in:
authored and David Quintana committed 2019-12-17 03:38:12 +01:00
1 parent 9e5ecaaf75
commit 1933d05e36
565 files changed
+11114 -13142

No files matched your search

@@ -25,6 +25,8 @@ import java.util.*;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.block.NetherPortalBlock;
import net.minecraft.block.BlockState;
import net.minecraft.client.util.ITooltipFlag;
@@ -72,6 +74,8 @@ import net.minecraft.world.storage.IPlayerFileData;
import net.minecraft.world.storage.SaveHandler;
import net.minecraft.world.storage.loot.LootTable;
import net.minecraft.world.storage.loot.LootTableManager;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.ClientChatEvent;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.client.event.RenderBlockOverlayEvent;
@@ -421,7 +425,7 @@ public class ForgeEventFactory
if(isCanceled)
{
entityMounting.setPositionAndRotation(entityMounting.posX, entityMounting.posY, entityMounting.posZ, entityMounting.prevRotationYaw, entityMounting.prevRotationPitch);
entityMounting.setPositionAndRotation(entityMounting.func_226277_ct_(), entityMounting.func_226278_cu_(), entityMounting.func_226281_cx_(), entityMounting.prevRotationYaw, entityMounting.prevRotationPitch);
return false;
}
else
@@ -440,9 +444,9 @@ public class ForgeEventFactory
return event.getResultStatus();
}
public static void onPlayerWakeup(PlayerEntity player, boolean wakeImmediately, boolean updateWorldFlag, boolean setSpawn)
public static void onPlayerWakeup(PlayerEntity player, boolean wakeImmediately, boolean updateWorldFlag)
{
MinecraftForge.EVENT_BUS.post(new PlayerWakeUpEvent(player, wakeImmediately, updateWorldFlag, setSpawn));
MinecraftForge.EVENT_BUS.post(new PlayerWakeUpEvent(player, wakeImmediately, updateWorldFlag));
}
public static void onPlayerFall(PlayerEntity player, float distance, float multiplier)
@@ -523,19 +527,22 @@ public class ForgeEventFactory
MinecraftForge.EVENT_BUS.post(new PlayerBrewedPotionEvent(player, stack));
}
public static boolean renderFireOverlay(PlayerEntity player, float renderPartialTicks)
@OnlyIn(Dist.CLIENT)
public static boolean renderFireOverlay(PlayerEntity player, MatrixStack mat)
{
return renderBlockOverlay(player, renderPartialTicks, OverlayType.FIRE, Blocks.FIRE.getDefaultState(), new BlockPos(player));
return renderBlockOverlay(player, mat, OverlayType.FIRE, Blocks.FIRE.getDefaultState(), new BlockPos(player));
}
public static boolean renderWaterOverlay(PlayerEntity player, float renderPartialTicks)
@OnlyIn(Dist.CLIENT)
public static boolean renderWaterOverlay(PlayerEntity player, MatrixStack mat)
{
return renderBlockOverlay(player, renderPartialTicks, OverlayType.WATER, Blocks.WATER.getDefaultState(), new BlockPos(player));
return renderBlockOverlay(player, mat, OverlayType.WATER, Blocks.WATER.getDefaultState(), new BlockPos(player));
}
public static boolean renderBlockOverlay(PlayerEntity player, float renderPartialTicks, OverlayType type, BlockState block, BlockPos pos)
@OnlyIn(Dist.CLIENT)
public static boolean renderBlockOverlay(PlayerEntity player, MatrixStack mat, OverlayType type, BlockState block, BlockPos pos)
{
return MinecraftForge.EVENT_BUS.post(new RenderBlockOverlayEvent(player, renderPartialTicks, type, block, pos));
return MinecraftForge.EVENT_BUS.post(new RenderBlockOverlayEvent(player, mat, type, block, pos));
}
@Nullable
@@ -173,7 +173,7 @@ public class LivingSpawnEvent extends LivingEvent
{
public AllowDespawn(MobEntity entity)
{
super(entity, entity.world, entity.posX, entity.posY, entity.posZ);
super(entity, entity.world, entity.func_226277_ct_(), entity.func_226278_cu_(), entity.func_226281_cx_());
}
}
@@ -1,39 +0,0 @@
/*
* Minecraft Forge
* Copyright (c) 2016-2019.
*
* 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.event.entity.player;
import net.minecraft.entity.item.ExperienceOrbEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraftforge.eventbus.api.Cancelable;
/**
* Use {@link PlayerXpEvent.PickupXp}
*/
@Cancelable
@Deprecated
public class PlayerPickupXpEvent extends PlayerXpEvent.PickupXp
{
public PlayerPickupXpEvent(PlayerEntity player, ExperienceOrbEntity orb)
{
super(player, orb);
}
}
@@ -32,14 +32,11 @@ public class PlayerWakeUpEvent extends PlayerEvent
private final boolean updateWorld;
private final boolean setSpawn;
public PlayerWakeUpEvent(PlayerEntity player, boolean wakeImmediately, boolean updateWorld, boolean setSpawn)
public PlayerWakeUpEvent(PlayerEntity player, boolean wakeImmediately, boolean updateWorld)
{
super(player);
this.wakeImmediately = wakeImmediately;
this.updateWorld = updateWorld;
this.setSpawn = setSpawn;
}
/**
@@ -53,10 +50,4 @@ public class PlayerWakeUpEvent extends PlayerEvent
* This will only be false if the server is considered 'up to date' already, because, for example, it initiated the call.
*/
public boolean updateWorld() { return updateWorld; }
/**
* Indicates if the player's sleep was considered successful.
* In vanilla, this is used to determine if the spawn chunk is to be set to the bed's position.
*/
public boolean shouldSetSpawn() { return setSpawn; }
}
@@ -21,7 +21,7 @@ package net.minecraftforge.event.world;
import javax.annotation.Nullable;
import net.minecraft.block.state.PistonBlockStructureHelper;
import net.minecraft.block.PistonBlockStructureHelper;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -125,4 +125,4 @@ public abstract class PistonEvent extends BlockEvent
}
}
}
}