Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
#687: Add visibility and fixed API for ItemFrames
Dieser Commit ist enthalten in:
Ursprung
c49b67ac91
Commit
a1d23114fa
@ -1,5 +1,14 @@
|
|||||||
--- a/net/minecraft/server/EntityItemFrame.java
|
--- a/net/minecraft/server/EntityItemFrame.java
|
||||||
+++ b/net/minecraft/server/EntityItemFrame.java
|
+++ b/net/minecraft/server/EntityItemFrame.java
|
||||||
|
@@ -11,7 +11,7 @@
|
||||||
|
private static final DataWatcherObject<ItemStack> ITEM = DataWatcher.a(EntityItemFrame.class, DataWatcherRegistry.g);
|
||||||
|
private static final DataWatcherObject<Integer> g = DataWatcher.a(EntityItemFrame.class, DataWatcherRegistry.b);
|
||||||
|
private float an = 1.0F;
|
||||||
|
- private boolean ao;
|
||||||
|
+ public boolean ao; // PAIL private -> public // PAIL rename isFixed
|
||||||
|
|
||||||
|
public EntityItemFrame(EntityTypes<? extends EntityItemFrame> entitytypes, World world) {
|
||||||
|
super(entitytypes, world);
|
||||||
@@ -53,16 +53,27 @@
|
@@ -53,16 +53,27 @@
|
||||||
@Override
|
@Override
|
||||||
protected void updateBoundingBox() {
|
protected void updateBoundingBox() {
|
||||||
|
@ -128,6 +128,26 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isVisible() {
|
||||||
|
return !getHandle().isInvisible();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setVisible(boolean visible) {
|
||||||
|
getHandle().setInvisible(!visible);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFixed() {
|
||||||
|
return getHandle().ao;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setFixed(boolean fixed) {
|
||||||
|
getHandle().ao = fixed;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EntityItemFrame getHandle() {
|
public EntityItemFrame getHandle() {
|
||||||
return (EntityItemFrame) entity;
|
return (EntityItemFrame) entity;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren