Skip to content

Commit

Permalink
Cleaned up some further stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
RealMangorage committed Sep 25, 2023
1 parent 19a0c37 commit 699cb46
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import net.minecraftforge.common.extensions.IForgeBlockEntity;
import net.minecraftforge.common.extensions.IForgeEntity;
import net.minecraftforge.common.extensions.IForgeItemStack;
import net.minecraftforge.common.extensions.IForgeLevel;
import net.minecraftforge.common.extensions.IForgeLevelChunk;
import net.minecraftforge.event.AttachCapabilitiesEvent;
import net.minecraftforge.fluids.capability.wrappers.FluidBucketWrapper;
Expand All @@ -29,7 +30,7 @@ public class CapabilitySystem {

private static HashSet<Consumer<AttachCapabilitiesEvent<?>>> find(HashSet<Consumer<AttachCapabilitiesEvent<?>>> lists, Class<?> cls) {
lists.addAll(FIND.getOrDefault(cls, EMPTY_LIST));
MilkBucketItem

for (Class<?> anInterface : cls.getInterfaces())
find(lists, anInterface);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
import net.minecraft.world.phys.HitResult;
import net.minecraftforge.common.ForgeMod;
import net.minecraftforge.common.ForgeSpawnEggItem;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.SoundAction;
import net.minecraftforge.common.capabilities.ICapabilitySerializable;
import net.minecraftforge.entity.PartEntity;
import net.minecraftforge.fluids.FluidType;
import net.minecraftforge.event.entity.EntityEvent;
import org.jetbrains.annotations.Nullable;

public interface IForgeEntity extends ICapabilitySerializable<CompoundTag>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@

import java.util.Collection;
import java.util.Collections;
import net.minecraft.world.level.Level;

import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.entity.PartEntity;

public interface IForgeLevel extends ICapabilityProvider
{
default Level self() {
return (Level) this;
}

/**
* The maximum radius to scan for entities when trying to check bounding boxes. Vanilla's default is
* 2.0D But mods that add larger entities may increase this.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

package net.minecraftforge.common.extensions;

public interface IForgeLevelChunk
import net.minecraftforge.common.capabilities.ICapabilityProvider;

public interface IForgeLevelChunk extends ICapabilityProvider
{
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;


/**
* Wrapper for vanilla and forge buckets.
* Swaps between empty bucket and filled bucket of the correct type.
Expand Down Expand Up @@ -175,4 +174,4 @@ public <T> LazyOptional<T> getCapability(@NotNull Capability<T> capability, @Nul
{
return ForgeCapabilities.FLUID_HANDLER_ITEM.orEmpty(capability, holder);
}
}
}

0 comments on commit 699cb46

Please sign in to comment.