mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 19:49:54 +00:00
Begin code cleanup for generics, types, warnings, nulls, and spelling
This commit is contained in:
1 parent
c9b2f7bd3e
commit
406392e7f7
98 files changed
+472
-314
No files matched your search
@@ -11,6 +11,7 @@
|
||||
package forestry.mail.blocks;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import forestry.core.blocks.IBlockType;
|
||||
import forestry.core.blocks.IMachineProperties;
|
||||
import forestry.core.blocks.MachineProperties;
|
||||
|
||||
@@ -27,11 +27,11 @@ import forestry.mail.POBoxInfo;
|
||||
public class GuiMailboxInfo extends Gui {
|
||||
|
||||
public enum XPosition {
|
||||
LEFT, RIGHT;
|
||||
LEFT, RIGHT
|
||||
}
|
||||
|
||||
public enum YPosition {
|
||||
TOP, BOTTOM;
|
||||
TOP, BOTTOM
|
||||
}
|
||||
|
||||
public static final GuiMailboxInfo instance = new GuiMailboxInfo();
|
||||
|
||||
@@ -46,7 +46,7 @@ public class AddresseeSlot extends Widget {
|
||||
|
||||
@Override
|
||||
protected String getLegacyTooltip(EntityPlayer player) {
|
||||
return StringUtil.localize("gui.addressee." + containerLetter.getCarrierType().toString());
|
||||
return StringUtil.localize("gui.addressee." + containerLetter.getCarrierType());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,7 @@ import forestry.core.items.ItemOverlay;
|
||||
|
||||
public class ItemStamps extends ItemOverlay implements IStamps {
|
||||
public ItemStamps() {
|
||||
super(CreativeTabForestry.tabForestry, EnumStampDefinition.VALUES);
|
||||
super(CreativeTabForestry.tabForestry, (IOverlayInfo[]) EnumStampDefinition.VALUES);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,10 +20,11 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
|
||||
import forestry.api.mail.ILetter;
|
||||
import forestry.api.mail.IMailAddress;
|
||||
import forestry.api.mail.IPostalState;
|
||||
@@ -89,12 +90,12 @@ public class TileMailbox extends TileBase implements IMailContainer {
|
||||
return PostRegistry.getOrCreatePOBox(worldObj, address);
|
||||
}
|
||||
|
||||
private IPostalState tryDispatchLetter(ItemStack letterstack) {
|
||||
ILetter letter = PostManager.postRegistry.getLetter(letterstack);
|
||||
private IPostalState tryDispatchLetter(ItemStack letterStack) {
|
||||
ILetter letter = PostManager.postRegistry.getLetter(letterStack);
|
||||
IPostalState result;
|
||||
|
||||
if (letter != null) {
|
||||
result = PostManager.postRegistry.getPostOffice(worldObj).lodgeLetter(worldObj, letterstack, true);
|
||||
result = PostManager.postRegistry.getPostOffice(worldObj).lodgeLetter(worldObj, letterStack, true);
|
||||
} else {
|
||||
result = EnumDeliveryState.NOT_MAILABLE;
|
||||
}
|
||||
@@ -102,7 +103,6 @@ public class TileMailbox extends TileBase implements IMailContainer {
|
||||
return result;
|
||||
}
|
||||
|
||||
/* IMAILCONTAINER */
|
||||
@Override
|
||||
public boolean hasMail() {
|
||||
|
||||
@@ -116,7 +116,6 @@ public class TileMailbox extends TileBase implements IMailContainer {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* ITRIGGERPROVIDER */
|
||||
@Optional.Method(modid = "BuildCraftAPI|statements")
|
||||
@Override
|
||||
public Collection<ITriggerExternal> getExternalTriggers(EnumFacing side, TileEntity tile) {
|
||||
|
||||
@@ -21,7 +21,9 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
|
||||
import forestry.api.core.IErrorLogic;
|
||||
import forestry.api.mail.IMailAddress;
|
||||
import forestry.api.mail.IStamps;
|
||||
@@ -310,7 +312,6 @@ public class TileTrader extends TileBase {
|
||||
return (TradeStation) PostManager.postRegistry.getOrCreateTradeStation(worldObj, getAccessHandler().getOwner(), address);
|
||||
}
|
||||
|
||||
/* ITRIGGERPROVIDER */
|
||||
@Optional.Method(modid = "BuildCraftAPI|statements")
|
||||
@Override
|
||||
public Collection<ITriggerExternal> getExternalTriggers(EnumFacing side, TileEntity tile) {
|
||||
|
||||
Reference in new issue
Block a user