mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
72 lines
2.8 KiB
Diff
72 lines
2.8 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockJukebox.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockJukebox.java
|
|
@@ -30,7 +30,7 @@
|
|
|
|
public static void registerFixesJukebox(DataFixer fixer)
|
|
{
|
|
- fixer.registerWalker(FixTypes.BLOCK_ENTITY, new ItemStackData(BlockJukebox.TileEntityJukebox.class, new String[] {"RecordItem"}));
|
|
+ fixer.registerWalker(FixTypes.BLOCK_ENTITY, new ItemStackData(TileEntityJukebox.class, new String[] {"RecordItem"}));
|
|
}
|
|
|
|
protected BlockJukebox()
|
|
@@ -59,22 +59,22 @@
|
|
{
|
|
TileEntity tileentity = worldIn.getTileEntity(pos);
|
|
|
|
- if (tileentity instanceof BlockJukebox.TileEntityJukebox)
|
|
+ if (tileentity instanceof TileEntityJukebox)
|
|
{
|
|
- ((BlockJukebox.TileEntityJukebox)tileentity).setRecord(recordStack.copy());
|
|
+ ((TileEntityJukebox)tileentity).setRecord(recordStack.copy());
|
|
worldIn.setBlockState(pos, state.withProperty(HAS_RECORD, Boolean.valueOf(true)), 2);
|
|
}
|
|
}
|
|
|
|
- private void dropRecord(World worldIn, BlockPos pos, IBlockState state)
|
|
+ public void dropRecord(World worldIn, BlockPos pos, IBlockState state)
|
|
{
|
|
if (!worldIn.isRemote)
|
|
{
|
|
TileEntity tileentity = worldIn.getTileEntity(pos);
|
|
|
|
- if (tileentity instanceof BlockJukebox.TileEntityJukebox)
|
|
+ if (tileentity instanceof TileEntityJukebox)
|
|
{
|
|
- BlockJukebox.TileEntityJukebox blockjukebox$tileentityjukebox = (BlockJukebox.TileEntityJukebox)tileentity;
|
|
+ TileEntityJukebox blockjukebox$tileentityjukebox = (TileEntityJukebox)tileentity;
|
|
ItemStack itemstack = blockjukebox$tileentityjukebox.getRecord();
|
|
|
|
if (!itemstack.isEmpty())
|
|
@@ -111,7 +111,7 @@
|
|
|
|
public TileEntity createNewTileEntity(World worldIn, int meta)
|
|
{
|
|
- return new BlockJukebox.TileEntityJukebox();
|
|
+ return new TileEntityJukebox();
|
|
}
|
|
|
|
public boolean hasComparatorInputOverride(IBlockState state)
|
|
@@ -123,9 +123,9 @@
|
|
{
|
|
TileEntity tileentity = worldIn.getTileEntity(pos);
|
|
|
|
- if (tileentity instanceof BlockJukebox.TileEntityJukebox)
|
|
+ if (tileentity instanceof TileEntityJukebox)
|
|
{
|
|
- ItemStack itemstack = ((BlockJukebox.TileEntityJukebox)tileentity).getRecord();
|
|
+ ItemStack itemstack = ((TileEntityJukebox)tileentity).getRecord();
|
|
|
|
if (!itemstack.isEmpty())
|
|
{
|
|
@@ -193,6 +193,10 @@
|
|
|
|
public void setRecord(ItemStack recordStack)
|
|
{
|
|
+ // CraftBukkit start - There can only be one
|
|
+ if (!recordStack.isEmpty()) {
|
|
+ recordStack.setCount(1);
|
|
+ }
|
|
this.record = recordStack;
|
|
this.markDirty();
|
|
}
|