[1.21.5] Add support for changed minecart displayed block meta key
Signed-off-by: Irmo van den Berge <irmo.vandenberge@ziggo.nl>
This commit is contained in:
1 parent
fa54226c7d
commit
767dbbb413
6 files changed
+93
-33
No files matched your search
+17
-4
@@ -1,6 +1,7 @@
|
||||
package com.bergerkiller.generated.net.minecraft.world.entity.vehicle;
|
||||
|
||||
import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
import com.bergerkiller.bukkit.common.wrappers.BlockData;
|
||||
import com.bergerkiller.bukkit.common.wrappers.DataWatcher.Key;
|
||||
import com.bergerkiller.generated.net.minecraft.world.entity.EntityHandle;
|
||||
|
||||
@@ -28,6 +29,10 @@ public abstract class EntityMinecartAbstractHandle extends EntityHandle {
|
||||
public static final Key<Integer> DATA_SHAKING_FACTOR;
|
||||
public static final Key<Integer> DATA_SHAKING_DIRECTION;
|
||||
public static final Key<Float> DATA_SHAKING_DAMAGE;
|
||||
public static final Key<BlockData> DATA_CUSTOM_DISPLAY_BLOCK;
|
||||
public static final Key<Integer> DATA_BLOCK_TYPE;
|
||||
public static final Key<Integer> DATA_BLOCK_OFFSET = Key.Type.INTEGER.createKey(T.DATA_BLOCK_OFFSET, 21);
|
||||
public static final Key<Boolean> DATA_BLOCK_VISIBLE;
|
||||
|
||||
static {
|
||||
if (VehicleEntityHandle.T.isAvailable()) {
|
||||
@@ -39,11 +44,17 @@ public abstract class EntityMinecartAbstractHandle extends EntityHandle {
|
||||
DATA_SHAKING_DIRECTION = Key.Type.INTEGER.createKey(T.DATA_SHAKING_DIRECTION, 18);
|
||||
DATA_SHAKING_DAMAGE = Key.Type.FLOAT.createKey(T.DATA_SHAKING_DAMAGE, 19);
|
||||
}
|
||||
}
|
||||
|
||||
public static final Key<Integer> DATA_BLOCK_TYPE = Key.Type.INTEGER.createKey(T.DATA_BLOCK_TYPE, 20);
|
||||
public static final Key<Integer> DATA_BLOCK_OFFSET = Key.Type.INTEGER.createKey(T.DATA_BLOCK_OFFSET, 21);
|
||||
public static final Key<Boolean> DATA_BLOCK_VISIBLE = Key.Type.BOOLEAN.createKey(T.DATA_BLOCK_VISIBLE, 22);
|
||||
if (com.bergerkiller.bukkit.common.internal.CommonCapabilities.IS_MINECART_BLOCK_COMBINED_KEY) {
|
||||
DATA_CUSTOM_DISPLAY_BLOCK = Key.Type.BLOCK_DATA.createKey(T.DATA_ID_CUSTOM_DISPLAY_BLOCK, -1);
|
||||
DATA_BLOCK_TYPE = new Key.Disabled(Key.Type.INTEGER);
|
||||
DATA_BLOCK_VISIBLE = new Key.Disabled(Key.Type.BOOLEAN);
|
||||
} else {
|
||||
DATA_CUSTOM_DISPLAY_BLOCK = new Key.Disabled(Key.Type.BLOCK_DATA);
|
||||
DATA_BLOCK_TYPE = Key.Type.INTEGER.createKey(T.DATA_BLOCK_TYPE, 20);
|
||||
DATA_BLOCK_VISIBLE = Key.Type.BOOLEAN.createKey(T.DATA_BLOCK_VISIBLE, 22);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Stores class members for <b>net.minecraft.world.entity.vehicle.EntityMinecartAbstract</b>.
|
||||
* Methods, fields, and constructors can be used without using Handle Objects.
|
||||
@@ -56,6 +67,8 @@ public abstract class EntityMinecartAbstractHandle extends EntityHandle {
|
||||
@Template.Optional
|
||||
public final Template.StaticField.Converted<Key<Float>> DATA_SHAKING_DAMAGE = new Template.StaticField.Converted<Key<Float>>();
|
||||
@Template.Optional
|
||||
public final Template.StaticField.Converted<Key<BlockData>> DATA_ID_CUSTOM_DISPLAY_BLOCK = new Template.StaticField.Converted<Key<BlockData>>();
|
||||
@Template.Optional
|
||||
public final Template.StaticField.Converted<Key<Integer>> DATA_BLOCK_TYPE = new Template.StaticField.Converted<Key<Integer>>();
|
||||
@Template.Optional
|
||||
public final Template.StaticField.Converted<Key<Integer>> DATA_BLOCK_OFFSET = new Template.StaticField.Converted<Key<Integer>>();
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.bergerkiller.bukkit.common.entity.type;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.bergerkiller.bukkit.common.internal.CommonCapabilities;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Minecart;
|
||||
@@ -26,8 +27,6 @@ public class CommonMinecart<T extends Minecart> extends CommonEntity<T> {
|
||||
public final DataWatcher.EntityItem<Float> metaShakingDamage = getDataItem(EntityMinecartAbstractHandle.DATA_SHAKING_DAMAGE);
|
||||
public final DataWatcher.EntityItem<Integer> metaShakingFactor = getDataItem(EntityMinecartAbstractHandle.DATA_SHAKING_FACTOR);
|
||||
public final DataWatcher.EntityItem<Integer> metaBlockOffset = getDataItem(EntityMinecartAbstractHandle.DATA_BLOCK_OFFSET);
|
||||
public final DataWatcher.EntityItem<Integer> metaBlockType = getDataItem(EntityMinecartAbstractHandle.DATA_BLOCK_TYPE);
|
||||
public final DataWatcher.EntityItem<Boolean> metaBlockVisible = getDataItem(EntityMinecartAbstractHandle.DATA_BLOCK_VISIBLE);
|
||||
|
||||
public CommonMinecart(T base) {
|
||||
super(base);
|
||||
@@ -134,18 +133,6 @@ public class CommonMinecart<T extends Minecart> extends CommonEntity<T> {
|
||||
return getBlock().getType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the block data for this Minecart<br>
|
||||
* <br>
|
||||
* <b>Deprecated: </b>use {@link #getBlock()} instead
|
||||
*
|
||||
* @return block data
|
||||
*/
|
||||
@Deprecated
|
||||
public int getBlockData() {
|
||||
return metaBlockType.get() >> 16;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Block displayed in this Minecart<br>
|
||||
* <br>
|
||||
@@ -166,7 +153,12 @@ public class CommonMinecart<T extends Minecart> extends CommonEntity<T> {
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockData getBlock() {
|
||||
return BlockData.fromCombinedId(metaBlockType.get());
|
||||
if (CommonCapabilities.IS_MINECART_BLOCK_COMBINED_KEY) {
|
||||
return getDataWatcher().get(EntityMinecartAbstractHandle.DATA_CUSTOM_DISPLAY_BLOCK);
|
||||
} else {
|
||||
Integer value = getDataWatcher().get(EntityMinecartAbstractHandle.DATA_BLOCK_TYPE);
|
||||
return value == null ? BlockData.AIR : BlockData.fromCombinedId(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -185,13 +177,21 @@ public class CommonMinecart<T extends Minecart> extends CommonEntity<T> {
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setBlock(BlockData block) {
|
||||
if (block.getType() == Material.AIR) {
|
||||
metaBlockType.set(0);
|
||||
metaBlockVisible.set(false);
|
||||
return;
|
||||
DataWatcher meta = getDataWatcher();
|
||||
if (CommonCapabilities.IS_MINECART_BLOCK_COMBINED_KEY) {
|
||||
if (block.getType() == Material.AIR) {
|
||||
meta.set(EntityMinecartAbstractHandle.DATA_CUSTOM_DISPLAY_BLOCK, null);
|
||||
} else {
|
||||
meta.set(EntityMinecartAbstractHandle.DATA_CUSTOM_DISPLAY_BLOCK, block);
|
||||
}
|
||||
} else {
|
||||
metaBlockType.set(block.getCombinedId());
|
||||
metaBlockVisible.set(true);
|
||||
if (block.getType() == Material.AIR) {
|
||||
meta.set(EntityMinecartAbstractHandle.DATA_BLOCK_TYPE, 0);
|
||||
meta.set(EntityMinecartAbstractHandle.DATA_BLOCK_VISIBLE, false);
|
||||
} else {
|
||||
meta.set(EntityMinecartAbstractHandle.DATA_BLOCK_TYPE, block.getCombinedId());
|
||||
meta.set(EntityMinecartAbstractHandle.DATA_BLOCK_VISIBLE, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -312,4 +312,9 @@ public class CommonCapabilities {
|
||||
* Since Minecraft 1.21.5 the respawn point is packed into a compount in the player's data NBT
|
||||
*/
|
||||
public static final boolean IS_RESPAWN_POINT_PACKED = CommonBootstrap.evaluateMCVersion(">=", "1.21.5");
|
||||
|
||||
/**
|
||||
* Since Minecraft 1.21.5 the Minecart displayed block and whether it is displayed is in a single (Optional) BlockData key instead.
|
||||
*/
|
||||
public static final boolean IS_MINECART_BLOCK_COMBINED_KEY = CommonBootstrap.evaluateMCVersion(">=", "1.21.5");
|
||||
}
|
||||
@@ -20,9 +20,7 @@ public class NMSEntityMinecart {
|
||||
public static DataWatcher.Key<Integer> DATA_SHAKING_FACTOR = EntityMinecartAbstractHandle.DATA_SHAKING_FACTOR;
|
||||
public static DataWatcher.Key<Integer> DATA_SHAKING_DIRECTION = EntityMinecartAbstractHandle.DATA_SHAKING_DIRECTION;
|
||||
public static DataWatcher.Key<Float> DATA_SHAKING_DAMAGE = EntityMinecartAbstractHandle.DATA_SHAKING_DAMAGE;
|
||||
public static DataWatcher.Key<Integer> DATA_BLOCK_TYPE = EntityMinecartAbstractHandle.DATA_BLOCK_TYPE;
|
||||
public static DataWatcher.Key<Integer> DATA_BLOCK_OFFSET = EntityMinecartAbstractHandle.DATA_BLOCK_OFFSET;
|
||||
public static DataWatcher.Key<Boolean> DATA_BLOCK_VISIBLE = EntityMinecartAbstractHandle.DATA_BLOCK_VISIBLE;
|
||||
|
||||
public static final MethodAccessor<Void> activate = EntityMinecartAbstractHandle.T.activate.toMethodAccessor();
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.world.entity.vehicle;
|
||||
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.network.chat.IChatBaseComponent;
|
||||
@@ -7,6 +8,7 @@ import net.minecraft.network.syncher.DataWatcherObject;
|
||||
|
||||
import com.bergerkiller.generated.net.minecraft.world.entity.vehicle.NewMinecartBehaviorHandle.LerpStepHandle;
|
||||
|
||||
import com.bergerkiller.bukkit.common.wrappers.BlockData;
|
||||
import com.bergerkiller.bukkit.common.wrappers.DataWatcher;
|
||||
import com.bergerkiller.bukkit.common.wrappers.DataWatcher.Key;
|
||||
|
||||
@@ -34,14 +36,22 @@ optional class VehicleEntity extends Entity {
|
||||
}
|
||||
|
||||
class EntityMinecartAbstract extends Entity {
|
||||
#if version >= 1.20.3
|
||||
#if version >= 1.21.5
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_FACTOR:###;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_DIRECTION:###;
|
||||
private static optional final (DataWatcher.Key<Float>) DataWatcherObject<Float> DATA_SHAKING_DAMAGE:###;
|
||||
private static optional final (DataWatcher.Key<BlockData>) DataWatcherObject<Optional<IBlockData>> DATA_ID_CUSTOM_DISPLAY_BLOCK;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_TYPE:###;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_OFFSET:DATA_ID_DISPLAY_OFFSET;
|
||||
private static optional final (DataWatcher.Key<Boolean>) DataWatcherObject<Boolean> DATA_BLOCK_VISIBLE:###;
|
||||
#elseif version >= 1.20.3
|
||||
// Note: hurt/hurtdir/damage have been moved to parent class "VehicleEntity"
|
||||
// it's a bit of a mess with backwards compatibility unfortunately
|
||||
// we cope...
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_FACTOR:###;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_DIRECTION:###;
|
||||
private static optional final (DataWatcher.Key<Float>) DataWatcherObject<Float> DATA_SHAKING_DAMAGE:###;
|
||||
|
||||
private static optional final (DataWatcher.Key<BlockData>) DataWatcherObject<Optional<IBlockData>> DATA_ID_CUSTOM_DISPLAY_BLOCK:###;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_TYPE:DATA_ID_DISPLAY_BLOCK;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_OFFSET:DATA_ID_DISPLAY_OFFSET;
|
||||
private static optional final (DataWatcher.Key<Boolean>) DataWatcherObject<Boolean> DATA_BLOCK_VISIBLE:DATA_ID_CUSTOM_DISPLAY;
|
||||
@@ -49,6 +59,7 @@ class EntityMinecartAbstract extends Entity {
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_FACTOR:DATA_ID_HURT;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_DIRECTION:DATA_ID_HURTDIR;
|
||||
private static optional final (DataWatcher.Key<Float>) DataWatcherObject<Float> DATA_SHAKING_DAMAGE:DATA_ID_DAMAGE;
|
||||
private static optional final (DataWatcher.Key<BlockData>) DataWatcherObject<Optional<IBlockData>> DATA_ID_CUSTOM_DISPLAY_BLOCK:###;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_TYPE:DATA_ID_DISPLAY_BLOCK;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_OFFSET:DATA_ID_DISPLAY_OFFSET;
|
||||
private static optional final (DataWatcher.Key<Boolean>) DataWatcherObject<Boolean> DATA_BLOCK_VISIBLE:DATA_ID_CUSTOM_DISPLAY;
|
||||
@@ -56,6 +67,7 @@ class EntityMinecartAbstract extends Entity {
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_FACTOR:b;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_DIRECTION:c;
|
||||
private static optional final (DataWatcher.Key<Float>) DataWatcherObject<Float> DATA_SHAKING_DAMAGE:d;
|
||||
private static optional final (DataWatcher.Key<BlockData>) DataWatcherObject<Optional<IBlockData>> DATA_ID_CUSTOM_DISPLAY_BLOCK:###;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_TYPE:e;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_OFFSET:f;
|
||||
private static optional final (DataWatcher.Key<Boolean>) DataWatcherObject<Boolean> DATA_BLOCK_VISIBLE:g;
|
||||
@@ -63,6 +75,7 @@ class EntityMinecartAbstract extends Entity {
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_FACTOR:a;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_DIRECTION:b;
|
||||
private static optional final (DataWatcher.Key<Float>) DataWatcherObject<Float> DATA_SHAKING_DAMAGE:c;
|
||||
private static optional final (DataWatcher.Key<BlockData>) DataWatcherObject<Optional<IBlockData>> DATA_ID_CUSTOM_DISPLAY_BLOCK:###;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_TYPE:d;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_OFFSET:e;
|
||||
private static optional final (DataWatcher.Key<Boolean>) DataWatcherObject<Boolean> DATA_BLOCK_VISIBLE:f;
|
||||
@@ -70,6 +83,7 @@ class EntityMinecartAbstract extends Entity {
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_FACTOR:###;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_SHAKING_DIRECTION:###;
|
||||
private static optional final (DataWatcher.Key<Float>) DataWatcherObject<Float> DATA_SHAKING_DAMAGE:###;
|
||||
private static optional final (DataWatcher.Key<BlockData>) DataWatcherObject<Optional<IBlockData>> DATA_ID_CUSTOM_DISPLAY_BLOCK:###;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_TYPE:###;
|
||||
private static optional final (DataWatcher.Key<Integer>) DataWatcherObject<Integer> DATA_BLOCK_OFFSET:###;
|
||||
private static optional final (DataWatcher.Key<Boolean>) DataWatcherObject<Boolean> DATA_BLOCK_VISIBLE:###;
|
||||
@@ -79,6 +93,10 @@ class EntityMinecartAbstract extends Entity {
|
||||
public static final Key<Integer> DATA_SHAKING_FACTOR;
|
||||
public static final Key<Integer> DATA_SHAKING_DIRECTION;
|
||||
public static final Key<Float> DATA_SHAKING_DAMAGE;
|
||||
public static final Key<BlockData> DATA_CUSTOM_DISPLAY_BLOCK;
|
||||
public static final Key<Integer> DATA_BLOCK_TYPE;
|
||||
public static final Key<Integer> DATA_BLOCK_OFFSET = Key.Type.INTEGER.createKey(T.DATA_BLOCK_OFFSET, 21);
|
||||
public static final Key<Boolean> DATA_BLOCK_VISIBLE;
|
||||
|
||||
static {
|
||||
if (VehicleEntityHandle.T.isAvailable()) {
|
||||
@@ -90,11 +108,17 @@ class EntityMinecartAbstract extends Entity {
|
||||
DATA_SHAKING_DIRECTION = Key.Type.INTEGER.createKey(T.DATA_SHAKING_DIRECTION, 18);
|
||||
DATA_SHAKING_DAMAGE = Key.Type.FLOAT.createKey(T.DATA_SHAKING_DAMAGE, 19);
|
||||
}
|
||||
}
|
||||
|
||||
public static final Key<Integer> DATA_BLOCK_TYPE = Key.Type.INTEGER.createKey(T.DATA_BLOCK_TYPE, 20);
|
||||
public static final Key<Integer> DATA_BLOCK_OFFSET = Key.Type.INTEGER.createKey(T.DATA_BLOCK_OFFSET, 21);
|
||||
public static final Key<Boolean> DATA_BLOCK_VISIBLE = Key.Type.BOOLEAN.createKey(T.DATA_BLOCK_VISIBLE, 22);
|
||||
if (com.bergerkiller.bukkit.common.internal.CommonCapabilities.IS_MINECART_BLOCK_COMBINED_KEY) {
|
||||
DATA_CUSTOM_DISPLAY_BLOCK = Key.Type.BLOCK_DATA.createKey(T.DATA_ID_CUSTOM_DISPLAY_BLOCK, -1);
|
||||
DATA_BLOCK_TYPE = new Key.Disabled(Key.Type.INTEGER);
|
||||
DATA_BLOCK_VISIBLE = new Key.Disabled(Key.Type.BOOLEAN);
|
||||
} else {
|
||||
DATA_CUSTOM_DISPLAY_BLOCK = new Key.Disabled(Key.Type.BLOCK_DATA);
|
||||
DATA_BLOCK_TYPE = Key.Type.INTEGER.createKey(T.DATA_BLOCK_TYPE, 20);
|
||||
DATA_BLOCK_VISIBLE = Key.Type.BOOLEAN.createKey(T.DATA_BLOCK_VISIBLE, 22);
|
||||
}
|
||||
}
|
||||
</code>
|
||||
|
||||
public float getDamage();
|
||||
|
||||
@@ -3,12 +3,14 @@ package com.bergerkiller.bukkit.common;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import com.bergerkiller.bukkit.common.internal.CommonBootstrap;
|
||||
import com.bergerkiller.bukkit.common.internal.CommonCapabilities;
|
||||
import com.bergerkiller.bukkit.common.inventory.CommonItemStack;
|
||||
import com.bergerkiller.bukkit.common.math.Quaternion;
|
||||
import com.bergerkiller.bukkit.common.wrappers.BlockData;
|
||||
import com.bergerkiller.bukkit.common.wrappers.ItemDisplayMode;
|
||||
import com.bergerkiller.generated.net.minecraft.world.entity.DisplayHandle;
|
||||
import com.bergerkiller.generated.net.minecraft.world.entity.decoration.EntityItemFrameHandle;
|
||||
import com.bergerkiller.generated.net.minecraft.world.entity.vehicle.EntityMinecartAbstractHandle;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@@ -395,4 +397,22 @@ public class DataWatcherTest {
|
||||
assertEquals(mode, metadata.get(DisplayHandle.ItemDisplayHandle.DATA_ITEM_DISPLAY_MODE));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMinecartDisplayedBlock() {
|
||||
DataWatcher metadata = new DataWatcher();
|
||||
|
||||
BlockData testData = BlockData.fromMaterial(MaterialUtil.getFirst("DIAMOND_BLOCK", "LEGACY_DIAMOND_BLOCK"));
|
||||
|
||||
if (CommonCapabilities.IS_MINECART_BLOCK_COMBINED_KEY) {
|
||||
metadata.set(EntityMinecartAbstractHandle.DATA_CUSTOM_DISPLAY_BLOCK, testData);
|
||||
assertEquals(testData, metadata.get(EntityMinecartAbstractHandle.DATA_CUSTOM_DISPLAY_BLOCK));
|
||||
} else {
|
||||
metadata.set(EntityMinecartAbstractHandle.DATA_BLOCK_VISIBLE, true);
|
||||
assertEquals(true, metadata.get(EntityMinecartAbstractHandle.DATA_BLOCK_VISIBLE));
|
||||
|
||||
metadata.set(EntityMinecartAbstractHandle.DATA_BLOCK_TYPE, testData.getCombinedId());
|
||||
assertEquals(testData, BlockData.fromCombinedId(metadata.get(EntityMinecartAbstractHandle.DATA_BLOCK_TYPE)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user