mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 08:25:31 +00:00
rename tag addon to query addon
This commit is contained in:
parent
dff2388b37
commit
92d173cb89
4
common/addons/biome-query-api/README.md
Normal file
4
common/addons/biome-query-api/README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Biome Query API
|
||||||
|
|
||||||
|
This addon contains an API to allow other addons to quickly query
|
||||||
|
Biome data, by baking queries and using Contexts on biomes.
|
@ -15,7 +15,7 @@ import com.dfsek.terra.api.world.biome.Biome;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
public class BiomeTagAPIAddon implements AddonInitializer {
|
public class BiomeQueryAPIAddon implements AddonInitializer {
|
||||||
@Inject
|
@Inject
|
||||||
private Platform platform;
|
private Platform platform;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.dfsek.terra.addons.biome.tag.impl;
|
package com.dfsek.terra.addons.biome.tag.impl;
|
||||||
|
|
||||||
import com.dfsek.terra.addons.biome.tag.BiomeTagAPIAddon;
|
import com.dfsek.terra.addons.biome.tag.BiomeQueryAPIAddon;
|
||||||
import com.dfsek.terra.api.world.biome.Biome;
|
import com.dfsek.terra.api.world.biome.Biome;
|
||||||
|
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
@ -19,13 +19,13 @@ public class SingleTagQuery implements Predicate<Biome> {
|
|||||||
if(tagIndex < 0) {
|
if(tagIndex < 0) {
|
||||||
tagIndex = biome
|
tagIndex = biome
|
||||||
.getContext()
|
.getContext()
|
||||||
.get(BiomeTagAPIAddon.BIOME_TAG_KEY)
|
.get(BiomeQueryAPIAddon.BIOME_TAG_KEY)
|
||||||
.getFlattener()
|
.getFlattener()
|
||||||
.index(tag);
|
.index(tag);
|
||||||
}
|
}
|
||||||
return biome
|
return biome
|
||||||
.getContext()
|
.getContext()
|
||||||
.get(BiomeTagAPIAddon.BIOME_TAG_KEY)
|
.get(BiomeQueryAPIAddon.BIOME_TAG_KEY)
|
||||||
.get(tagIndex);
|
.get(tagIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +0,0 @@
|
|||||||
# Biome Tag API
|
|
||||||
|
|
||||||
This addon contains an API to allow other addons to quickly query
|
|
||||||
Biome tags, by baking queries and using Contexts on biomes.
|
|
Loading…
x
Reference in New Issue
Block a user