Infusion fixes
This commit is contained in:
parent
a6895004c7
commit
030ede58d3
4 changed files with 68 additions and 61 deletions
|
@ -30,9 +30,13 @@ public class InfusionPedestal extends PedestalBlock {
|
|||
if (blockEntity instanceof InfusionPedestalEntity) {
|
||||
InfusionPedestalEntity pedestal = (InfusionPedestalEntity) blockEntity;
|
||||
if (pedestal.hasRitual()) {
|
||||
InfusionRitual ritual = pedestal.getRitual();
|
||||
if (!ritual.isValid()) {
|
||||
ritual.configure();
|
||||
}
|
||||
pedestal.getRitual().checkRecipe();
|
||||
} else {
|
||||
InfusionRitual ritual = new InfusionRitual(world, pos);
|
||||
InfusionRitual ritual = new InfusionRitual(pedestal, world, pos);
|
||||
pedestal.linkRitual(ritual);
|
||||
ritual.checkRecipe();
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@ public class InfusionPedestalEntity extends PedestalBlockEntity {
|
|||
super.setLevelAndPosition(world, pos);
|
||||
if (hasRitual()) {
|
||||
linkedRitual.setLocation(world, pos);
|
||||
} else {
|
||||
linkRitual(new InfusionRitual(this, world, pos));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,7 +56,7 @@ public class InfusionPedestalEntity extends PedestalBlockEntity {
|
|||
protected void fromTag(CompoundTag tag) {
|
||||
super.fromTag(tag);
|
||||
if (tag.contains("ritual")) {
|
||||
linkedRitual = new InfusionRitual(level, worldPosition);
|
||||
linkedRitual = new InfusionRitual(this, level, worldPosition);
|
||||
linkedRitual.fromTag(tag.getCompound("ritual"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue