mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 20:42:35 +00:00
Update for 1.11. Missing assets, unstable.
This commit is contained in:
1 parent
30d7365518
commit
9611ae08ae
1145 files changed
+15561
-18107
No files matched your search
@@ -5,11 +5,13 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.mail;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Locale;
|
||||
|
||||
public enum EnumAddressee {
|
||||
PLAYER, TRADER;
|
||||
|
||||
|
||||
@Nullable
|
||||
public static EnumAddressee fromString(String ident) {
|
||||
ident = ident.toLowerCase(Locale.ENGLISH);
|
||||
for (EnumAddressee addr : values()) {
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.mail;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
public enum EnumTradeStationState implements IPostalState {
|
||||
@@ -19,7 +17,7 @@ public enum EnumTradeStationState implements IPostalState {
|
||||
|
||||
private final String unlocalizedDescription;
|
||||
|
||||
EnumTradeStationState(@Nonnull String unlocalizedDescription) {
|
||||
EnumTradeStationState(String unlocalizedDescription) {
|
||||
this.unlocalizedDescription = unlocalizedDescription;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.mail;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.core.INbtWritable;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
public interface ILetter extends IInventory, INbtWritable {
|
||||
|
||||
ItemStack[] getPostage();
|
||||
NonNullList<ItemStack> getPostage();
|
||||
|
||||
void setProcessed(boolean flag);
|
||||
|
||||
@@ -28,9 +30,10 @@ public interface ILetter extends IInventory, INbtWritable {
|
||||
|
||||
boolean hasRecipient();
|
||||
|
||||
void setRecipient(IMailAddress address);
|
||||
void setRecipient(@Nullable IMailAddress address);
|
||||
|
||||
IMailAddress[] getRecipients();
|
||||
@Nullable
|
||||
IMailAddress getRecipient();
|
||||
|
||||
String getRecipientString();
|
||||
|
||||
@@ -46,11 +49,11 @@ public interface ILetter extends IInventory, INbtWritable {
|
||||
|
||||
void invalidatePostage();
|
||||
|
||||
ItemStack[] getAttachments();
|
||||
NonNullList<ItemStack> getAttachments();
|
||||
|
||||
void addAttachment(ItemStack itemstack);
|
||||
|
||||
void addAttachments(ItemStack[] itemstacks);
|
||||
void addAttachments(NonNullList<ItemStack> itemstacks);
|
||||
|
||||
int countAttachments();
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.mail;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.core.INbtWritable;
|
||||
@@ -17,5 +19,6 @@ public interface IMailAddress extends INbtWritable {
|
||||
|
||||
boolean isValid();
|
||||
|
||||
@Nullable
|
||||
GameProfile getPlayerProfile();
|
||||
}
|
||||
@@ -8,11 +8,12 @@ package forestry.api.mail;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IPostOffice {
|
||||
|
||||
void collectPostage(ItemStack[] stamps);
|
||||
void collectPostage(NonNullList<ItemStack> stamps);
|
||||
|
||||
IPostalState lodgeLetter(World world, ItemStack itemstack, boolean doLodge);
|
||||
|
||||
|
||||
@@ -5,30 +5,29 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.mail;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Map;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
public interface IPostRegistry {
|
||||
|
||||
/* POST OFFICE */
|
||||
IPostOffice getPostOffice(World world);
|
||||
|
||||
/* MAIL ADDRESSES */
|
||||
@Nonnull
|
||||
IMailAddress getMailAddress(@Nonnull GameProfile gameProfile);
|
||||
|
||||
IMailAddress getMailAddress(@Nonnull String traderName);
|
||||
IMailAddress getMailAddress(GameProfile gameProfile);
|
||||
|
||||
IMailAddress getMailAddress(String traderName);
|
||||
|
||||
/* LETTERS */
|
||||
boolean isLetter(ItemStack itemstack);
|
||||
|
||||
ILetter createLetter(IMailAddress sender, IMailAddress recipient);
|
||||
|
||||
@Nullable
|
||||
ILetter getLetter(ItemStack itemstack);
|
||||
|
||||
ItemStack createLetterStack(ILetter letter);
|
||||
@@ -37,10 +36,12 @@ public interface IPostRegistry {
|
||||
|
||||
/**
|
||||
* Registers a new {@link IPostalCarrier}. See {@link IPostalCarrier} for details.
|
||||
*
|
||||
* @param carrier {@link IPostalCarrier} to register.
|
||||
*/
|
||||
void registerCarrier(IPostalCarrier carrier);
|
||||
|
||||
@Nullable
|
||||
IPostalCarrier getCarrier(EnumAddressee uid);
|
||||
|
||||
Map<EnumAddressee, IPostalCarrier> getRegisteredCarriers();
|
||||
@@ -50,6 +51,7 @@ public interface IPostRegistry {
|
||||
|
||||
ITradeStation getOrCreateTradeStation(World world, GameProfile owner, IMailAddress address);
|
||||
|
||||
@Nullable
|
||||
ITradeStation getTradeStation(World world, IMailAddress address);
|
||||
|
||||
boolean isAvailableTradeAddress(World world, IMailAddress address);
|
||||
|
||||
@@ -8,6 +8,7 @@ package forestry.api.mail;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
public interface ITradeStationInfo {
|
||||
IMailAddress getAddress();
|
||||
@@ -16,7 +17,7 @@ public interface ITradeStationInfo {
|
||||
|
||||
ItemStack getTradegood();
|
||||
|
||||
ItemStack[] getRequired();
|
||||
NonNullList<ItemStack> getRequired();
|
||||
|
||||
EnumTradeStationState getState();
|
||||
}
|
||||
@@ -3,7 +3,12 @@
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
@API(apiVersion = "3.1.0", owner = "ForestryAPI|core", provides = "ForestryAPI|mail")
|
||||
package forestry.api.mail;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
import net.minecraftforge.fml.common.API;
|
||||
Reference in new issue
Block a user