Class FurnaceUserModule

java.lang.Object
com.minecolonies.api.colony.buildings.modules.AbstractBuildingModule
com.minecolonies.core.colony.buildings.modules.FurnaceUserModule
All Implemented Interfaces:
IAltersRequiredItems, IBuildingModule, IModuleWithExternalBlocks, IPersistentModule, IHasDirty

Module for all workers that need a furnace.
  • Constructor Details

    • FurnaceUserModule

      public FurnaceUserModule()
      Construct a new furnace user module.
  • Method Details

    • deserializeNBT

      public void deserializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound)
      Description copied from interface: IPersistentModule
      Deserialize the module.
      Specified by:
      deserializeNBT in interface IPersistentModule
      Parameters:
      compound - the nbt compound.
    • serializeNBT

      public void serializeNBT(@NotNull net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag compound)
      Description copied from interface: IPersistentModule
      Serialize the module from a compound.
      Specified by:
      serializeNBT in interface IPersistentModule
      Parameters:
      compound - the compound.
    • alterItemsToBeKept

      public void alterItemsToBeKept(org.apache.logging.log4j.util.TriConsumer<Predicate<net.minecraft.world.item.ItemStack>,Integer,Boolean> consumer)
      Description copied from interface: IAltersRequiredItems
      Check if additional items have to be kept and add to map if necessary.
      Specified by:
      alterItemsToBeKept in interface IAltersRequiredItems
      Parameters:
      consumer - consumer that adds items to it.
    • removeFromFurnaces

      public void removeFromFurnaces(net.minecraft.core.BlockPos pos)
      Remove a furnace from the building.
      Parameters:
      pos - the position of it.
    • isAllowedFuel

      public boolean isAllowedFuel(net.minecraft.world.item.ItemStack stack)
      Check if an ItemStack is one of the accepted fuel items.
      Parameters:
      stack - the itemStack to check.
      Returns:
      true if so.
    • getFurnaces

      public List<net.minecraft.core.BlockPos> getFurnaces()
      Return a list of furnaces assigned to this hut.
      Returns:
      copy of the list
    • onBlockPlacedInBuilding

      public void onBlockPlacedInBuilding(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState blockState, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.Level world)
      Description copied from interface: IModuleWithExternalBlocks
      Attempt to register a specific block at a specific module.
      Specified by:
      onBlockPlacedInBuilding in interface IModuleWithExternalBlocks
      Parameters:
      blockState - the state.
      pos - the position.
      world - the world.
    • getRegisteredBlocks

      public List<net.minecraft.core.BlockPos> getRegisteredBlocks()
      Description copied from interface: IModuleWithExternalBlocks
      Get the list of registered blocks.
      Specified by:
      getRegisteredBlocks in interface IModuleWithExternalBlocks
      Returns:
      the list of positions of the blocks.