Class AreaType
java.lang.Object
me.desht.pneumaticcraft.common.drone.progwidgets.area.AreaType
- Direct Known Subclasses:
AreaTypeBox,AreaTypeCylinder,AreaTypeGrid,AreaTypeLine,AreaTypePyramid,AreaTypeRandom,AreaTypeSphere,AreaTypeWall
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classAreaType.AreaTypeWidgetEnum<E extends Enum<?>>Adds a dropdownlist with alle the enum optionsstatic classAdds a number textbox.static enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddArea(Consumer<net.minecraft.core.BlockPos> areaAdder, net.minecraft.core.BlockPos p1, net.minecraft.core.BlockPos p2, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) Actually add the positions defined by this area to the given blockpos setvoidaddUIWidgets(List<AreaType.AreaTypeWidget> widgets) voidconvertFromLegacy(LegacyAreaWidgetConverter.EnumOldAreaType oldType, int typeInfo) Called when loading old-style programs from pastebin etc.getName()booleanWhether or not the area added in addArea is deterministic (used to determine if stuff can be cached or not).voidreadFromNBT(net.minecraft.nbt.CompoundTag tag) voidreadFromPacket(net.minecraft.network.FriendlyByteBuf buf) voidwriteToNBT(net.minecraft.nbt.CompoundTag tag) voidwriteToPacket(net.minecraft.network.FriendlyByteBuf buffer)
-
Constructor Details
-
AreaType
-
-
Method Details
-
getName
-
getTranslationKey
-
addArea
public abstract void addArea(Consumer<net.minecraft.core.BlockPos> areaAdder, net.minecraft.core.BlockPos p1, net.minecraft.core.BlockPos p2, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) Actually add the positions defined by this area to the given blockpos set- Parameters:
areaAdder- the adder; calladder.accept(pos)to add a blockposp1- the first raw blockpos of the areap2- the second raw blockpos of the areaminX- min X coordminY- min Y coordminZ- min Z coordmaxX- max X coordmaxY- max Y coordmaxZ- max Z coord
-
convertFromLegacy
Called when loading old-style programs from pastebin etc. Convert any old-fashioned area representations to their modern equivalents.- Parameters:
oldType- the old-style area typetypeInfo- extra integer type information used by some types
-
isDeterministic
public boolean isDeterministic()Whether or not the area added in addArea is deterministic (used to determine if stuff can be cached or not).- Returns:
- true if deterministic, false otherwise
-
writeToPacket
public void writeToPacket(net.minecraft.network.FriendlyByteBuf buffer) -
readFromPacket
public void readFromPacket(net.minecraft.network.FriendlyByteBuf buf) -
writeToNBT
public void writeToNBT(net.minecraft.nbt.CompoundTag tag) -
readFromNBT
public void readFromNBT(net.minecraft.nbt.CompoundTag tag) -
addUIWidgets
-