mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-27 18:49:11 +00:00
76 lines
3.4 KiB
Diff
76 lines
3.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
|
Date: Tue, 29 Nov 2022 16:25:51 +0100
|
|
Subject: [PATCH] Fix MC-123848
|
|
|
|
License: MIT (https://opensource.org/licenses/MIT)
|
|
Gale - https://galemc.org
|
|
|
|
This patch is based on the following patch:
|
|
"Fix MC-123848"
|
|
By: BillyGalbreath <blake.galbreath@gmail.com>
|
|
As part of: Purpur (https://github.com/PurpurMC/Purpur)
|
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
|
|
|
* Purpur copyright *
|
|
|
|
MIT License
|
|
|
|
Copyright (c) 2019-2022 PurpurMC
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
index 428523feaa4f30260e32ba03937e88200246c693..29afe1f873c9c87fe5a83f22025cf7f773c4cf2c 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
@@ -283,6 +283,16 @@ public class ItemFrame extends HangingEntity {
|
|
}
|
|
}
|
|
|
|
+ // Gale start - Purpur - fix MC-123848
|
|
+ @Override
|
|
+ public @Nullable net.minecraft.world.entity.item.ItemEntity spawnAtLocation(ItemStack stack) {
|
|
+ if (!this.level.galeConfig().gameplayMechanics.fixes.mc123848) {
|
|
+ return super.spawnAtLocation(stack);
|
|
+ }
|
|
+ return this.spawnAtLocation(stack, getDirection().equals(Direction.DOWN) ? -0.6F : 0.0F);
|
|
+ }
|
|
+ // Gale end - Purpur - fix MC-123848
|
|
+
|
|
private void removeFramedMap(ItemStack itemstack) {
|
|
// Paper start - fix MC-252817 (green map markers do not disappear)
|
|
this.getFramedMapIdFromItem(itemstack).ifPresent((i) -> {
|
|
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
index 2d4d2f1b33b9b6ec937fc1da20573f685eb0cb29..ab5b2db71038decf68f3b0072367e986d5b25f82 100644
|
|
--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
+++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
@@ -268,6 +268,11 @@ public class GaleWorldConfiguration extends ConfigurationPart {
|
|
public boolean mc238526 = false;
|
|
// Gale end - Purpur - fix MC-238526
|
|
|
|
+ // Gale start - Purpur - fix MC-123848
|
|
+ @Setting("mc-123848")
|
|
+ public boolean mc123848 = false;
|
|
+ // Gale end - Purpur - fix MC-123848
|
|
+
|
|
}
|
|
|
|
}
|