mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-18 11:39:14 +00:00
humongous spotless apply to make CI happy
This commit is contained in:
1 parent
a0f11f404a
commit
834beb5ac8
114 files changed
+2121
-1858
No files matched your search
@@ -8,20 +8,19 @@ import java.util.Map;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import team.chisel.carving.Carving;
|
||||
import team.chisel.client.gui.GuiChisel;
|
||||
import team.chisel.utils.RecipeUtil;
|
||||
import codechicken.nei.api.GuiInfo;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingGroup;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.pahimar.ee3.api.exchange.RecipeRegistryProxy;
|
||||
|
||||
import codechicken.nei.api.GuiInfo;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import team.chisel.carving.Carving;
|
||||
import team.chisel.client.gui.GuiChisel;
|
||||
import team.chisel.utils.RecipeUtil;
|
||||
|
||||
public class Compatibility {
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@ package team.chisel.compat;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.carving.Carving;
|
||||
|
||||
import com.cricketcraft.chisel.api.IMC;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingRegistry;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.carving.Carving;
|
||||
|
||||
public class IMCHandler {
|
||||
|
||||
@@ -48,11 +48,11 @@ public class IMCHandler {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Chisel.logger.error(
|
||||
"Could not handle data {} for IMC type {}. This was sent from mod {}.\n"
|
||||
+ "!! This is a bug in that mod !!\nSwallowing error and continuing...",
|
||||
value,
|
||||
type.name(),
|
||||
message.getSender());
|
||||
"Could not handle data {} for IMC type {}. This was sent from mod {}.\n"
|
||||
+ "!! This is a bug in that mod !!\nSwallowing error and continuing...",
|
||||
value,
|
||||
type.name(),
|
||||
message.getSender());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,6 @@ package team.chisel.compat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -16,6 +11,11 @@ import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
|
||||
public class WailaCompat implements IWailaDataProvider {
|
||||
|
||||
private WailaCompat() {}
|
||||
@@ -27,31 +27,31 @@ public class WailaCompat implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack stack, List<String> strings, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler configHandler) {
|
||||
IWailaConfigHandler configHandler) {
|
||||
return strings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack stack, List<String> strings, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler configHandler) {
|
||||
IWailaConfigHandler configHandler) {
|
||||
if (accessor.getBlock() instanceof ICarvable) {
|
||||
ICarvable block = (ICarvable) accessor.getBlock();
|
||||
MovingObjectPosition pos = accessor.getPosition();
|
||||
strings.add(
|
||||
block.getManager(accessor.getWorld(), pos.blockX, pos.blockY, pos.blockZ, accessor.getMetadata())
|
||||
.getDescription());
|
||||
block.getManager(accessor.getWorld(), pos.blockX, pos.blockY, pos.blockZ, accessor.getMetadata())
|
||||
.getDescription());
|
||||
}
|
||||
return strings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack stack, List<String> strings, IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler configHandler) {
|
||||
IWailaConfigHandler configHandler) {
|
||||
return strings;
|
||||
}
|
||||
|
||||
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x,
|
||||
int y, int z) {
|
||||
int y, int z) {
|
||||
return tag;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@ package team.chisel.compat.fmp;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import codechicken.lib.vec.BlockCoord;
|
||||
import codechicken.multipart.MultiPartRegistry;
|
||||
import codechicken.multipart.MultiPartRegistry.IPartConverter;
|
||||
import codechicken.multipart.MultiPartRegistry.IPartFactory;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
|
||||
public class FMPCompat implements IPartFactory, IPartConverter {
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import team.chisel.block.BlockCarvableTorch;
|
||||
import codechicken.lib.vec.BlockCoord;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
import codechicken.multipart.TileMultipart;
|
||||
import codechicken.multipart.minecraft.TorchPart;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import team.chisel.block.BlockCarvableTorch;
|
||||
|
||||
public class ItemBlockChiselTorchPart extends ItemBlock {
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ItemBlockChiselTorchPart extends ItemBlock {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean func_150936_a(World world, int x, int y, int z, int side, EntityPlayer player, ItemStack stack) {
|
||||
return (placePart(world, new BlockCoord(x, y, z).offset(side), stack, side, false))
|
||||
|| (super.func_150936_a(world, x, y, z, side, player, stack));
|
||||
|| (super.func_150936_a(world, x, y, z, side, player, stack));
|
||||
}
|
||||
|
||||
public TMultiPart createMultiPart(World world, BlockCoord pos, ItemStack item, int side) {
|
||||
@@ -55,7 +55,7 @@ public class ItemBlockChiselTorchPart extends ItemBlock {
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side,
|
||||
float hitX, float hitY, float hitZ) {
|
||||
float hitX, float hitY, float hitZ) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
BlockCoord pos = new BlockCoord(x, y, z);
|
||||
if (!block.isReplaceable(world, x, y, z)) {
|
||||
@@ -63,12 +63,12 @@ public class ItemBlockChiselTorchPart extends ItemBlock {
|
||||
}
|
||||
if (placePart(world, pos, stack, side, !world.isRemote)) {
|
||||
world.playSoundEffect(
|
||||
pos.x + 0.5F,
|
||||
pos.y + 0.5F,
|
||||
pos.z + 0.5F,
|
||||
field_150939_a.stepSound.func_150496_b(),
|
||||
(block.stepSound.getVolume() + 1.0F) / 2.0F,
|
||||
block.stepSound.getPitch() * 0.8F);
|
||||
pos.x + 0.5F,
|
||||
pos.y + 0.5F,
|
||||
pos.z + 0.5F,
|
||||
field_150939_a.stepSound.func_150496_b(),
|
||||
(block.stepSound.getVolume() + 1.0F) / 2.0F,
|
||||
block.stepSound.getPitch() * 0.8F);
|
||||
stack.stackSize -= 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ package team.chisel.compat.fmp;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
import codechicken.lib.data.MCDataInput;
|
||||
import codechicken.lib.data.MCDataOutput;
|
||||
import codechicken.multipart.minecraft.TorchPart;
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
|
||||
public class PartChiselTorch extends TorchPart {
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@ package team.chisel.compat.nei;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.client.gui.GuiChisel;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.client.gui.GuiChisel;
|
||||
|
||||
public class NEIChiselConfig implements IConfigureNEI {
|
||||
|
||||
|
||||
@@ -11,16 +11,16 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import team.chisel.carving.Carving;
|
||||
import team.chisel.client.gui.GuiChisel;
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingGroup;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingGroup;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
import team.chisel.carving.Carving;
|
||||
import team.chisel.client.gui.GuiChisel;
|
||||
|
||||
public class RecipeHandlerChisel extends TemplateRecipeHandler {
|
||||
|
||||
@@ -109,10 +109,10 @@ public class RecipeHandlerChisel extends TemplateRecipeHandler {
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
this.transferRects.add(
|
||||
new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(75, 22, 15, 13),
|
||||
"chisel2.chisel",
|
||||
new Object[0]));
|
||||
new TemplateRecipeHandler.RecipeTransferRect(
|
||||
new Rectangle(75, 22, 15, 13),
|
||||
"chisel2.chisel",
|
||||
new Object[0]));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -120,7 +120,8 @@ public class RecipeHandlerChisel extends TemplateRecipeHandler {
|
||||
if (outputId.equals("chisel2.chisel")) {
|
||||
for (String name : Carving.chisel.getSortedGroupNames()) {
|
||||
ICarvingGroup g = Carving.chisel.getGroup(name);
|
||||
if (!g.getVariations().isEmpty()) {
|
||||
if (!g.getVariations()
|
||||
.isEmpty()) {
|
||||
addCached(getVariationStacks(g));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user