mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 18:44:42 +00:00
spotless apply
This commit is contained in:
1 parent
6acf2bace1
commit
5e31096c7e
191 files changed
+5046
-5165
No files matched your search
@@ -31,5 +31,4 @@ public class BlockFluidDiscretizer extends FCBaseBlock {
|
||||
public ItemStack stack() {
|
||||
return new ItemStack(this, 1);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import com.glodblock.github.util.NameConst;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.EnumSet;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -22,8 +23,6 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
public class BlockFluidInterface extends FCBaseBlock {
|
||||
|
||||
public BlockFluidInterface() {
|
||||
@@ -31,29 +30,34 @@ public class BlockFluidInterface extends FCBaseBlock {
|
||||
setFullBlock(true);
|
||||
setOpaque(true);
|
||||
setTileEntity(TileFluidInterface.class);
|
||||
setFeature( EnumSet.of( AEFeature.Core ) );
|
||||
setFeature(EnumSet.of(AEFeature.Core));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
protected RenderBlockFluidInterface getRenderer()
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected RenderBlockFluidInterface getRenderer() {
|
||||
return new RenderBlockFluidInterface();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated(final World world, final int x, final int y, final int z, final EntityPlayer player, final int facing, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
public boolean onActivated(
|
||||
final World world,
|
||||
final int x,
|
||||
final int y,
|
||||
final int z,
|
||||
final EntityPlayer player,
|
||||
final int facing,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ) {
|
||||
if (player.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
final TileInterface tg = this.getTileEntity( world, x, y, z );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
InventoryHandler.openGui(player, world, new BlockPos(x, y, z), EnumFacing.getFront(facing), GuiType.DUAL_INTERFACE);
|
||||
final TileInterface tg = this.getTileEntity(world, x, y, z);
|
||||
if (tg != null) {
|
||||
if (Platform.isServer()) {
|
||||
InventoryHandler.openGui(
|
||||
player, world, new BlockPos(x, y, z), EnumFacing.getFront(facing), GuiType.DUAL_INTERFACE);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -61,17 +65,14 @@ public class BlockFluidInterface extends FCBaseBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean hasCustomRotation()
|
||||
{
|
||||
protected boolean hasCustomRotation() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void customRotateBlock(final IOrientable rotatable, final ForgeDirection axis )
|
||||
{
|
||||
if( rotatable instanceof TileInterface )
|
||||
{
|
||||
( (TileInterface) rotatable ).setSide( axis );
|
||||
protected void customRotateBlock(final IOrientable rotatable, final ForgeDirection axis) {
|
||||
if (rotatable instanceof TileInterface) {
|
||||
((TileInterface) rotatable).setSide(axis);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,5 +90,4 @@ public class BlockFluidInterface extends FCBaseBlock {
|
||||
public ItemStack stack() {
|
||||
return new ItemStack(this, 1);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,14 +24,20 @@ public class BlockFluidPacketDecoder extends FCBaseBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated(World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
public boolean onActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
if (player.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
TileFluidPacketDecoder tile = getTileEntity(world, x, y, z);
|
||||
if (tile != null) {
|
||||
if (!world.isRemote) {
|
||||
InventoryHandler.openGui(player, world, new BlockPos(x, y, z), EnumFacing.getFront(facing), GuiType.FLUID_PACKET_DECODER);
|
||||
InventoryHandler.openGui(
|
||||
player,
|
||||
world,
|
||||
new BlockPos(x, y, z),
|
||||
EnumFacing.getFront(facing),
|
||||
GuiType.FLUID_PACKET_DECODER);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -52,5 +58,4 @@ public class BlockFluidPacketDecoder extends FCBaseBlock {
|
||||
public ItemStack stack() {
|
||||
return new ItemStack(this, 1);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,14 +24,20 @@ public class BlockFluidPatternEncoder extends FCBaseBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated(World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
public boolean onActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
if (player.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
TileFluidPatternEncoder tile = getTileEntity(world, x, y, z);
|
||||
if (tile != null) {
|
||||
if (!world.isRemote) {
|
||||
InventoryHandler.openGui(player, world, new BlockPos(x, y, z), EnumFacing.getFront(facing), GuiType.FLUID_PATTERN_ENCODER);
|
||||
InventoryHandler.openGui(
|
||||
player,
|
||||
world,
|
||||
new BlockPos(x, y, z),
|
||||
EnumFacing.getFront(facing),
|
||||
GuiType.FLUID_PATTERN_ENCODER);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -52,5 +58,4 @@ public class BlockFluidPatternEncoder extends FCBaseBlock {
|
||||
public ItemStack stack() {
|
||||
return new ItemStack(this, 1);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,14 +25,16 @@ public class BlockIngredientBuffer extends FCBaseBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated(World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
public boolean onActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
if (player.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
TileIngredientBuffer tile = getTileEntity(world, x, y, z);
|
||||
if (tile != null) {
|
||||
if (!world.isRemote) {
|
||||
InventoryHandler.openGui(player, world, new BlockPos(x, y, z), EnumFacing.getFront(facing), GuiType.INGREDIENT_BUFFER);
|
||||
InventoryHandler.openGui(
|
||||
player, world, new BlockPos(x, y, z), EnumFacing.getFront(facing), GuiType.INGREDIENT_BUFFER);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -53,5 +55,4 @@ public class BlockIngredientBuffer extends FCBaseBlock {
|
||||
public ItemStack stack() {
|
||||
return new ItemStack(this, 1);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,14 +25,20 @@ public class BlockLargeIngredientBuffer extends FCBaseBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated(World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
public boolean onActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
if (player.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
TileLargeIngredientBuffer tile = getTileEntity(world, x, y, z);
|
||||
if (tile != null) {
|
||||
if (!world.isRemote) {
|
||||
InventoryHandler.openGui(player, world, new BlockPos(x, y, z), EnumFacing.getFront(facing), GuiType.LARGE_INGREDIENT_BUFFER);
|
||||
InventoryHandler.openGui(
|
||||
player,
|
||||
world,
|
||||
new BlockPos(x, y, z),
|
||||
EnumFacing.getFront(facing),
|
||||
GuiType.LARGE_INGREDIENT_BUFFER);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -53,5 +59,4 @@ public class BlockLargeIngredientBuffer extends FCBaseBlock {
|
||||
public ItemStack stack() {
|
||||
return new ItemStack(this, 1);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,7 +44,8 @@ public class BlockLevelMaintainer extends FCBaseBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated(World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
public boolean onActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
if (player.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
@@ -52,7 +53,12 @@ public class BlockLevelMaintainer extends FCBaseBlock {
|
||||
if (tile != null) {
|
||||
if (Platform.isServer()) {
|
||||
if (Util.hasPermission(player, SecurityPermissions.CRAFT, tile)) {
|
||||
InventoryHandler.openGui(player, world, new BlockPos(x, y, z), EnumFacing.getFront(facing), GuiType.LEVEL_MAINTAINER);
|
||||
InventoryHandler.openGui(
|
||||
player,
|
||||
world,
|
||||
new BlockPos(x, y, z),
|
||||
EnumFacing.getFront(facing),
|
||||
GuiType.LEVEL_MAINTAINER);
|
||||
} else {
|
||||
player.addChatComponentMessage(new ChatComponentText("You don't have permission to view."));
|
||||
}
|
||||
|
||||
@@ -25,14 +25,16 @@ public class BlockOCPatternEditor extends FCBaseBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated(World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
public boolean onActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, float hitY, float hitZ) {
|
||||
if (player.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
TileOCPatternEditor tile = getTileEntity(world, x, y, z);
|
||||
if (tile != null) {
|
||||
if (!world.isRemote) {
|
||||
InventoryHandler.openGui(player, world, new BlockPos(x, y, z), EnumFacing.getFront(facing), GuiType.OC_PATTERN_EDITOR);
|
||||
InventoryHandler.openGui(
|
||||
player, world, new BlockPos(x, y, z), EnumFacing.getFront(facing), GuiType.OC_PATTERN_EDITOR);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -56,5 +58,4 @@ public class BlockOCPatternEditor extends FCBaseBlock {
|
||||
public ItemStack stack() {
|
||||
return new ItemStack(this, 1);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,11 +3,10 @@ package com.glodblock.github.common.block;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.core.features.AEFeature;
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import java.util.EnumSet;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
public class FCBaseBlock extends AEBaseTileBlock {
|
||||
|
||||
public FCBaseBlock(Material mat, String name) {
|
||||
@@ -17,7 +16,7 @@ public class FCBaseBlock extends AEBaseTileBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTileEntity( final Class<? extends TileEntity> clazz ) {
|
||||
public void setTileEntity(final Class<? extends TileEntity> clazz) {
|
||||
super.setTileEntity(clazz);
|
||||
}
|
||||
|
||||
@@ -30,8 +29,7 @@ public class FCBaseBlock extends AEBaseTileBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFeature( final EnumSet<AEFeature> f ) {
|
||||
public void setFeature(final EnumSet<AEFeature> f) {
|
||||
super.setFeature(f);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user