More fixes
This commit is contained in:
@@ -34,15 +34,15 @@ import net.fabricmc.fabric.api.event.EventFactory;
|
||||
*/
|
||||
public interface LocatableEventAnnounce {
|
||||
|
||||
Event<LocatableEventAnnounce> EVENT = EventFactory.createArrayBacked(LocatableEventAnnounce.class, listeners -> (ILocatable o, LocatableEvent evt) -> {
|
||||
Event<LocatableEventAnnounce> EVENT = EventFactory.createArrayBacked(LocatableEventAnnounce.class, listeners -> (ILocatable target, LocatableEvent change) -> {
|
||||
for (LocatableEventAnnounce listener : listeners) {
|
||||
listener.onLocatableAnnounce(o, evt);
|
||||
listener.onLocatableAnnounce(target, change);
|
||||
}
|
||||
});
|
||||
|
||||
void onLocatableAnnounce(final ILocatable o, final LocatableEvent ev);
|
||||
void onLocatableAnnounce(final ILocatable target, final LocatableEvent change);
|
||||
|
||||
public enum LocatableEvent {
|
||||
enum LocatableEvent {
|
||||
/**
|
||||
* Adds the locatable to the registry
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,7 @@ package appeng.api.features;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import alexiil.mc.lib.attributes.Attribute;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.config.TunnelType;
|
||||
@@ -47,6 +48,8 @@ public interface IP2PTunnelRegistry {
|
||||
|
||||
void addNewAttunement(@Nonnull String ModId, @Nullable TunnelType type);
|
||||
|
||||
void addNewAttunement(@Nonnull Attribute<?> attr, @Nullable TunnelType type);
|
||||
|
||||
/**
|
||||
* returns null if no attunement can be found.
|
||||
*
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
package appeng.api.features;
|
||||
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.ServerWorldAccess;
|
||||
|
||||
@@ -32,7 +33,7 @@ public interface IWorldGen {
|
||||
|
||||
void disableWorldGenForDimension(WorldGenType type, Identifier dimID);
|
||||
|
||||
boolean isWorldGenEnabled(WorldGenType type, ServerWorldAccess w);
|
||||
boolean isWorldGenEnabled(WorldGenType type, ServerWorld w);
|
||||
|
||||
enum WorldGenType {
|
||||
CERTUS_QUARTZ, CHARGED_CERTUS_QUARTZ, METEORITES
|
||||
|
||||
@@ -50,11 +50,11 @@ public interface IMovableHandler {
|
||||
* <pre>
|
||||
* {
|
||||
* @code
|
||||
* Chunk c = world.getChunkAt(x, z);
|
||||
* Chunk c = world.getChunk(x, z);
|
||||
* c.setChunkBlockTileEntity(x & 0xF, y + y, z & 0xF, tile);
|
||||
*
|
||||
* if (c.isChunkLoaded) {
|
||||
* world.addTileEntity(tile);
|
||||
* world.addBlockEntity(tile);
|
||||
* world.markBlockForUpdate(x, y, z);
|
||||
* }
|
||||
* }
|
||||
|
||||
Reference in New Issue
Block a user