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
192538a741
commit
5658d6709c
@ -45,14 +45,15 @@ public class OraxenDataProvider extends BlockDataProvider {
|
|||||||
|
|
||||||
public OraxenDataProvider() {
|
public OraxenDataProvider() {
|
||||||
super("Oraxen");
|
super("Oraxen");
|
||||||
|
if(getPlugin() != null) {
|
||||||
try {
|
try {
|
||||||
Field f = MechanicsManager.class.getDeclaredField(FIELD_FACTORIES_MAP);
|
Field f = MechanicsManager.class.getDeclaredField(FIELD_FACTORIES_MAP);
|
||||||
f.setAccessible(true);
|
f.setAccessible(true);
|
||||||
factories = (Map<String, MechanicFactory>) f.get(null);
|
factories = (Map<String, MechanicFactory>) f.get(null);
|
||||||
} catch(NoSuchFieldException | IllegalAccessException e) {
|
} catch(NoSuchFieldException | IllegalAccessException e) {
|
||||||
Iris.error("Failed to set up Oraxen Link:");
|
Iris.error("Failed to set up Oraxen Link:");
|
||||||
Iris.error("\t" + e.getClass().getSimpleName());
|
Iris.error("\t" + e.getClass().getSimpleName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class CustomBlockDataSVC implements IrisService {
|
|||||||
|
|
||||||
public NamespacedKey[] getAllIdentifiers() {
|
public NamespacedKey[] getAllIdentifiers() {
|
||||||
KList<NamespacedKey> names = new KList<>();
|
KList<NamespacedKey> names = new KList<>();
|
||||||
providers.forEach(p -> names.add(p.getBlockTypes()));
|
providers.stream().filter(BlockDataProvider::isPresent).forEach(p -> names.add(p.getBlockTypes()));
|
||||||
return names.toArray(new NamespacedKey[0]);
|
return names.toArray(new NamespacedKey[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,7 @@ public class IrisDimension extends IrisRegistrant {
|
|||||||
@MaxNumber(2032)
|
@MaxNumber(2032)
|
||||||
@Desc("Maximum height at which players can be teleported to through gameplay.")
|
@Desc("Maximum height at which players can be teleported to through gameplay.")
|
||||||
private int logicalHeight = 256;
|
private int logicalHeight = 256;
|
||||||
|
|
||||||
@RegistryListResource(IrisJigsawStructure.class)
|
@RegistryListResource(IrisJigsawStructure.class)
|
||||||
@Desc("If defined, Iris will place the given jigsaw structure where minecraft should place the overworld stronghold.")
|
@Desc("If defined, Iris will place the given jigsaw structure where minecraft should place the overworld stronghold.")
|
||||||
private String stronghold;
|
private String stronghold;
|
||||||
@ -405,19 +406,20 @@ public class IrisDimension extends IrisRegistrant {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if(!dimensionHeight.equals(new IrisRange(-64, 320))) {
|
if(!dimensionHeight.equals(new IrisRange(-64, 320)) && this.name.equalsIgnoreCase("overworld")) {
|
||||||
File dimType = new File(datapacks, "iris/data/minecraft/dimension_type/" + getLoadKey().toLowerCase() + ".json");
|
File dimType = new File(datapacks, "iris/data/minecraft/dimension_type/overworld.json");
|
||||||
if(!dimType.exists())
|
if(!dimType.exists())
|
||||||
changed = true;
|
changed = true;
|
||||||
|
|
||||||
Iris.verbose(" Installing Data Pack Dimension Type: " + dimType.getPath());
|
Iris.verbose(" Installing Data Pack Dimension Type: " + dimType.getPath());
|
||||||
dimType.getParentFile().mkdirs();
|
dimType.getParentFile().mkdirs();
|
||||||
try {
|
try {
|
||||||
IO.writeAll(dimType, generateDatapackJson());
|
IO.writeAll(dimType, generateDatapackJson());
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
Iris.reportError(e);
|
Iris.reportError(e);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}*/
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(write) {
|
if(write) {
|
||||||
File mcm = new File(datapacks, "iris/pack.mcmeta");
|
File mcm = new File(datapacks, "iris/pack.mcmeta");
|
||||||
@ -465,19 +467,17 @@ public class IrisDimension extends IrisRegistrant {
|
|||||||
|
|
||||||
private static final String DP_OVERWORLD_DEFAULT = """
|
private static final String DP_OVERWORLD_DEFAULT = """
|
||||||
{
|
{
|
||||||
"name": "minecraft:overworld",
|
|
||||||
"ultrawarm": false,
|
"ultrawarm": false,
|
||||||
"natural": true,
|
"natural": true,
|
||||||
"coordinate_scale": 1.0,
|
"coordinate_scale": 1.0,
|
||||||
"has_skylight": true,
|
"has_skylight": true,
|
||||||
"has_ceiling": false,
|
"has_ceiling": false,
|
||||||
"ambient_light": 0,
|
"ambient_light": 0,
|
||||||
"fixed_time": false,
|
|
||||||
"piglin_safe": false,
|
"piglin_safe": false,
|
||||||
"bed_works": true,
|
"bed_works": true,
|
||||||
"respawn_anchor_works": false,
|
"respawn_anchor_works": false,
|
||||||
"has_raids": true,
|
"has_raids": true,
|
||||||
"infiniburn": "infiniburn_overworld",
|
"infiniburn": "#minecraft:infiniburn_overworld",
|
||||||
"effects": "minecraft:overworld"
|
"effects": "minecraft:overworld"
|
||||||
}""";
|
}""";
|
||||||
}
|
}
|
||||||
|
@ -165,6 +165,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Iris.warn("Min: " + world.getMinHeight() + " | Max: " + world.getMaxHeight());
|
||||||
c.getBlock(xx, yy + (finalI << 4) + world.getMinHeight(), zz)
|
c.getBlock(xx, yy + (finalI << 4) + world.getMinHeight(), zz)
|
||||||
.setBlockData(tc.getBlockData(xx, yy + (finalI << 4) + world.getMinHeight(), zz), false);
|
.setBlockData(tc.getBlockData(xx, yy + (finalI << 4) + world.getMinHeight(), zz), false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user