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:
LexManos committed 2021-03-09 14:21:48 -08:00
1 parent 802298d99d
commit a95b968c13
832 files changed
+4464 -4373

No files matched your search

@@ -46,7 +46,7 @@ public class EntityAttributeCreationEvent extends Event implements IModBusEvent
public void put(EntityType<? extends LivingEntity> entity, AttributeModifierMap map)
{
if (GlobalEntityTypeAttributes.doesEntityHaveAttributes(entity))
if (GlobalEntityTypeAttributes.hasSupplier(entity))
throw new IllegalStateException("Duplicate GlobalEntityTypeAttributes entry: " + entity);
this.map.put(entity, map);
}
@@ -51,7 +51,7 @@ public class EntityAttributeModificationEvent extends Event implements IModBusEv
this.entityAttributes = mapIn;
this.entityTypes = ImmutableList.copyOf(
ForgeRegistries.ENTITIES.getValues().stream()
.filter(GlobalEntityTypeAttributes::doesEntityHaveAttributes)
.filter(GlobalEntityTypeAttributes::hasSupplier)
.map(entityType -> (EntityType<? extends LivingEntity>) entityType)
.collect(Collectors.toList())
);
@@ -61,7 +61,7 @@ public class EntityAttributeModificationEvent extends Event implements IModBusEv
{
AttributeModifierMap.MutableAttribute attributes = entityAttributes.computeIfAbsent(entityType,
(type) -> new AttributeModifierMap.MutableAttribute());
attributes.createMutableAttribute(attribute, value);
attributes.add(attribute, value);
}
public void add(EntityType<? extends LivingEntity> entityType, Attribute attribute)
@@ -71,7 +71,7 @@ public class EntityAttributeModificationEvent extends Event implements IModBusEv
public boolean has(EntityType<? extends LivingEntity> entityType, Attribute attribute)
{
AttributeModifierMap globalMap = GlobalEntityTypeAttributes.getAttributesForEntity(entityType);
AttributeModifierMap globalMap = GlobalEntityTypeAttributes.getSupplier(entityType);
return globalMap.hasAttribute(attribute) || (entityAttributes.get(entityType) != null && entityAttributes.get(entityType).hasAttribute(attribute));
}
@@ -173,7 +173,7 @@ public class LivingSpawnEvent extends LivingEvent
{
public AllowDespawn(MobEntity entity)
{
super(entity, entity.world, entity.getPosX(), entity.getPosY(), entity.getPosZ());
super(entity, entity.level, entity.getX(), entity.getY(), entity.getZ());
}
}
@@ -64,14 +64,14 @@ public class PotionEvent extends LivingEvent
public PotionRemoveEvent(LivingEntity living, Effect potion)
{
super(living, living.getActivePotionEffect(potion));
super(living, living.getEffect(potion));
this.potion = potion;
}
public PotionRemoveEvent(LivingEntity living, EffectInstance effect)
{
super(living, effect);
this.potion = effect.getPotion();
this.potion = effect.getEffect();
}
/**
@@ -44,7 +44,7 @@ public class ItemFishedEvent extends PlayerEvent
public ItemFishedEvent(List<ItemStack> stacks, int rodDamage, FishingBobberEntity hook)
{
super(hook.func_234606_i_());
super(hook.getPlayerOwner());
this.stacks.addAll(stacks);
this.rodDamage = rodDamage;
this.hook = hook;
@@ -81,7 +81,7 @@ public class PlayerInteractEvent extends PlayerEvent
public EntityInteractSpecific(PlayerEntity player, Hand hand, Entity target, Vector3d localPos)
{
super(player, hand, target.getPosition(), null);
super(player, hand, target.blockPosition(), null);
this.localPos = localPos;
this.target = target;
}
@@ -121,7 +121,7 @@ public class PlayerInteractEvent extends PlayerEvent
public EntityInteract(PlayerEntity player, Hand hand, Entity target)
{
super(player, hand, target.getPosition(), null);
super(player, hand, target.blockPosition(), null);
this.target = target;
}
@@ -157,7 +157,7 @@ public class PlayerInteractEvent extends PlayerEvent
}
public RightClickBlock(PlayerEntity player, Hand hand, BlockPos pos, BlockRayTraceResult hitVec) {
super(player, hand, pos, hitVec.getFace());
super(player, hand, pos, hitVec.getDirection());
this.hitVec = hitVec;
}
@@ -230,7 +230,7 @@ public class PlayerInteractEvent extends PlayerEvent
{
public RightClickItem(PlayerEntity player, Hand hand)
{
super(player, hand, player.getPosition(), null);
super(player, hand, player.blockPosition(), null);
}
}
@@ -243,7 +243,7 @@ public class PlayerInteractEvent extends PlayerEvent
{
public RightClickEmpty(PlayerEntity player, Hand hand)
{
super(player, hand, player.getPosition(), null);
super(player, hand, player.blockPosition(), null);
}
}
@@ -317,7 +317,7 @@ public class PlayerInteractEvent extends PlayerEvent
{
public LeftClickEmpty(PlayerEntity player)
{
super(player, Hand.MAIN_HAND, player.getPosition(), null);
super(player, Hand.MAIN_HAND, player.blockPosition(), null);
}
}
@@ -336,7 +336,7 @@ public class PlayerInteractEvent extends PlayerEvent
@Nonnull
public ItemStack getItemStack()
{
return getPlayer().getHeldItem(hand);
return getPlayer().getItemInHand(hand);
}
/**
@@ -366,7 +366,7 @@ public class PlayerInteractEvent extends PlayerEvent
*/
public World getWorld()
{
return getPlayer().getEntityWorld();
return getPlayer().getCommandSenderWorld();
}
/**
@@ -374,7 +374,7 @@ public class PlayerInteractEvent extends PlayerEvent
*/
public LogicalSide getSide()
{
return getWorld().isRemote ? LogicalSide.CLIENT : LogicalSide.SERVER;
return getWorld().isClientSide ? LogicalSide.CLIENT : LogicalSide.SERVER;
}
/**