Update to 1.17

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

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

No files matched your search

@@ -19,13 +19,13 @@
package net.minecraftforge.items;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.item.ItemStack;
import net.minecraft.sounds.SoundSource;
import net.minecraft.util.Mth;
import net.minecraft.world.level.Level;
import net.minecraftforge.items.wrapper.PlayerMainInvWrapper;
import javax.annotation.Nonnull;
@@ -149,7 +149,7 @@ public class ItemHandlerHelper
}
/** giveItemToPlayer without preferred slot */
public static void giveItemToPlayer(PlayerEntity player, @Nonnull ItemStack stack) {
public static void giveItemToPlayer(Player player, @Nonnull ItemStack stack) {
giveItemToPlayer(player, stack, -1);
}
@@ -160,12 +160,12 @@ public class ItemHandlerHelper
* @param player The player to give the item to
* @param stack The itemstack to insert
*/
public static void giveItemToPlayer(PlayerEntity player, @Nonnull ItemStack stack, int preferredSlot)
public static void giveItemToPlayer(Player player, @Nonnull ItemStack stack, int preferredSlot)
{
if (stack.isEmpty()) return;
IItemHandler inventory = new PlayerMainInvWrapper(player.inventory);
World world = player.level;
IItemHandler inventory = new PlayerMainInvWrapper(player.getInventory());
Level world = player.level;
// try adding it into the inventory
ItemStack remainder = stack;
@@ -184,7 +184,7 @@ public class ItemHandlerHelper
if (remainder.isEmpty() || remainder.getCount() != stack.getCount())
{
world.playSound(null, player.getX(), player.getY() + 0.5, player.getZ(),
SoundEvents.ITEM_PICKUP, SoundCategory.PLAYERS, 0.2F, ((world.random.nextFloat() - world.random.nextFloat()) * 0.7F + 1.0F) * 2.0F);
SoundEvents.ITEM_PICKUP, SoundSource.PLAYERS, 0.2F, ((world.random.nextFloat() - world.random.nextFloat()) * 0.7F + 1.0F) * 2.0F);
}
// drop remaining itemstack into the world
@@ -227,7 +227,7 @@ public class ItemHandlerHelper
}
proportion = proportion / (float)inv.getSlots();
return MathHelper.floor(proportion * 14.0F) + (itemsFound > 0 ? 1 : 0);
return Mth.floor(proportion * 14.0F) + (itemsFound > 0 ? 1 : 0);
}
}
}