1.16 port
This commit is contained in:
@@ -45,7 +45,7 @@ public class FluidFormationPlaneScreen extends UpgradeableScreen<FluidFormationP
|
||||
|
||||
@Override
|
||||
protected void addButtons() {
|
||||
this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.textComponent(),
|
||||
this.itemRenderer, btn -> openPriorityGui()));
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
package appeng.fluids.client.gui;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
@@ -55,8 +57,8 @@ public class FluidInterfaceScreen extends UpgradeableScreen<FluidInterfaceContai
|
||||
this.guiSlots.add(new FluidSlotWidget(configFluids, i, i, 35 + 18 * i, 35));
|
||||
}
|
||||
|
||||
this.addButton(new TabButton(this.getGuiLeft() + 154, this.getGuiTop(), 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
this.itemRenderer, btn -> openPriorityGui()));
|
||||
this.addButton(new TabButton(this.getGuiLeft() + 154, this.getGuiTop(), 2 + 4 * 16,
|
||||
GuiText.Priority.textComponent(), this.itemRenderer, btn -> openPriorityGui()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,15 +66,16 @@ public class FluidInterfaceScreen extends UpgradeableScreen<FluidInterfaceContai
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
this.font.drawString(this.getGuiDisplayName(GuiText.FluidInterface.getLocal()), 8, 6, 4210752);
|
||||
this.font.drawString(GuiText.Config.getLocal(), 35, 6 + 11 + 7, 4210752);
|
||||
this.font.drawString(GuiText.StoredFluids.getLocal(), 35, 6 + 112 + 7, 4210752);
|
||||
this.font.drawString(GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752);
|
||||
public void drawFG(MatrixStack matrixStack, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
this.font.drawString(matrixStack, this.getGuiDisplayName(GuiText.FluidInterface.textComponent()).getString(), 8,
|
||||
6, 4210752);
|
||||
this.font.drawString(matrixStack, GuiText.Config.getLocal(), 35, 6 + 11 + 7, 4210752);
|
||||
this.font.drawString(matrixStack, GuiText.StoredFluids.getLocal(), 35, 6 + 112 + 7, 4210752);
|
||||
this.font.drawString(matrixStack, GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY, float partialTicks) {
|
||||
public void drawBG(MatrixStack matrixStack, int offsetX, int offsetY, int mouseX, int mouseY, float partialTicks) {
|
||||
this.bindTexture("guis/interfacefluid.png");
|
||||
GuiUtils.drawTexturedModalRect(offsetX, offsetY, 0, 0, this.xSize, this.ySize, 0 /* FIXME ZINDEX */ );
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
package appeng.fluids.client.gui;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
@@ -48,16 +50,17 @@ public class FluidLevelEmitterScreen extends UpgradeableScreen<FluidLevelEmitter
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(final int offsetX, final int offsetY, final int mouseX, final int mouseY, float partialTicks) {
|
||||
super.drawBG(offsetX, offsetY, mouseX, mouseY, partialTicks);
|
||||
this.level.render(mouseX, mouseY, partialTicks);
|
||||
public void drawBG(MatrixStack matrixStack, final int offsetX, final int offsetY, final int mouseX,
|
||||
final int mouseY, float partialTicks) {
|
||||
super.drawBG(matrixStack, offsetX, offsetY, mouseX, mouseY, partialTicks);
|
||||
this.level.render(matrixStack, mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.drawFG(offsetX, offsetY, mouseX, mouseY);
|
||||
public void drawFG(MatrixStack matrixStack, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.drawFG(matrixStack, offsetX, offsetY, mouseX, mouseY);
|
||||
|
||||
this.font.drawString(GuiText.FluidLevelEmitterUnit.getLocal(), 110, 44, COLOR_DARK_GRAY);
|
||||
this.font.drawString(matrixStack, GuiText.FluidLevelEmitterUnit.getLocal(), 110, 44, COLOR_DARK_GRAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
package appeng.fluids.client.gui;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
@@ -88,7 +90,7 @@ public class FluidStorageBusScreen extends UpgradeableScreen<FluidStorageBusCont
|
||||
this.fuzzyMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 88, Settings.FUZZY_MODE,
|
||||
FuzzyMode.IGNORE_ALL);
|
||||
|
||||
addButton(this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
|
||||
addButton(this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.textComponent(),
|
||||
this.itemRenderer, btn -> openPriorityGui())));
|
||||
|
||||
this.addButton(this.storageFilter);
|
||||
@@ -97,9 +99,9 @@ public class FluidStorageBusScreen extends UpgradeableScreen<FluidStorageBusCont
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
|
||||
this.font.drawString(this.getGuiDisplayName(this.getName().getLocal()), 8, 6, 4210752);
|
||||
this.font.drawString(GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752);
|
||||
public void drawFG(MatrixStack matrixStack, final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
|
||||
this.font.drawString(matrixStack, this.getGuiDisplayName(this.getName().textComponent()).getString(), 8, 6, 4210752);
|
||||
this.font.drawString(matrixStack, GuiText.inventory.textComponent().getString(), 8, this.ySize - 96 + 3, 4210752);
|
||||
|
||||
if (this.fuzzyMode != null) {
|
||||
this.fuzzyMode.set(this.cvb.getFuzzyMode());
|
||||
|
||||
@@ -24,6 +24,8 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import net.minecraft.client.util.InputMappings;
|
||||
@@ -125,13 +127,13 @@ public class FluidTerminalScreen extends AEBaseMEScreen<FluidTerminalContainer>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
this.font.drawString(this.getGuiDisplayName("Fluid Terminal"), 8, 6, 4210752);
|
||||
this.font.drawString(GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752);
|
||||
public void drawFG(MatrixStack matrixStack, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
this.font.drawString(matrixStack, "Fluid Terminal", 8, 6, 4210752);
|
||||
this.font.drawString(matrixStack, GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY, float partialTicks) {
|
||||
public void drawBG(MatrixStack matrixStack, int offsetX, int offsetY, int mouseX, int mouseY, float partialTicks) {
|
||||
this.bindTexture(this.getBackground());
|
||||
final int x_width = 197;
|
||||
GuiUtils.drawTexturedModalRect(offsetX, offsetY, 0, 0, x_width, 18, getBlitOffset());
|
||||
@@ -144,7 +146,7 @@ public class FluidTerminalScreen extends AEBaseMEScreen<FluidTerminalContainer>
|
||||
getBlitOffset());
|
||||
|
||||
if (this.searchField != null) {
|
||||
this.searchField.render(mouseX, mouseY, partialTicks);
|
||||
this.searchField.render(matrixStack, mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +157,7 @@ public class FluidTerminalScreen extends AEBaseMEScreen<FluidTerminalContainer>
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderHoveredToolTip(int mouseX, int mouseY) {
|
||||
protected void renderHoveredToolTip(MatrixStack matrixStack, int mouseX, int mouseY) {
|
||||
final Slot slot = this.getSlot(mouseX, mouseY);
|
||||
|
||||
if (slot instanceof IMEFluidSlot && slot.isEnabled()) {
|
||||
@@ -170,16 +172,16 @@ public class FluidTerminalScreen extends AEBaseMEScreen<FluidTerminalContainer>
|
||||
|
||||
final List<String> list = new ArrayList<>();
|
||||
|
||||
list.add(fluidStack.getFluidStack().getDisplayName().getFormattedText());
|
||||
list.add(fluidStack.getFluidStack().getDisplayName().getString());
|
||||
list.add(formattedAmount);
|
||||
list.add(modName);
|
||||
|
||||
this.renderTooltip(list, mouseX, mouseY);
|
||||
this.renderTooltip(matrixStack, list, mouseX, mouseY);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
super.renderHoveredToolTip(mouseX, mouseY);
|
||||
super.renderHoveredToolTip(matrixStack, mouseX, mouseY);
|
||||
}
|
||||
|
||||
private <S extends Enum<S>> void toggleServerSetting(SettingToggleButton<S> btn, boolean backwards) {
|
||||
|
||||
@@ -2,15 +2,17 @@ package appeng.fluids.client.gui.widgets;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.fluid.Fluid;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.FluidAttributes;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@@ -35,7 +37,7 @@ public class FluidSlotWidget extends CustomSlotWidget {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawContent(final Minecraft mc, final int mouseX, final int mouseY, final float partialTicks) {
|
||||
public void drawContent(MatrixStack matrixStack, final Minecraft mc, final int mouseX, final int mouseY, final float partialTicks) {
|
||||
final IAEFluidStack fs = this.getFluidStack();
|
||||
if (fs != null) {
|
||||
RenderSystem.disableBlend();
|
||||
@@ -52,7 +54,7 @@ public class FluidSlotWidget extends CustomSlotWidget {
|
||||
final float blue = (attributes.getColor() & 255) / 255.0F;
|
||||
RenderSystem.color3f(red, green, blue);
|
||||
|
||||
blit(xPos(), yPos(), this.getBlitOffset(), getWidth(), getHeight(), sprite);
|
||||
blit(matrixStack, xPos(), yPos(), this.getBlitOffset(), getWidth(), getHeight(), sprite);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,10 +78,10 @@ public class FluidSlotWidget extends CustomSlotWidget {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
public ITextComponent getMessage() {
|
||||
final IAEFluidStack fluid = this.getFluidStack();
|
||||
if (fluid != null) {
|
||||
return I18n.format(fluid.getFluidStack().getTranslationKey());
|
||||
return new TranslationTextComponent(fluid.getFluidStack().getTranslationKey());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.fluids.client.gui.widgets;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -25,6 +26,8 @@ import net.minecraft.client.gui.widget.Widget;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.fluid.Fluid;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fluids.FluidAttributes;
|
||||
@@ -40,17 +43,17 @@ public class FluidTankWidget extends Widget implements ITooltip {
|
||||
private final int slot;
|
||||
|
||||
public FluidTankWidget(IAEFluidTank tank, int slot, int x, int y, int w, int h) {
|
||||
super(x, y, w, h, "");
|
||||
super(x, y, w, h, new StringTextComponent(""));
|
||||
this.tank = tank;
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderButton(int mouseX, int mouseY, float partialTicks) {
|
||||
public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
|
||||
if (this.visible) {
|
||||
RenderSystem.disableBlend();
|
||||
|
||||
fill(this.x, this.y, this.x + this.width, this.y + this.height, AEColor.GRAY.blackVariant | 0xFF000000);
|
||||
fill(matrixStack, this.x, this.y, this.x + this.width, this.y + this.height, AEColor.GRAY.blackVariant | 0xFF000000);
|
||||
|
||||
final IAEFluidStack fluidStack = this.tank.getFluidInSlot(this.slot);
|
||||
if (fluidStack != null && fluidStack.getStackSize() > 0) {
|
||||
@@ -72,11 +75,11 @@ public class FluidTankWidget extends Widget implements ITooltip {
|
||||
|
||||
int iconHeightRemainder = scaledHeight % 16;
|
||||
if (iconHeightRemainder > 0) {
|
||||
blit(this.x, this.y + this.height - iconHeightRemainder, getBlitOffset(), 16, iconHeightRemainder,
|
||||
blit(matrixStack, this.x, this.y + this.height - iconHeightRemainder, getBlitOffset(), 16, iconHeightRemainder,
|
||||
sprite);
|
||||
}
|
||||
for (int i = 0; i < scaledHeight / 16; i++) {
|
||||
blit(this.x, this.y + this.height - iconHeightRemainder - (i + 1) * 16, getBlitOffset(), 16, 16,
|
||||
blit(matrixStack, this.x, this.y + this.height - iconHeightRemainder - (i + 1) * 16, getBlitOffset(), 16, 16,
|
||||
sprite);
|
||||
}
|
||||
}
|
||||
@@ -85,15 +88,15 @@ public class FluidTankWidget extends Widget implements ITooltip {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
public ITextComponent getMessage() {
|
||||
final IAEFluidStack fluid = this.tank.getFluidInSlot(this.slot);
|
||||
if (fluid != null && fluid.getStackSize() > 0) {
|
||||
String desc = fluid.getFluid().getAttributes().getDisplayName(fluid.getFluidStack()).getFormattedText();
|
||||
String amountToText = fluid.getStackSize() + "mB";
|
||||
|
||||
return desc + "\n" + amountToText;
|
||||
return new StringTextComponent(desc + "\n" + amountToText);
|
||||
}
|
||||
return "";
|
||||
return new StringTextComponent("");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,9 +9,10 @@ import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.IBucketPickupHandler;
|
||||
import net.minecraft.fluid.Fluid;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.fluid.IFluidState;
|
||||
import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tags.FluidTags;
|
||||
import net.minecraft.tags.ITag;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
@@ -231,7 +232,7 @@ public class FluidAnnihilationPlanePart extends BasicStatePart implements IGridT
|
||||
|
||||
BlockState blockstate = w.getBlockState(pos);
|
||||
if (blockstate.getBlock() instanceof IBucketPickupHandler) {
|
||||
IFluidState fluidState = blockstate.getFluidState();
|
||||
FluidState fluidState = blockstate.getFluidState();
|
||||
|
||||
Fluid fluid = fluidState.getFluid();
|
||||
if (isFluidBlacklisted(fluid)) {
|
||||
@@ -313,7 +314,7 @@ public class FluidAnnihilationPlanePart extends BasicStatePart implements IGridT
|
||||
}
|
||||
|
||||
private boolean isFluidBlacklisted(Fluid fluid) {
|
||||
Tag<Fluid> tag = FluidTags.getCollection().getOrCreate(TAG_BLACKLIST);
|
||||
ITag<Fluid> tag = FluidTags.getCollection().getOrCreate(TAG_BLACKLIST);
|
||||
return fluid.isIn(tag);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
import net.minecraftforge.client.model.data.IModelData;
|
||||
@@ -173,7 +173,7 @@ public class FluidFormationPlanePart extends AbstractFormationPlanePart<IAEFluid
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(FluidFormationPlaneContainer.TYPE, player, ContainerLocator.forPart(this));
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -130,7 +130,7 @@ public class FluidInterfacePart extends BasicStatePart
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity p, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity p, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(FluidInterfaceContainer.TYPE, p, ContainerLocator.forPart(this));
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
@@ -281,7 +281,7 @@ public class FluidLevelEmitterPart extends UpgradeablePart
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(FluidLevelEmitterContainer.TYPE, player, ContainerLocator.forPart(this));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
@@ -213,7 +213,7 @@ public class FluidStorageBusPart extends SharedStorageBusPart
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(FluidStorageBusContainer.TYPE, player, ContainerLocator.forPart(this));
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -90,7 +90,7 @@ public abstract class SharedFluidBusPart extends UpgradeablePart implements IGri
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vec3d pos) {
|
||||
public boolean onPartActivate(final PlayerEntity player, final Hand hand, final Vector3d pos) {
|
||||
if (Platform.isServer()) {
|
||||
ContainerOpener.openContainer(FluidIOContainer.TYPE, player, ContainerLocator.forPart(this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user