Package net.minecraft.gametest.framework
Class GameTestHelper
java.lang.Object
net.minecraft.gametest.framework.GameTestHelper
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabsolutePos
(BlockPos p_177450_) absoluteVec
(Vec3 p_177228_) void
assertAtTickTimeContainerContains
(long p_177124_, BlockPos p_177125_, Item p_177126_) void
assertAtTickTimeContainerEmpty
(long p_177121_, BlockPos p_177122_) void
assertBlock
(BlockPos p_177272_, Predicate<Block> p_177273_, String p_177274_) void
void
assertBlockNotPresent
(Block p_177337_, int p_177338_, int p_177339_, int p_177340_) void
assertBlockNotPresent
(Block p_177342_, BlockPos p_177343_) void
assertBlockPresent
(Block p_177204_, int p_177205_, int p_177206_, int p_177207_) void
assertBlockPresent
(Block p_177209_, BlockPos p_177210_) <T extends Comparable<T>>
voidassertBlockProperty
(BlockPos p_177260_, Property<T> p_177261_, Predicate<T> p_177262_, String p_177263_) <T extends Comparable<T>>
voidassertBlockProperty
(BlockPos p_177256_, Property<T> p_177257_, T p_177258_) void
assertBlockState
(BlockPos p_177358_, Predicate<BlockState> p_177359_, Supplier<String> p_177360_) void
assertContainerContains
(BlockPos p_177243_, Item p_177244_) void
assertContainerEmpty
(BlockPos p_177441_) void
assertEntitiesPresent
(EntityType<?> p_239372_, BlockPos p_239373_, int p_239374_, double p_239375_) <E extends Entity,
T>
voidassertEntityData
(BlockPos p_177238_, EntityType<E> p_177239_, Function<? super E, T> p_177240_, T p_177241_) void
assertEntityInstancePresent
(Entity p_177133_, int p_177134_, int p_177135_, int p_177136_) void
assertEntityInstancePresent
(Entity p_177141_, BlockPos p_177142_) void
assertEntityNotPresent
(EntityType<?> p_177310_) void
assertEntityNotPresent
(EntityType<?> p_177398_, int p_177399_, int p_177400_, int p_177401_) void
assertEntityNotPresent
(EntityType<?> p_177403_, BlockPos p_177404_) void
assertEntityNotTouching
(EntityType<?> p_177312_, double p_177313_, double p_177314_, double p_177315_) void
assertEntityPresent
(EntityType<?> p_177157_) void
assertEntityPresent
(EntityType<?> p_177370_, int p_177371_, int p_177372_, int p_177373_) void
assertEntityPresent
(EntityType<?> p_177375_, BlockPos p_177376_) void
assertEntityPresent
(EntityType<?> p_177180_, BlockPos p_177181_, double p_177182_) <E extends Entity,
T>
voidassertEntityProperty
(E p_177148_, Function<E, T> p_177149_, String p_177150_, T p_177151_) <E extends Entity>
voidassertEntityProperty
(E p_177153_, Predicate<E> p_177154_, String p_177155_) void
assertEntityTouching
(EntityType<?> p_177159_, double p_177160_, double p_177161_, double p_177162_) void
assertItemEntityCountIs
(Item p_177199_, BlockPos p_177200_, double p_177201_, int p_177202_) void
assertItemEntityNotPresent
(Item p_236779_, BlockPos p_236780_, double p_236781_) void
assertItemEntityPresent
(Item p_177195_, BlockPos p_177196_, double p_177197_) void
assertSameBlockState
(BlockPos p_177269_, BlockPos p_177270_) void
assertSameBlockStates
(BoundingBox p_177225_, BlockPos p_177226_) void
destroyBlock
(BlockPos p_177435_) private void
void
void
void
void
void
failIfEver
(Runnable p_177411_) void
forEveryBlockInStructure
(Consumer<BlockPos> p_177293_) getBlockEntity
(BlockPos p_177348_) getBlockState
(BlockPos p_177233_) private AABB
getEntities
(EntityType<T> p_238400_, BlockPos p_238401_, double p_238402_) int
getHeight
(Heightmap.Types p_236775_, int p_236776_, int p_236777_) getLevel()
private AABB
long
getTick()
void
makeAboutToDrown
(LivingEntity p_177184_) void
onEachTick
(Runnable p_177424_) void
pressButton
(int p_177104_, int p_177105_, int p_177106_) void
pressButton
(BlockPos p_177386_) void
pullLever
(int p_177303_, int p_177304_, int p_177305_) void
void
pulseRedstone
(BlockPos p_177235_, long p_177236_) void
randomTick
(BlockPos p_177447_) relativePos
(BlockPos p_177453_) void
runAfterDelay
(long p_177307_, Runnable p_177308_) void
runAtTickTime
(long p_177128_, Runnable p_177129_) void
void
setBlock
(int p_177113_, int p_177114_, int p_177115_, BlockState p_177116_) void
void
setBlock
(BlockPos p_177253_, BlockState p_177254_) void
setDayTime
(int p_177102_) void
setNight()
<E extends Entity>
Espawn
(EntityType<E> p_177164_, float p_177165_, float p_177166_, float p_177167_) <E extends Entity>
Espawn
(EntityType<E> p_177169_, int p_177170_, int p_177171_, int p_177172_) <E extends Entity>
Espawn
(EntityType<E> p_177177_, BlockPos p_177178_) <E extends Entity>
Espawn
(EntityType<E> p_177174_, Vec3 p_177175_) <E extends Mob>
EspawnWithNoFreeWill
(EntityType<E> p_177317_, float p_177318_, float p_177319_, float p_177320_) <E extends Mob>
EspawnWithNoFreeWill
(EntityType<E> p_177322_, int p_177323_, int p_177324_, int p_177325_) <E extends Mob>
EspawnWithNoFreeWill
(EntityType<E> p_177330_, BlockPos p_177331_) <E extends Mob>
EspawnWithNoFreeWill
(EntityType<E> p_177327_, Vec3 p_177328_) void
succeed()
void
void
succeedOnTickWhen
(int p_177118_, Runnable p_177119_) void
succeedWhen
(Runnable p_177362_) void
succeedWhenBlockPresent
(Block p_177378_, int p_177379_, int p_177380_, int p_177381_) void
succeedWhenBlockPresent
(Block p_177383_, BlockPos p_177384_) <E extends Entity,
T>
voidsucceedWhenEntityData
(BlockPos p_177350_, EntityType<E> p_177351_, Function<E, T> p_177352_, T p_177353_) void
succeedWhenEntityNotPresent
(EntityType<?> p_177427_, int p_177428_, int p_177429_, int p_177430_) void
succeedWhenEntityNotPresent
(EntityType<?> p_177432_, BlockPos p_177433_) void
succeedWhenEntityPresent
(EntityType<?> p_177414_, int p_177415_, int p_177416_, int p_177417_) void
succeedWhenEntityPresent
(EntityType<?> p_177419_, BlockPos p_177420_) void
-
Field Details
-
testInfo
-
finalCheckAdded
private boolean finalCheckAdded
-
-
Constructor Details
-
GameTestHelper
-
-
Method Details
-
getLevel
-
getBlockState
-
getBlockEntity
-
killAllEntities
public void killAllEntities() -
spawnItem
-
spawn
-
spawn
-
spawn
public <E extends Entity> E spawn(EntityType<E> p_177169_, int p_177170_, int p_177171_, int p_177172_) -
spawn
public <E extends Entity> E spawn(EntityType<E> p_177164_, float p_177165_, float p_177166_, float p_177167_) -
spawnWithNoFreeWill
-
spawnWithNoFreeWill
public <E extends Mob> E spawnWithNoFreeWill(EntityType<E> p_177322_, int p_177323_, int p_177324_, int p_177325_) -
spawnWithNoFreeWill
-
spawnWithNoFreeWill
public <E extends Mob> E spawnWithNoFreeWill(EntityType<E> p_177317_, float p_177318_, float p_177319_, float p_177320_) -
walkTo
-
pressButton
public void pressButton(int p_177104_, int p_177105_, int p_177106_) -
pressButton
-
useBlock
-
makeAboutToDrown
-
makeMockPlayer
-
pullLever
public void pullLever(int p_177303_, int p_177304_, int p_177305_) -
pullLever
-
pulseRedstone
-
destroyBlock
-
setBlock
-
setBlock
-
setBlock
-
setBlock
-
setNight
public void setNight() -
setDayTime
public void setDayTime(int p_177102_) -
assertBlockPresent
-
assertBlockPresent
-
assertBlockNotPresent
-
assertBlockNotPresent
-
succeedWhenBlockPresent
-
succeedWhenBlockPresent
-
assertBlock
-
assertBlock
-
assertBlockProperty
public <T extends Comparable<T>> void assertBlockProperty(BlockPos p_177256_, Property<T> p_177257_, T p_177258_) -
assertBlockProperty
public <T extends Comparable<T>> void assertBlockProperty(BlockPos p_177260_, Property<T> p_177261_, Predicate<T> p_177262_, String p_177263_) -
assertBlockState
public void assertBlockState(BlockPos p_177358_, Predicate<BlockState> p_177359_, Supplier<String> p_177360_) -
assertEntityPresent
-
assertEntityPresent
public void assertEntityPresent(EntityType<?> p_177370_, int p_177371_, int p_177372_, int p_177373_) -
assertEntityPresent
-
assertEntitiesPresent
public void assertEntitiesPresent(EntityType<?> p_239372_, BlockPos p_239373_, int p_239374_, double p_239375_) -
assertEntityPresent
-
getEntities
public <T extends Entity> List<T> getEntities(EntityType<T> p_238400_, BlockPos p_238401_, double p_238402_) -
assertEntityInstancePresent
public void assertEntityInstancePresent(Entity p_177133_, int p_177134_, int p_177135_, int p_177136_) -
assertEntityInstancePresent
-
assertItemEntityCountIs
-
assertItemEntityPresent
-
assertItemEntityNotPresent
-
assertEntityNotPresent
-
assertEntityNotPresent
public void assertEntityNotPresent(EntityType<?> p_177398_, int p_177399_, int p_177400_, int p_177401_) -
assertEntityNotPresent
-
assertEntityTouching
public void assertEntityTouching(EntityType<?> p_177159_, double p_177160_, double p_177161_, double p_177162_) -
assertEntityNotTouching
public void assertEntityNotTouching(EntityType<?> p_177312_, double p_177313_, double p_177314_, double p_177315_) -
assertEntityData
public <E extends Entity,T> void assertEntityData(BlockPos p_177238_, EntityType<E> p_177239_, Function<? super E, T> p_177240_, @Nullable T p_177241_) -
assertContainerEmpty
-
assertContainerContains
-
assertSameBlockStates
-
assertSameBlockState
-
assertAtTickTimeContainerContains
-
assertAtTickTimeContainerEmpty
-
succeedWhenEntityData
public <E extends Entity,T> void succeedWhenEntityData(BlockPos p_177350_, EntityType<E> p_177351_, Function<E, T> p_177352_, T p_177353_) -
assertEntityProperty
-
assertEntityProperty
-
succeedWhenEntityPresent
public void succeedWhenEntityPresent(EntityType<?> p_177414_, int p_177415_, int p_177416_, int p_177417_) -
succeedWhenEntityPresent
-
succeedWhenEntityNotPresent
public void succeedWhenEntityNotPresent(EntityType<?> p_177427_, int p_177428_, int p_177429_, int p_177430_) -
succeedWhenEntityNotPresent
-
succeed
public void succeed() -
ensureSingleFinalCheck
private void ensureSingleFinalCheck() -
succeedIf
-
succeedWhen
-
succeedOnTickWhen
-
runAtTickTime
-
runAfterDelay
-
randomTick
-
getHeight
-
fail
-
fail
-
fail
-
failIf
-
failIfEver
-
startSequence
-
absolutePos
-
relativePos
-
absoluteVec
-
getTick
public long getTick() -
getBounds
-
getRelativeBounds
-
forEveryBlockInStructure
-
onEachTick
-