Fix checkPatches task. Closes #6956

Fix patched in method using srg name. Closes #6965
Fix capabilities not being collected for ClientWorld. Closes #6966
Fix TagEmptyCondition using client side copy of tags instead of server. Closes #6949
Fix ExtendedButton using narrator text. Closes #6958, Closes #6959
Fix misaligned patch in RepairContainer. Closes #6950, Closes #6953
Fix LivingJumpEvent not being fired for players jumping horses. Closes #6929
Remove extra getToughness method in ArmorItem. Closes #6970
Remove GetCollisionBoxesEvent. Closes #6921
This commit is contained in:
LexManos committed 2020-07-13 15:17:37 -07:00
1 parent 065ebde57e
commit 201349f8de
12 files changed
+49 -116

No files matched your search

@@ -25,6 +25,7 @@ import net.minecraft.item.Item;
import net.minecraft.tags.ITag;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.Tag;
import net.minecraft.tags.TagCollectionManager;
import net.minecraft.util.JSONUtils;
import net.minecraft.util.ResourceLocation;
@@ -57,7 +58,7 @@ public class TagEmptyCondition implements ICondition
@Override
public boolean test()
{
ITag<Item> tag = ItemTags.getCollection().get(tag_name);
ITag<Item> tag = TagCollectionManager.func_232928_e_().func_232925_b_().get(tag_name);
return tag == null || tag.func_230236_b_().isEmpty();
}
@@ -128,7 +128,6 @@ import net.minecraftforge.event.world.BlockEvent.EntityPlaceEvent;
import net.minecraftforge.event.world.BlockEvent.NeighborNotifyEvent;
import net.minecraftforge.event.world.ChunkWatchEvent;
import net.minecraftforge.event.world.ExplosionEvent;
import net.minecraftforge.event.world.GetCollisionBoxesEvent;
import net.minecraftforge.event.world.PistonEvent;
import net.minecraftforge.event.world.SaplingGrowTreeEvent;
import net.minecraftforge.event.world.SleepFinishedTimeEvent;
@@ -672,12 +671,6 @@ public class ForgeEventFactory
return !MinecraftForge.EVENT_BUS.post(new LivingDestroyBlockEvent(entity, pos, state));
}
public static boolean gatherCollisionBoxes(World world, Entity entity, AxisAlignedBB aabb, List<AxisAlignedBB> outList)
{
MinecraftForge.EVENT_BUS.post(new GetCollisionBoxesEvent(world, entity, aabb, outList));
return outList.isEmpty();
}
public static boolean getMobGriefingEvent(World world, Entity entity)
{
EntityMobGriefingEvent event = new EntityMobGriefingEvent(entity);
@@ -1,73 +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.event.world;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import javax.annotation.Nullable;
import java.util.List;
/**
* This event is fired during {@link World#collidesWithAnyBlock(AxisAlignedBB)}
* and before returning the list in {@link World#getCollisionBoxes(Entity, AxisAlignedBB)}<br>
* <br>
* {@link #entity} contains the entity passed in the {@link World#getCollisionBoxes(Entity, AxisAlignedBB)}. <b>Can be null.</b> Calls from {@link World#collidesWithAnyBlock(AxisAlignedBB)} will be null.<br>
* {@link #aabb} contains the AxisAlignedBB passed in the method.<br>
* {@link #collisionBoxesList} contains the list of detected collision boxes intersecting with {@link #aabb}. The list can be modified.<br>
* <br>
* This event is not {@link Cancelable}.<br>
* <br>
* This event does not have a result. {@link HasResult} <br>
* <br>
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.<br>
**/
public class GetCollisionBoxesEvent extends WorldEvent
{
private final Entity entity;
private final AxisAlignedBB aabb;
private final List<AxisAlignedBB> collisionBoxesList;
public GetCollisionBoxesEvent(World world, @Nullable Entity entity, AxisAlignedBB aabb, List<AxisAlignedBB> collisionBoxesList)
{
super(world);
this.entity = entity;
this.aabb = aabb;
this.collisionBoxesList = collisionBoxesList;
}
public Entity getEntity()
{
return entity;
}
public AxisAlignedBB getAabb()
{
return aabb;
}
public List<AxisAlignedBB> getCollisionBoxesList()
{
return collisionBoxesList;
}
}
@@ -58,7 +58,7 @@ public class ExtendedButton extends Button
GuiUtils.drawContinuousTexturedBox(field_230687_i_, this.field_230690_l_, this.field_230691_m_, 0, 46 + k * 20, this.field_230688_j_, this.field_230689_k_, 200, 20, 2, 3, 2, 2, this.func_230927_p_());
this.func_230441_a_(mStack, mc, mouseX, mouseY);
ITextComponent buttonText = this.func_230442_c_();
ITextComponent buttonText = this.func_230458_i_();
int strWidth = mc.fontRenderer.func_238414_a_(buttonText);
int ellipsisWidth = mc.fontRenderer.getStringWidth("...");