mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
Fix halos not being usable. Closes #3006
This commit is contained in:
1 parent
cf5d748194
commit
8a8046ae81
2 files changed
+7
-3
No files matched your search
@@ -13,6 +13,7 @@ package vazkii.botania.client.gui.crafting;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.container.WorkbenchContainer;
|
||||
import net.minecraft.util.IWorldPosCallable;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@@ -23,8 +24,8 @@ import javax.annotation.Nonnull;
|
||||
*/
|
||||
public class ContainerCraftingHalo extends WorkbenchContainer {
|
||||
|
||||
public ContainerCraftingHalo(int windowId, PlayerInventory playerInv) {
|
||||
super(windowId, playerInv);
|
||||
public ContainerCraftingHalo(int windowId, PlayerInventory playerInv, IWorldPosCallable wp) {
|
||||
super(windowId, playerInv, wp);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,7 +33,9 @@ import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.IWorldPosCallable;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
@@ -94,8 +96,9 @@ public class ItemCraftingHalo extends ItemMod {
|
||||
|
||||
if(!world.isRemote) {
|
||||
if(segment == 0) {
|
||||
IWorldPosCallable wp = IWorldPosCallable.of(world, BlockPos.ZERO); // pos is never used by workbench
|
||||
player.openContainer(new SimpleNamedContainerProvider(
|
||||
(windowId, playerInv, p) -> new ContainerCraftingHalo(windowId, playerInv),
|
||||
(windowId, playerInv, p) -> new ContainerCraftingHalo(windowId, playerInv, wp),
|
||||
stack.getDisplayName()));
|
||||
} else {
|
||||
if(itemForPos.isEmpty())
|
||||
|
||||
Reference in new issue
Block a user