Package codechicken.multipart.util
Record Class ProxyBlockAndTintGetter
java.lang.Object
java.lang.Record
codechicken.multipart.util.ProxyBlockAndTintGetter
- All Implemented Interfaces:
net.minecraft.world.level.BlockAndTintGetter,net.minecraft.world.level.BlockGetter,net.minecraft.world.level.LevelHeightAccessor,net.neoforged.neoforge.common.extensions.IBlockAndTintGetterExtension,net.neoforged.neoforge.common.extensions.IBlockGetterExtension
public record ProxyBlockAndTintGetter(net.minecraft.world.level.BlockAndTintGetter other, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.neoforged.neoforge.model.data.ModelData modelData)
extends Record
implements net.minecraft.world.level.BlockAndTintGetter
A simple
BlockAndTintGetter implementation proxying the world,
except for the given position.
Created by covers1624 on 7/18/26.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.BlockGetter
net.minecraft.world.level.BlockGetter.BlockStepVisitor -
Constructor Summary
ConstructorsConstructorDescriptionProxyBlockAndTintGetter(net.minecraft.world.level.BlockAndTintGetter other, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.neoforged.neoforge.model.data.ModelData modelData) Creates an instance of aProxyBlockAndTintGetterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.world.level.block.entity.BlockEntitygetBlockEntity(net.minecraft.core.BlockPos pos) net.minecraft.world.level.block.state.BlockStategetBlockState(net.minecraft.core.BlockPos pos) intgetBlockTint(net.minecraft.core.BlockPos pos, net.minecraft.world.level.ColorResolver resolver) net.minecraft.world.level.material.FluidStategetFluidState(net.minecraft.core.BlockPos pos) intnet.minecraft.world.level.lighting.LevelLightEngineintgetMinY()net.neoforged.neoforge.model.data.ModelDatagetModelData(net.minecraft.core.BlockPos pos) floatgetShade(net.minecraft.core.Direction face, boolean shade) final inthashCode()Returns a hash code value for this object.net.neoforged.neoforge.model.data.ModelDataReturns the value of themodelDatarecord component.net.minecraft.world.level.BlockAndTintGetterother()Returns the value of theotherrecord component.net.minecraft.core.BlockPospos()Returns the value of theposrecord component.net.minecraft.world.level.block.state.BlockStatestate()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.BlockAndTintGetter
canSeeSky, getBrightness, getRawBrightnessMethods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, isBlockInLineMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockAndTintGetterExtension
getShadeMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtension
getAuxLightManager, getAuxLightManagerMethods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxSectionY, getMaxY, getMinSectionY, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isInsideBuildHeight, isOutsideBuildHeight, isOutsideBuildHeight
-
Constructor Details
-
ProxyBlockAndTintGetter
public ProxyBlockAndTintGetter(net.minecraft.world.level.BlockAndTintGetter other, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.neoforged.neoforge.model.data.ModelData modelData) Creates an instance of aProxyBlockAndTintGetterrecord class.- Parameters:
other- the value for theotherrecord componentpos- the value for theposrecord componentstate- the value for thestaterecord componentmodelData- the value for themodelDatarecord component
-
-
Method Details
-
getModelData
public net.neoforged.neoforge.model.data.ModelData getModelData(net.minecraft.core.BlockPos pos) - Specified by:
getModelDatain interfacenet.neoforged.neoforge.common.extensions.IBlockGetterExtension
-
getBlockState
public net.minecraft.world.level.block.state.BlockState getBlockState(net.minecraft.core.BlockPos pos) - Specified by:
getBlockStatein interfacenet.minecraft.world.level.BlockGetter
-
getShade
public float getShade(net.minecraft.core.Direction face, boolean shade) - Specified by:
getShadein interfacenet.minecraft.world.level.BlockAndTintGetter
-
getLightEngine
public net.minecraft.world.level.lighting.LevelLightEngine getLightEngine()- Specified by:
getLightEnginein interfacenet.minecraft.world.level.BlockAndTintGetter
-
getBlockTint
public int getBlockTint(net.minecraft.core.BlockPos pos, net.minecraft.world.level.ColorResolver resolver) - Specified by:
getBlockTintin interfacenet.minecraft.world.level.BlockAndTintGetter
-
getBlockEntity
public @Nullable net.minecraft.world.level.block.entity.BlockEntity getBlockEntity(net.minecraft.core.BlockPos pos) - Specified by:
getBlockEntityin interfacenet.minecraft.world.level.BlockGetter
-
getFluidState
public net.minecraft.world.level.material.FluidState getFluidState(net.minecraft.core.BlockPos pos) - Specified by:
getFluidStatein interfacenet.minecraft.world.level.BlockGetter
-
getHeight
public int getHeight()- Specified by:
getHeightin interfacenet.minecraft.world.level.LevelHeightAccessor
-
getMinY
public int getMinY()- Specified by:
getMinYin interfacenet.minecraft.world.level.LevelHeightAccessor
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
other
public net.minecraft.world.level.BlockAndTintGetter other()Returns the value of theotherrecord component.- Returns:
- the value of the
otherrecord component
-
pos
public net.minecraft.core.BlockPos pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
state
public net.minecraft.world.level.block.state.BlockState state()Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
modelData
public net.neoforged.neoforge.model.data.ModelData modelData()Returns the value of themodelDatarecord component.- Returns:
- the value of the
modelDatarecord component
-