Adding proper constructor data to ItemRailingTransfer
This commit is contained in:
parent
b62a1d5f3e
commit
2a6a027787
1 changed files with 7 additions and 6 deletions
|
@ -18,14 +18,15 @@ public class ItemRailingTransfer implements IItemRailingTransfer
|
||||||
{
|
{
|
||||||
private ItemStack stack;
|
private ItemStack stack;
|
||||||
private EnumColor color;
|
private EnumColor color;
|
||||||
private IItemRailing railing;
|
private WeakReference<IItemRailing> railing;
|
||||||
private WeakReference<IItemRailing> endTarget = null;
|
private WeakReference<IItemRailing> endTarget;
|
||||||
|
|
||||||
public ItemRailingTransfer(ItemStack stack, PartRailing railing)
|
public ItemRailingTransfer(ItemStack stack, PartRailing railing)
|
||||||
{
|
{
|
||||||
this.stack = stack.copy();
|
this.stack = stack.copy();
|
||||||
this.color = EnumColor.ORANGE;
|
this.color = null;
|
||||||
this.railing = railing.getNode();
|
this.railing = new WeakReference<IItemRailing>(railing.getNode());
|
||||||
|
this.endTarget = new WeakReference<IItemRailing>(railing.getNode().getGrid().findTargetForIItemTransfer(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemRailingTransfer(Item item, PartRailing railing)
|
public ItemRailingTransfer(Item item, PartRailing railing)
|
||||||
|
@ -54,13 +55,13 @@ public class ItemRailingTransfer implements IItemRailingTransfer
|
||||||
@Override
|
@Override
|
||||||
public IItemRailing getRailing()
|
public IItemRailing getRailing()
|
||||||
{
|
{
|
||||||
return this.railing;
|
return this.railing.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IItemRailingTransfer setRailing(IItemRailing railing)
|
public IItemRailingTransfer setRailing(IItemRailing railing)
|
||||||
{
|
{
|
||||||
this.railing = railing;
|
this.railing = new WeakReference<IItemRailing>(railing);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue