mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
fix: add missing BlockType constructor (#2306)
- Deprecate public BlockType constructors - People really should not be initialising their own block types. This can and most likely will cause issues. - Fixes #2290
This commit is contained in:
parent
a8c8a0fbd6
commit
01be53ed65
@ -78,13 +78,35 @@ public class BlockType implements Keyed, Pattern {
|
||||
this.id = i == -1 ? id : id.substring(0, i);
|
||||
this.settings = new BlockTypesCache.Settings(this, id, internalId, states);
|
||||
}
|
||||
//FAWE end
|
||||
|
||||
//FAWE start
|
||||
/**
|
||||
* @deprecated You should not be initialising your own BlockTypes, use {@link BlockTypes#get(String)} instead. If there is
|
||||
* a specific requirement to actually create new block types, please contact the FAWE devs to discuss. Use
|
||||
* {@link BlockTypes#get(String)} instead.
|
||||
*/
|
||||
@Deprecated(since = "TODO")
|
||||
//FAWE end
|
||||
public BlockType(String id) {
|
||||
this(id, null);
|
||||
}
|
||||
|
||||
//FAWE start
|
||||
/**
|
||||
* @deprecated You should not be initialising your own BlockTypes, use {@link BlockTypes#get(String)} instead. If there is
|
||||
* a specific requirement to actually create new block types, please contact the FAWE devs to discuss. Use
|
||||
* {@link BlockTypes#get(String)} instead.
|
||||
*/
|
||||
@Deprecated(since = "TODO")
|
||||
//FAWE end
|
||||
public BlockType(String id, Function<BlockState, BlockState> values) {
|
||||
// If it has no namespace, assume minecraft.
|
||||
if (!id.contains(":")) {
|
||||
id = "minecraft:" + id;
|
||||
}
|
||||
this.id = id;
|
||||
//FAWE start
|
||||
//TODO fix the line below
|
||||
this.settings = new BlockTypesCache.Settings(this, id, 0, null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user