mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-04-22 11:18:15 +02:00
make it compile \o/
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
@@ -85,7 +_,7 @@
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
- public static boolean canOpen(final BlockState state, final Level level, final BlockPos pos, final ShulkerBoxBlockEntity blockEntity) {
|
||||
+ private static boolean canOpen(final BlockState state, final Level level, final BlockPos pos, final ShulkerBoxBlockEntity blockEntity) {
|
||||
if (blockEntity.getAnimationStatus() != ShulkerBoxBlockEntity.AnimationStatus.CLOSED) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -6,7 +6,7 @@
|
||||
ItemStack fuel = entity.items.get(1);
|
||||
+ // Purpur start - Furnace uses lava from underneath
|
||||
+ boolean usedLavaFromUnderneath = false;
|
||||
+ if (level.purpurConfig.furnaceUseLavaFromUnderneath && !entity.isLit() && fuel.isEmpty() && !entity.items.get(0).isEmpty() && level.getGameTime() % 20 == 0) {
|
||||
+ if (level.purpurConfig.furnaceUseLavaFromUnderneath && !isLit && fuel.isEmpty() && !entity.items.get(0).isEmpty() && level.getGameTime() % 20 == 0) {
|
||||
+ BlockPos below = entity.getBlockPos().below();
|
||||
+ BlockState belowState = level.getBlockStateIfLoaded(below);
|
||||
+ if (belowState != null && belowState.is(net.minecraft.world.level.block.Blocks.LAVA)) {
|
||||
@@ -27,7 +27,7 @@
|
||||
setChanged(level, pos, state);
|
||||
}
|
||||
+
|
||||
+ if (usedLavaFromUnderneath) furnace.items.set(1, ItemStack.EMPTY); // Purpur - Furnace uses lava from underneath
|
||||
+ if (usedLavaFromUnderneath) entity.items.set(1, ItemStack.EMPTY); // Purpur - Furnace uses lava from underneath
|
||||
}
|
||||
|
||||
private static void consumeFuel(final NonNullList<ItemStack> items, final ItemStack fuel) {
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
}
|
||||
} else {
|
||||
- if (lastBeamSection == null || state.getLightDampening() >= 15 && !state.is(Blocks.BEDROCK)) {
|
||||
+ if (level.purpurConfig.beaconAllowEffectsWithTintedGlass && blockState.getBlock().equals(Blocks.TINTED_GLASS)) {isTintedGlass = true;} // Purpur - allow beacon effects when covered by tinted glass
|
||||
+ if (level.purpurConfig.beaconAllowEffectsWithTintedGlass && state.getBlock().equals(Blocks.TINTED_GLASS)) {isTintedGlass = true;} // Purpur - allow beacon effects when covered by tinted glass
|
||||
+ // Purpur start - fix effects being applied when tinted glass is covered
|
||||
+ if (lastBeamSection == null || state.getLightDampening() >= 15 && !state.is(Blocks.BEDROCK) && !(blockState.getBlock().equals(Blocks.TINTED_GLASS) && level.purpurConfig.beaconAllowEffectsWithTintedGlass)) {
|
||||
+ if (lastBeamSection == null || state.getLightDampening() >= 15 && !state.is(Blocks.BEDROCK) && !(state.getBlock().equals(Blocks.TINTED_GLASS) && level.purpurConfig.beaconAllowEffectsWithTintedGlass)) {
|
||||
entity.checkingBeamSections.clear();
|
||||
entity.lastCheckY = lastSetBlock;
|
||||
+ isTintedGlass = false;
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/world/level/block/entity/FuelValues.java
|
||||
+++ b/net/minecraft/world/level/block/entity/FuelValues.java
|
||||
@@ -17,7 +_,7 @@
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
public class FuelValues {
|
||||
- public final Object2IntSortedMap<Item> values;
|
||||
+ private final Object2IntSortedMap<Item> values;
|
||||
|
||||
private FuelValues(final Object2IntSortedMap<Item> values) {
|
||||
this.values = values;
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -87,7 +_,7 @@
|
||||
Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP
|
||||
};
|
||||
public final boolean hasCollision;
|
||||
- public float explosionResistance;
|
||||
+ protected final float explosionResistance;
|
||||
protected final boolean isRandomlyTicking;
|
||||
protected final SoundType soundType;
|
||||
protected final float friction;
|
||||
@@ -5,7 +5,7 @@
|
||||
private static final int MIN_HEIGHT = 3;
|
||||
public static final int MAX_HEIGHT = 21;
|
||||
- public static final BlockBehaviour.StatePredicate FRAME = (state, level, pos) -> state.is(Blocks.OBSIDIAN);
|
||||
+ private static final BlockBehaviour.StatePredicate FRAME = (state, level, pos) -> state.is(Blocks.OBSIDIAN) || (org.purpurmc.purpur.PurpurConfig.cryingObsidianValidForPortalFrame && state.is(Blocks.CRYING_OBSIDIAN)); // Purpur - Crying obsidian valid for portal frames
|
||||
+ public static final BlockBehaviour.StatePredicate FRAME = (state, level, pos) -> state.is(Blocks.OBSIDIAN) || (org.purpurmc.purpur.PurpurConfig.cryingObsidianValidForPortalFrame && state.is(Blocks.CRYING_OBSIDIAN)); // Purpur - Crying obsidian valid for portal frames
|
||||
private static final float SAFE_TRAVEL_MAX_ENTITY_XY = 4.0F;
|
||||
private static final double SAFE_TRAVEL_MAX_VERTICAL_DELTA = 1.0;
|
||||
private final Direction.Axis axis;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
int level = EnchantmentHelper.getEnchantmentLevel(this.enchantment, entity);
|
||||
+ // Purpur start - Add an option to fix MC-3304 projectile looting
|
||||
+ if (org.purpurmc.purpur.PurpurConfig.fixProjectileLootingTransfer && context.getOptionalParameter(LootContextParams.DIRECT_ATTACKING_ENTITY) instanceof net.minecraft.world.entity.projectile.arrow.AbstractArrow arrow) {
|
||||
+ enchantmentLevel = arrow.actualEnchantments.getLevel(this.enchantment);
|
||||
+ level = arrow.actualEnchantments.getLevel(this.enchantment);
|
||||
+ }
|
||||
+ // Purpur end - Add an option to fix MC-3304 projectile looting
|
||||
if (level == 0) {
|
||||
|
||||
Reference in New Issue
Block a user