mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Fixed Oraxen, and custom dimension height.
This commit is contained in:
parent
5658d6709c
commit
c3de8b33de
@ -23,6 +23,8 @@ public abstract class BlockDataProvider {
|
||||
return getPlugin() != null;
|
||||
}
|
||||
|
||||
public abstract void init();
|
||||
|
||||
public abstract BlockData getBlockData(NamespacedKey blockId) throws MissingResourceException;
|
||||
|
||||
public abstract NamespacedKey[] getBlockTypes();
|
||||
|
@ -14,6 +14,9 @@ public class ItemAdderLink extends BlockDataProvider {
|
||||
super("ItemsAdder");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() { }
|
||||
|
||||
@Override
|
||||
public BlockData getBlockData(NamespacedKey blockId) throws MissingResourceException {
|
||||
return CustomBlock.getBaseBlockData(blockId.toString());
|
||||
|
@ -43,9 +43,10 @@ public class OraxenDataProvider extends BlockDataProvider {
|
||||
|
||||
private Map<String, MechanicFactory> factories;
|
||||
|
||||
public OraxenDataProvider() {
|
||||
super("Oraxen");
|
||||
if(getPlugin() != null) {
|
||||
public OraxenDataProvider() { super("Oraxen"); }
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
try {
|
||||
Field f = MechanicsManager.class.getDeclaredField(FIELD_FACTORIES_MAP);
|
||||
f.setAccessible(true);
|
||||
@ -55,7 +56,6 @@ public class OraxenDataProvider extends BlockDataProvider {
|
||||
Iris.error("\t" + e.getClass().getSimpleName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockData getBlockData(NamespacedKey blockId) throws MissingResourceException {
|
||||
|
@ -45,7 +45,11 @@ public class CustomBlockDataSVC implements IrisService {
|
||||
public void onDisable() { }
|
||||
|
||||
public void addProvider(BlockDataProvider... provider) {
|
||||
providers.add(provider);
|
||||
for(BlockDataProvider p : provider) {
|
||||
if(p.getPlugin() != null)
|
||||
providers.add(p);
|
||||
p.init();
|
||||
}
|
||||
}
|
||||
|
||||
public Optional<BlockData> getBlockData(NamespacedKey key) {
|
||||
|
@ -164,8 +164,6 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
||||
if(yy + (finalI << 4) >= engine.getHeight() || yy + (finalI << 4) < 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Iris.warn("Min: " + world.getMinHeight() + " | Max: " + world.getMaxHeight());
|
||||
c.getBlock(xx, yy + (finalI << 4) + world.getMinHeight(), zz)
|
||||
.setBlockData(tc.getBlockData(xx, yy + (finalI << 4) + world.getMinHeight(), zz), false);
|
||||
}
|
||||
|
@ -22,3 +22,4 @@ commands:
|
||||
aliases: [ ir, irs ]
|
||||
api-version: ${apiversion}
|
||||
hotload-dependencies: false
|
||||
softdepend: [ "Oraxen", "ItemsAdder", "IrisFeller"]
|
Loading…
x
Reference in New Issue
Block a user