mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Regenerate patches with relative headers. This should lower conflicts in future PRs.
Convert Forge to use Official mappings. Mojang released their obfuscation mappings but we have not used them up until now due to wanting to get their license to be more explicitly permissive. It is clear that their intent is to allow us to use their names for developing mods like this. See the full wording, and our interpretation here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
This commit is contained in:
1 parent
802298d99d
commit
a95b968c13
832 files changed
+4464
-4373
No files matched your search
@@ -53,7 +53,7 @@ public class ItemHandlerHelper
|
||||
|
||||
public static boolean canItemStacksStack(@Nonnull ItemStack a, @Nonnull ItemStack b)
|
||||
{
|
||||
if (a.isEmpty() || !a.isItemEqual(b) || a.hasTag() != b.hasTag())
|
||||
if (a.isEmpty() || !a.sameItem(b) || a.hasTag() != b.hasTag())
|
||||
return false;
|
||||
|
||||
return (!a.hasTag() || a.getTag().equals(b.getTag())) && a.areCapsCompatible(b);
|
||||
@@ -165,7 +165,7 @@ public class ItemHandlerHelper
|
||||
if (stack.isEmpty()) return;
|
||||
|
||||
IItemHandler inventory = new PlayerMainInvWrapper(player.inventory);
|
||||
World world = player.world;
|
||||
World world = player.level;
|
||||
|
||||
// try adding it into the inventory
|
||||
ItemStack remainder = stack;
|
||||
@@ -183,18 +183,18 @@ public class ItemHandlerHelper
|
||||
// play sound if something got picked up
|
||||
if (remainder.isEmpty() || remainder.getCount() != stack.getCount())
|
||||
{
|
||||
world.playSound(null, player.getPosX(), player.getPosY() + 0.5, player.getPosZ(),
|
||||
SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, 0.2F, ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
|
||||
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);
|
||||
}
|
||||
|
||||
// drop remaining itemstack into the world
|
||||
if (!remainder.isEmpty() && !world.isRemote)
|
||||
if (!remainder.isEmpty() && !world.isClientSide)
|
||||
{
|
||||
ItemEntity entityitem = new ItemEntity(world, player.getPosX(), player.getPosY() + 0.5, player.getPosZ(), remainder);
|
||||
entityitem.setPickupDelay(40);
|
||||
entityitem.setMotion(entityitem.getMotion().mul(0, 1, 0));
|
||||
ItemEntity entityitem = new ItemEntity(world, player.getX(), player.getY() + 0.5, player.getZ(), remainder);
|
||||
entityitem.setPickUpDelay(40);
|
||||
entityitem.setDeltaMovement(entityitem.getDeltaMovement().multiply(0, 1, 0));
|
||||
|
||||
world.addEntity(entityitem);
|
||||
world.addFreshEntity(entityitem);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user