Skip to content

Commit

Permalink
[ci skip] spotlessApply with the new settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchej123 committed Jan 29, 2023
1 parent 97bcb24 commit dace71d
Show file tree
Hide file tree
Showing 176 changed files with 2,338 additions and 1,823 deletions.
10 changes: 5 additions & 5 deletions src/main/java/adventurebackpack/api/FluidEffect.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
import net.minecraftforge.fluids.FluidRegistry;

/**
* A Class you must extend to add player effects when drinking different fluids.
* The timeInSeconds and timeInSeconds in ticks may serve to set the duration of the effect.
* A Class you must extend to add player effects when drinking different fluids. The timeInSeconds and timeInSeconds in
* ticks may serve to set the duration of the effect.
*
* @author Darkona
*/
public abstract class FluidEffect {

public Fluid fluid;
public int timeInSeconds;
public int timeInTicks;
Expand Down Expand Up @@ -51,9 +52,8 @@ public int getEffectID() {
}

/**
* This method determines what will happen to the player (or world!) when drinking the
* corresponding fluid. For example set potion effects, set player on fire,
* heal, fill hunger, etc. You can use the world parameter to make
* This method determines what will happen to the player (or world!) when drinking the corresponding fluid. For
* example set potion effects, set player on fire, heal, fill hunger, etc. You can use the world parameter to make
* conditions based on where the player is.
*
* @param world The World.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.darkona.adventurebackpack;

import net.minecraftforge.common.MinecraftForge;

import com.darkona.adventurebackpack.config.ConfigHandler;
import com.darkona.adventurebackpack.fluids.FluidEffectRegistry;
import com.darkona.adventurebackpack.handlers.ClientEventHandler;
Expand All @@ -19,14 +21,14 @@
import com.darkona.adventurebackpack.reference.LoadedMods;
import com.darkona.adventurebackpack.reference.ModInfo;
import com.darkona.adventurebackpack.reference.WailaTileAdventureBackpack;

import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import net.minecraftforge.common.MinecraftForge;

/**
* Created on 10/10/2014
Expand All @@ -40,6 +42,7 @@
guiFactory = ModInfo.GUI_FACTORY_CLASS,
dependencies = "required-after:CodeChickenCore@[1.0.7.47,)")
public class AdventureBackpack {

@SidedProxy(clientSide = ModInfo.MOD_CLIENT_PROXY, serverSide = ModInfo.MOD_SERVER_PROXY)
public static IProxy proxy;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
package com.darkona.adventurebackpack;

import com.darkona.adventurebackpack.init.ModItems;
import com.darkona.adventurebackpack.reference.ModInfo;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;

import com.darkona.adventurebackpack.init.ModItems;
import com.darkona.adventurebackpack.reference.ModInfo;

/**
* Created on 11/10/2014.
*
* @author Javier Darkona
*/
public class CreativeTabAB {

public static final CreativeTabs TAB_AB = new CreativeTabs(ModInfo.MOD_ID) {

@Override
public Item getTabIconItem() {
return ModItems.machete;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* @author Darkona
*/
public class BackpackMaterial extends Material {

public BackpackMaterial() {
super(MapColor.brownColor);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,8 @@
import static com.darkona.adventurebackpack.reference.BackpackTypes.REDSTONE;
import static com.darkona.adventurebackpack.reference.BackpackTypes.UNKNOWN;

import com.darkona.adventurebackpack.AdventureBackpack;
import com.darkona.adventurebackpack.client.Icons;
import com.darkona.adventurebackpack.handlers.GuiHandler;
import com.darkona.adventurebackpack.reference.BackpackTypes;
import com.darkona.adventurebackpack.reference.GeneralReference;
import com.darkona.adventurebackpack.reference.ModInfo;
import com.darkona.adventurebackpack.util.BackpackUtils;
import com.darkona.adventurebackpack.util.CoordsUtils;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.client.renderer.texture.IIconRegister;
Expand All @@ -42,12 +32,26 @@
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;

import com.darkona.adventurebackpack.AdventureBackpack;
import com.darkona.adventurebackpack.client.Icons;
import com.darkona.adventurebackpack.handlers.GuiHandler;
import com.darkona.adventurebackpack.reference.BackpackTypes;
import com.darkona.adventurebackpack.reference.GeneralReference;
import com.darkona.adventurebackpack.reference.ModInfo;
import com.darkona.adventurebackpack.util.BackpackUtils;
import com.darkona.adventurebackpack.util.CoordsUtils;

import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

/**
* Created on 12/10/2014.
*
* @author Javier Darkona
*/
public class BlockAdventureBackpack extends BlockContainer {

public BlockAdventureBackpack() {
super(new BackpackMaterial());
setHardness(1.0f);
Expand Down Expand Up @@ -171,7 +175,7 @@ public String getUnlocalizedName() {
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) // TODO why this is HERE?
{
{
Icons.milkStill = iconRegister.registerIcon(ModInfo.MOD_ID + ":fluid.milk");
Icons.melonJuiceStill = iconRegister.registerIcon(ModInfo.MOD_ID + ":fluid.melonJuiceStill");
Icons.melonJuiceFlowing = iconRegister.registerIcon(ModInfo.MOD_ID + ":fluid.melonJuiceFlowing");
Expand All @@ -183,12 +187,12 @@ public void registerBlockIcons(IIconRegister iconRegister) // TODO why this is H
public int getLightValue(IBlockAccess world, int x, int y, int z) {
if (getAssociatedTileBackpackType(world, x, y, z) == GLOWSTONE) {
return 15;
} else if (world.getTileEntity(x, y, z) != null
&& world.getTileEntity(x, y, z) instanceof TileAdventureBackpack) {
return ((TileAdventureBackpack) world.getTileEntity(x, y, z)).getLuminosity();
} else {
return 0;
}
} else
if (world.getTileEntity(x, y, z) != null && world.getTileEntity(x, y, z) instanceof TileAdventureBackpack) {
return ((TileAdventureBackpack) world.getTileEntity(x, y, z)).getLuminosity();
} else {
return 0;
}
}

@Override
Expand All @@ -202,8 +206,8 @@ public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int s
}

@Override
public boolean onBlockActivated(
World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX,
float hitY, float hitZ) {
if (!world.isRemote && GeneralReference.isDimensionAllowed(player)) {
FMLNetworkHandler.openGui(player, AdventureBackpack.instance, GuiHandler.BACKPACK_TILE, world, x, y, z);
return true;
Expand Down Expand Up @@ -304,12 +308,7 @@ public MovingObjectPosition collisionRayTrace(World world, int x, int y, int z,
}

@Override
public boolean canReplace(
World p_149705_1_,
int p_149705_2_,
int p_149705_3_,
int p_149705_4_,
int p_149705_5_,
public boolean canReplace(World p_149705_1_, int p_149705_2_, int p_149705_3_, int p_149705_4_, int p_149705_5_,
ItemStack p_149705_6_) {
return false;
}
Expand All @@ -319,8 +318,7 @@ public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, i
TileEntity tile = world.getTileEntity(x, y, z);

if (tile instanceof TileAdventureBackpack && !world.isRemote && player != null) {
if ((player.isSneaking())
? ((TileAdventureBackpack) tile).equip(world, player, x, y, z)
if ((player.isSneaking()) ? ((TileAdventureBackpack) tile).equip(world, player, x, y, z)
: ((TileAdventureBackpack) tile).drop(world, player, x, y, z)) {
return world.func_147480_a(x, y, z, false);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package com.darkona.adventurebackpack.block;

import com.darkona.adventurebackpack.CreativeTabAB;
import com.darkona.adventurebackpack.reference.ModInfo;
import com.darkona.adventurebackpack.util.CoordsUtils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.Random;

import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
Expand All @@ -17,12 +13,20 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;

import com.darkona.adventurebackpack.CreativeTabAB;
import com.darkona.adventurebackpack.reference.ModInfo;
import com.darkona.adventurebackpack.util.CoordsUtils;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

/**
* Created on 05/01/2015
*
* @author Darkona
*/
public class BlockCampFire extends BlockContainer {

private IIcon icon;

public BlockCampFire() {
Expand Down Expand Up @@ -131,8 +135,8 @@ public boolean isBed(IBlockAccess world, int x, int y, int z, EntityLivingBase p
@Override
public ChunkCoordinates getBedSpawnPosition(IBlockAccess world, int x, int y, int z, EntityPlayer player) {
for (int i = y - 5; i <= y + 5; i++) {
ChunkCoordinates spawn =
CoordsUtils.getNearestEmptyChunkCoordinatesSpiral(world, x, z, x, i, z, 8, true, 1, (byte) 0, true);
ChunkCoordinates spawn = CoordsUtils
.getNearestEmptyChunkCoordinatesSpiral(world, x, z, x, i, z, 8, true, 1, (byte) 0, true);

if (spawn != null) {
return spawn;
Expand Down
Loading

0 comments on commit dace71d

Please sign in to comment.