20w45a
This commit is contained in:
1 parent
79dc85274d
commit
2cdea92da7
55 files changed
+453
-287
No files matched your search
@@ -48,8 +48,8 @@ import net.minecraft.world.World;
|
||||
public class BlockRotator
|
||||
{
|
||||
public static boolean flipBlockWithCactus(BlockState state, World world, PlayerEntity player, Hand hand, BlockHitResult hit)
|
||||
{
|
||||
if (!player.abilities.allowModifyWorld || !CarpetSettings.flippinCactus || !player_holds_cactus_mainhand(player))
|
||||
{ //getAbilities()
|
||||
if (!player.method_31549().allowModifyWorld || !CarpetSettings.flippinCactus || !player_holds_cactus_mainhand(player))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ public class EntityPlayerActionPack
|
||||
|
||||
private void dropItemFromSlot(int slot, boolean dropAll)
|
||||
{
|
||||
PlayerInventory inv = player.inventory;
|
||||
PlayerInventory inv = player.method_31548(); // getInventory;
|
||||
if (!inv.getStack(slot).isEmpty())
|
||||
player.dropItem(inv.removeStack(slot,
|
||||
dropAll ? inv.getStack(slot).getCount() : 1
|
||||
@@ -257,7 +257,7 @@ public class EntityPlayerActionPack
|
||||
|
||||
public void drop(int selectedSlot, boolean dropAll)
|
||||
{
|
||||
PlayerInventory inv = player.inventory;
|
||||
PlayerInventory inv = player.method_31548(); // getInventory;
|
||||
if (selectedSlot == -2) // all
|
||||
{
|
||||
for (int i = inv.size(); i >= 0; i--)
|
||||
|
||||
@@ -172,7 +172,7 @@ public class OptimizedExplosion
|
||||
PlayerEntity player = (PlayerEntity) entity;
|
||||
|
||||
if (!player.isSpectator()
|
||||
&& (!player.isCreative() || !player.abilities.flying)) {
|
||||
&& (!player.isCreative() || !player.method_31549().flying)) { //getAbilities
|
||||
e.getAffectedPlayers().put(player, new Vec3d(d5 * d10, d7 * d10, d9 * d10));
|
||||
}
|
||||
}
|
||||
@@ -227,7 +227,7 @@ public class OptimizedExplosion
|
||||
{
|
||||
if (block.shouldDropItemsOnExplosion(e) && world instanceof ServerWorld)
|
||||
{
|
||||
BlockEntity blockEntity = block.hasBlockEntity() ? world.getBlockEntity(blockpos) : null;
|
||||
BlockEntity blockEntity = state.method_31709() ? world.getBlockEntity(blockpos) : null; //hasBlockEntity()
|
||||
|
||||
LootContext.Builder lootBuilder = (new LootContext.Builder((ServerWorld)eAccess.getWorld()))
|
||||
.random(eAccess.getWorld().random)
|
||||
|
||||
@@ -28,7 +28,7 @@ public class XPcombine
|
||||
first == other || first.world.isClient || first.getServer().getTicks() == lastTickCombine
|
||||
|| !first.isAlive() || !other.isAlive()
|
||||
|| first.getExperienceAmount() > 15000 || other.getExperienceAmount() > 15000
|
||||
|| first.pickupDelay == 32767 || other.pickupDelay == 32767
|
||||
//|| first.pickupDelay == 32767 || other.pickupDelay == 32767
|
||||
|| first.age == -32768 || other.age == -32768
|
||||
|| ((ExperienceOrbInterface)first).getCombineDelay() != 0 || ((ExperienceOrbInterface)other).getCombineDelay() != 0
|
||||
)
|
||||
@@ -37,10 +37,13 @@ public class XPcombine
|
||||
}
|
||||
|
||||
int size = getTextureByXP(first.getExperienceAmount());
|
||||
((ExperienceOrbInterface) first).setAmount(first.getExperienceAmount() + other.getExperienceAmount());
|
||||
((ExperienceOrbInterface) first).setCombineDelay(Math.max(first.pickupDelay, other.pickupDelay));
|
||||
((ExperienceOrbInterface) first).setAmount(
|
||||
first.getExperienceAmount()*((ExperienceOrbInterface) first).getCount() +
|
||||
other.getExperienceAmount()*((ExperienceOrbInterface) other).getCount());
|
||||
((ExperienceOrbInterface) first).setCount(1);
|
||||
//((ExperienceOrbInterface) first).setCombineDelay(Math.max(first.pickupDelay, other.pickupDelay));
|
||||
first.age = Math.min(first.age, other.age);
|
||||
other.remove();
|
||||
other.discard(); //discard
|
||||
|
||||
|
||||
ExperienceOrbEntity newOrb;
|
||||
@@ -51,7 +54,7 @@ public class XPcombine
|
||||
((ExperienceOrbInterface)newOrb).setAmount(first.getExperienceAmount());
|
||||
|
||||
first.world.spawnEntity(newOrb);
|
||||
first.remove();
|
||||
first.discard(); // discard
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user