make it compile \o/

This commit is contained in:
granny
2026-03-24 01:25:42 -07:00
parent 465f4d86be
commit 57a0650b8f
40 changed files with 78 additions and 147 deletions

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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) {