mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 22:31:52 +00:00
format
This commit is contained in:
@@ -3,17 +3,12 @@ package com.dfsek.terra.addons.ore;
|
|||||||
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
|
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
|
||||||
import com.dfsek.terra.api.Platform;
|
import com.dfsek.terra.api.Platform;
|
||||||
import com.dfsek.terra.api.addon.BaseAddon;
|
import com.dfsek.terra.api.addon.BaseAddon;
|
||||||
import com.dfsek.terra.api.addon.TerraAddon;
|
|
||||||
import com.dfsek.terra.api.addon.annotations.Addon;
|
|
||||||
import com.dfsek.terra.api.addon.annotations.Author;
|
|
||||||
import com.dfsek.terra.api.addon.annotations.Version;
|
|
||||||
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
|
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
|
||||||
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
|
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
|
||||||
import com.dfsek.terra.api.inject.annotations.Inject;
|
import com.dfsek.terra.api.inject.annotations.Inject;
|
||||||
import com.dfsek.terra.api.world.generator.GenerationStageProvider;
|
import com.dfsek.terra.api.world.generator.GenerationStageProvider;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class OreAddon implements AddonInitializer {
|
public class OreAddon implements AddonInitializer {
|
||||||
@Inject
|
@Inject
|
||||||
private Platform platform;
|
private Platform platform;
|
||||||
@@ -27,9 +22,9 @@ public class OreAddon implements AddonInitializer {
|
|||||||
.getHandler(FunctionalEventHandler.class)
|
.getHandler(FunctionalEventHandler.class)
|
||||||
.register(addon, ConfigPackPreLoadEvent.class)
|
.register(addon, ConfigPackPreLoadEvent.class)
|
||||||
.then(event -> {
|
.then(event -> {
|
||||||
event.getPack().registerConfigType(new OreConfigType(), "ORE", 1);
|
event.getPack().registerConfigType(new OreConfigType(), "ORE", 1);
|
||||||
event.getPack().getOrCreateRegistry(GenerationStageProvider.class).register("ORE", pack -> new OrePopulator(platform));
|
event.getPack().getOrCreateRegistry(GenerationStageProvider.class).register("ORE", pack -> new OrePopulator(platform));
|
||||||
})
|
})
|
||||||
.failThrough();
|
.failThrough();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ public abstract class Ore {
|
|||||||
private final Map<BlockType, BlockState> materials;
|
private final Map<BlockType, BlockState> materials;
|
||||||
protected Platform platform;
|
protected Platform platform;
|
||||||
|
|
||||||
public Ore(BlockState material, MaterialSet replaceable, boolean applyGravity, Platform platform, Map<BlockType, BlockState> materials) {
|
public Ore(BlockState material, MaterialSet replaceable, boolean applyGravity, Platform platform,
|
||||||
|
Map<BlockType, BlockState> materials) {
|
||||||
this.material = material;
|
this.material = material;
|
||||||
this.replaceable = replaceable;
|
this.replaceable = replaceable;
|
||||||
this.applyGravity = applyGravity;
|
this.applyGravity = applyGravity;
|
||||||
|
|||||||
+1
-2
@@ -1,12 +1,11 @@
|
|||||||
package com.dfsek.terra.addons.ore.ores;
|
package com.dfsek.terra.addons.ore.ores;
|
||||||
|
|
||||||
import com.dfsek.terra.api.Platform;
|
|
||||||
|
|
||||||
import net.jafama.FastMath;
|
import net.jafama.FastMath;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.dfsek.terra.api.Platform;
|
||||||
import com.dfsek.terra.api.block.BlockType;
|
import com.dfsek.terra.api.block.BlockType;
|
||||||
import com.dfsek.terra.api.block.state.BlockState;
|
import com.dfsek.terra.api.block.state.BlockState;
|
||||||
import com.dfsek.terra.api.util.Range;
|
import com.dfsek.terra.api.util.Range;
|
||||||
|
|||||||
Reference in New Issue
Block a user