Ability to send data when player first enters the level

This commit is contained in:
Frank Bauer 2021-07-31 13:51:39 +02:00
parent 4fc9c06204
commit 7bfe0b01cd
6 changed files with 80 additions and 12 deletions

View file

@ -6,21 +6,23 @@ import java.util.function.Supplier;
public class DataHandlerDescriptor {
public DataHandlerDescriptor(ResourceLocation identifier, Supplier<DataHandler> instancer){
this(identifier, instancer, instancer, false);
this(identifier, instancer, instancer, false, false);
}
public DataHandlerDescriptor(ResourceLocation identifier, Supplier<DataHandler> instancer, boolean sendOnJoin){
this(identifier, instancer, instancer, sendOnJoin);
public DataHandlerDescriptor(ResourceLocation identifier, Supplier<DataHandler> instancer, boolean sendOnJoin, boolean sendBeforeEnter){
this(identifier, instancer, instancer, sendOnJoin, sendBeforeEnter);
}
public DataHandlerDescriptor(ResourceLocation identifier, Supplier<DataHandler> receiv_instancer, Supplier<DataHandler> join_instancer, boolean sendOnJoin){
public DataHandlerDescriptor(ResourceLocation identifier, Supplier<DataHandler> receiv_instancer, Supplier<DataHandler> join_instancer, boolean sendOnJoin, boolean sendBeforeEnter){
this.INSTANCE = receiv_instancer;
this.JOIN_INSTANCE = join_instancer;
this.IDENTIFIER = identifier;
this.sendOnJoin = sendOnJoin;
this.sendBeforeEnter = sendBeforeEnter;
}
public final boolean sendOnJoin;
public final boolean sendBeforeEnter;
public final ResourceLocation IDENTIFIER;
public final Supplier<DataHandler> INSTANCE;
public final Supplier<DataHandler> JOIN_INSTANCE;