Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-07 00:22:51 +02: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
Dieser Commit ist enthalten in:
Ursprung
a8c8a0fbd6
Commit
01be53ed65
@ -78,13 +78,35 @@ public class BlockType implements Keyed, Pattern {
|
|||||||
this.id = i == -1 ? id : id.substring(0, i);
|
this.id = i == -1 ? id : id.substring(0, i);
|
||||||
this.settings = new BlockTypesCache.Settings(this, id, internalId, states);
|
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) {
|
public BlockType(String id, Function<BlockState, BlockState> values) {
|
||||||
// If it has no namespace, assume minecraft.
|
// If it has no namespace, assume minecraft.
|
||||||
if (!id.contains(":")) {
|
if (!id.contains(":")) {
|
||||||
id = "minecraft:" + id;
|
id = "minecraft:" + id;
|
||||||
}
|
}
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
//FAWE start
|
||||||
//TODO fix the line below
|
//TODO fix the line below
|
||||||
this.settings = new BlockTypesCache.Settings(this, id, 0, null);
|
this.settings = new BlockTypesCache.Settings(this, id, 0, null);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren