Skip to content

Commit 77ddcd3

Browse files
Add entity definitions for cushions and poplar boats, temporarily disable 2 gametests pending MCPL updates
1 parent 565582d commit 77ddcd3

5 files changed

Lines changed: 59 additions & 3 deletions

File tree

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
22
"type": "geyser:minecraft_version",
3-
"version": "26.3"
4-
}
3+
"version": "26.3",
4+
"required": false,
5+
"COMMENT": "MCPL is not at release yet"
6+
}

bootstrap/mod/gametest/src/main/resources/data/geyser/test_instance/hashing/block_transformer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"type": "geyser:component_hash",
3+
"COMMENT": "Requires fix in MCPL, registry data can now be any tag and this one is a list",
4+
"required": false,
35
"component": "minecraft:block_transformer",
46
"value": [
57
"minecraft:shovel",

core/src/main/java/org/geysermc/geyser/entity/VanillaEntities.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.geysermc.geyser.entity.type.BoatEntity;
3737
import org.geysermc.geyser.entity.type.ChestBoatEntity;
3838
import org.geysermc.geyser.entity.type.CommandBlockMinecartEntity;
39+
import org.geysermc.geyser.entity.type.CushionEntity;
3940
import org.geysermc.geyser.entity.type.DisplayBaseEntity;
4041
import org.geysermc.geyser.entity.type.EnderCrystalEntity;
4142
import org.geysermc.geyser.entity.type.EnderEyeEntity;
@@ -200,6 +201,7 @@ public final class VanillaEntities {
200201
public static final VanillaEntityType<CowEntity> COW;
201202
public static final VanillaEntityType<CreakingEntity> CREAKING;
202203
public static final VanillaEntityType<CreeperEntity> CREEPER;
204+
public static final VanillaEntityType<CushionEntity> CUSHION;
203205
public static final VanillaEntityType<BoatEntity> DARK_OAK_BOAT;
204206
public static final VanillaEntityType<ChestBoatEntity> DARK_OAK_CHEST_BOAT;
205207
public static final VanillaEntityType<DolphinEntity> DOLPHIN;
@@ -272,6 +274,8 @@ public final class VanillaEntities {
272274
public static final VanillaEntityType<PillagerEntity> PILLAGER;
273275
public static final VanillaEntityType<PlayerEntity> PLAYER;
274276
public static final VanillaEntityType<PolarBearEntity> POLAR_BEAR;
277+
public static final VanillaEntityType<BoatEntity> POPLAR_BOAT;
278+
public static final VanillaEntityType<ChestBoatEntity> POPLAR_CHEST_BOAT;
275279
public static final VanillaEntityType<ThrownPotionEntity> SPLASH_POTION;
276280
public static final VanillaEntityType<ThrownPotionEntity> LINGERING_POTION;
277281
public static final VanillaEntityType<PufferFishEntity> PUFFERFISH;
@@ -352,6 +356,11 @@ public final class VanillaEntities {
352356
.addTranslator(null) // Waiting
353357
.addTranslator(MetadataTypes.PARTICLE, AreaEffectCloudEntity::setParticle)
354358
.build();
359+
CUSHION = VanillaEntityType.inherited(CushionEntity::new, entityBase)
360+
.type(EntityType.CUSHION)
361+
.width(1.0F).height(0.25F)
362+
.addTranslator(MetadataTypes.DYE_COLOR, CushionEntity::setDyeColor)
363+
.build();
355364
DRAGON_FIREBALL = VanillaEntityType.inherited(FireballEntity::new, entityBase)
356365
.type(EntityType.DRAGON_FIREBALL)
357366
.heightAndWidth(1.0f)
@@ -643,6 +652,7 @@ public final class VanillaEntities {
643652
OAK_BOAT = buildBoat(boatBase, EntityType.OAK_BOAT, BoatEntity.BoatVariant.OAK);
644653
SPRUCE_BOAT = buildBoat(boatBase, EntityType.SPRUCE_BOAT, BoatEntity.BoatVariant.SPRUCE);
645654
PALE_OAK_BOAT = buildBoat(boatBase, EntityType.PALE_OAK_BOAT, BoatEntity.BoatVariant.PALE_OAK);
655+
POPLAR_BOAT = buildBoat(boatBase, EntityType.POPLAR_BOAT, BoatEntity.BoatVariant.POPLAR);
646656

647657
EntityTypeBase<ChestBoatEntity> chestBoatBase = EntityTypeBase.baseInherited(ChestBoatEntity.class, boatBase)
648658
.build();
@@ -657,6 +667,7 @@ public final class VanillaEntities {
657667
OAK_CHEST_BOAT = buildChestBoat(chestBoatBase, EntityType.OAK_CHEST_BOAT, BoatEntity.BoatVariant.OAK);
658668
SPRUCE_CHEST_BOAT = buildChestBoat(chestBoatBase, EntityType.SPRUCE_CHEST_BOAT, BoatEntity.BoatVariant.SPRUCE);
659669
PALE_OAK_CHEST_BOAT = buildChestBoat(chestBoatBase, EntityType.PALE_OAK_CHEST_BOAT, BoatEntity.BoatVariant.PALE_OAK);
670+
POPLAR_CHEST_BOAT = buildChestBoat(chestBoatBase, EntityType.POPLAR_CHEST_BOAT, BoatEntity.BoatVariant.POPLAR);
660671
}
661672

662673
EntityTypeBase<LivingEntity> livingEntityBase = EntityTypeBase.baseInherited(LivingEntity.class, entityBase)

core/src/main/java/org/geysermc/geyser/entity/type/BoatEntity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ public enum BoatVariant {
254254
MANGROVE,
255255
BAMBOO,
256256
CHERRY,
257-
PALE_OAK;
257+
PALE_OAK,
258+
POPLAR;
258259

259260
BoatVariant() {}
260261
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2026 GeyserMC. http://geysermc.org
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
* THE SOFTWARE.
21+
*
22+
* @author GeyserMC
23+
* @link https://github.com/GeyserMC/Geyser
24+
*/
25+
26+
package org.geysermc.geyser.entity.type;
27+
28+
import org.geysermc.geyser.entity.spawn.EntitySpawnContext;
29+
import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata;
30+
31+
public class CushionEntity extends Entity {
32+
33+
public CushionEntity(EntitySpawnContext context) {
34+
super(context);
35+
}
36+
37+
public void setDyeColor(IntEntityMetadata dyeColor) {
38+
39+
}
40+
}

0 commit comments

Comments
 (0)