From 94d094ae5ef89a5a04170cbc9e4dcfb2df37ca15 Mon Sep 17 00:00:00 2001 From: Nikita Skobelevs <34107736+nskobelevs@users.noreply.github.com> Date: Mon, 20 Jul 2020 16:10:42 +0100 Subject: [PATCH] EntityType mappings for missing methods and fields (#1578) * Added mappings for missing EntityType fields and methods Signed-off-by: Nikita Skobelevs * Fixed spelling Signed-off-by: Nikita Skobelevs * Update EntityType mapping per suggestion Co-authored-by: liach <7806504+liach@users.noreply.github.com> * Updated EntityType mapping as per PR suggestion Co-authored-by: liach <7806504+liach@users.noreply.github.com> * Fixed spelling error in EntityType mapping Co-authored-by: Yanis48 Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: Yanis48 --- .../net/minecraft/entity/EntityType.mapping | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mappings/net/minecraft/entity/EntityType.mapping b/mappings/net/minecraft/entity/EntityType.mapping index 6a067c81e4..4e6fb2dfb2 100644 --- a/mappings/net/minecraft/entity/EntityType.mapping +++ b/mappings/net/minecraft/entity/EntityType.mapping @@ -5,6 +5,7 @@ CLASS net/minecraft/class_1299 net/minecraft/entity/EntityType FIELD field_19423 spawnableFarFromPlayer Z FIELD field_24085 maxTrackDistance I FIELD field_24086 trackTickInterval I + FIELD field_25355 canSpawnInside Lcom/google/common/collect/ImmutableSet; FIELD field_6056 saveable Z FIELD field_6072 summonable Z FIELD field_6088 LOGGER Lorg/apache/logging/log4j/Logger; @@ -46,6 +47,13 @@ CLASS net/minecraft/class_1299 net/minecraft/entity/EntityType METHOD method_20210 isIn (Lnet/minecraft/class_3494;)Z ARG 1 tag METHOD method_20814 isSpawnableFarFromPlayer ()Z + METHOD method_29496 isInvalidSpawn (Lnet/minecraft/class_2680;)Z + COMMENT Returns whether the EntityType can spawn inside the given block. + COMMENT + COMMENT

By default, non-fire-immune mobs can't spawn in/on blocks dealing fire damage. + COMMENT Any mob can't spawn in wither roses, sweet berry bush, or cacti. + COMMENT + COMMENT

This can be overwritten via {@link EntityType.Builder#allowSpawningInside(Block[])} METHOD method_5881 loadFromEntityTag (Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1297;Lnet/minecraft/class_2487;)V ARG 0 world ARG 1 player @@ -108,6 +116,7 @@ CLASS net/minecraft/class_1299 net/minecraft/entity/EntityType FIELD field_19424 spawnableFarFromPlayer Z FIELD field_24087 maxTrackingRange I FIELD field_24088 trackingTickInterval I + FIELD field_25356 canSpawnInside Lcom/google/common/collect/ImmutableSet; FIELD field_6148 factory Lnet/minecraft/class_1299$class_4049; FIELD field_6149 spawnGroup Lnet/minecraft/class_1311; FIELD field_6150 summonable Z @@ -124,6 +133,15 @@ CLASS net/minecraft/class_1299 net/minecraft/entity/EntityType ARG 1 maxTrackingRange METHOD method_27300 trackingTickInterval (I)Lnet/minecraft/class_1299$class_1300; ARG 1 trackingTickInterval + METHOD method_29497 allowSpawningInside ([Lnet/minecraft/class_2248;)Lnet/minecraft/class_1299$class_1300; + COMMENT Allows this type of entity to spawn inside the given block, bypassing the default + COMMENT wither rose, sweet berry bush, cactus, and fire-damage-dealing blocks for + COMMENT non-fire-resistant mobs. + COMMENT + COMMENT

{@code minecraft:prevent_mob_spawning_inside} tag overrides this. + COMMENT With this setting, fire resistant mobs can spawn on/in fire damage dealing blocks, + COMMENT and wither skeletons can spawn in wither roses. If a block added is not in the default + COMMENT blacklist, the addition has no effect. METHOD method_5901 disableSummon ()Lnet/minecraft/class_1299$class_1300; METHOD method_5902 create (Lnet/minecraft/class_1311;)Lnet/minecraft/class_1299$class_1300; ARG 0 spawnGroup