Skip to content

Commit

Permalink
Added missing villager and zillager heads
Browse files Browse the repository at this point in the history
(cherry picked from commit 2aeaadc)
  • Loading branch information
Pedro270707 committed Jan 31, 2024
1 parent 7efaf44 commit 6141b66
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/client/java/net/pedroricardo/HeadedRewrittenClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ public void onInitializeClient() {
TextureToHeadMap.addHead(HeadURLs.FISHERMAN_VILLAGER, (modelLoader) -> new VillagerHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.VILLAGER_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/villager/villager.png")), "Fisherman Villager", SoundEvents.ENTITY_VILLAGER_WORK_FISHERMAN.getId().toString(), (modelLoader) -> new VillagerProfessionHeadFeatureRenderer(VillagerProfession.FISHERMAN));
TextureToHeadMap.addHead(HeadURLs.FLETCHER_VILLAGER, (modelLoader) -> new VillagerHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.VILLAGER_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/villager/villager.png")), "Fletcher Villager", SoundEvents.ENTITY_VILLAGER_WORK_FLETCHER.getId().toString(), (modelLoader) -> new VillagerProfessionHeadFeatureRenderer(VillagerProfession.FLETCHER));
TextureToHeadMap.addHead(HeadURLs.LIBRARIAN_VILLAGER, (modelLoader) -> new VillagerHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.VILLAGER_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/villager/villager.png")), "Librarian Villager", SoundEvents.ENTITY_VILLAGER_WORK_LIBRARIAN.getId().toString(), (modelLoader) -> new VillagerProfessionHeadFeatureRenderer(VillagerProfession.LIBRARIAN));
TextureToHeadMap.addHead(HeadURLs.SHEPHERD_VILLAGER, (modelLoader) -> new VillagerHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.VILLAGER_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/villager/villager.png")), "Shepherd Villager", SoundEvents.ENTITY_VILLAGER_WORK_SHEPHERD.getId().toString(), (modelLoader) -> new VillagerProfessionHeadFeatureRenderer(VillagerProfession.SHEPHERD));
TextureToHeadMap.addHead(HeadURLs.WEAPONSMITH_VILLAGER, (modelLoader) -> new VillagerHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.VILLAGER_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/villager/villager.png")), "Weaponsmith Villager", SoundEvents.ENTITY_VILLAGER_WORK_SHEPHERD.getId().toString(), (modelLoader) -> new VillagerProfessionHeadFeatureRenderer(VillagerProfession.WEAPONSMITH));
TextureToHeadMap.addHead(HeadURLs.VINDICATOR, (modelLoader) -> new VillagerLikeHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.VINDICATOR_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/illager/vindicator.png")), "Vindicator", SoundEvents.ENTITY_VINDICATOR_AMBIENT.getId().toString());
TextureToHeadMap.addHead(HeadURLs.WANDERING_TRADER, (modelLoader) -> new VillagerLikeHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.WANDERING_TRADER_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/wandering_trader.png")), "Wandering Trader", SoundEvents.ENTITY_WANDERING_TRADER_AMBIENT.getId().toString());
TextureToHeadMap.addHead(HeadURLs.WARDEN, (modelLoader) -> new WardenHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.WARDEN_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/warden/warden.png")), "Warden", SoundEvents.ENTITY_WARDEN_AMBIENT.getId().toString(), (modelLoader) -> new SimpleModelHeadFeatureRenderer(new WardenHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.WARDEN_HEAD)), RenderLayer.getEntityTranslucentEmissive(new Identifier("textures/entity/warden/warden_bioluminescent_layer.png"))), (modelLoader) -> new SimpleModelHeadFeatureRenderer(new WardenHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.WARDEN_HEAD)), RenderLayer.getEntityTranslucentEmissive(new Identifier("textures/entity/warden/warden_pulsating_spots_1.png")), Math.max(0.0F, MathHelper.cos((MinecraftClient.getInstance().world == null ? 0 : MinecraftClient.getInstance().world.getTime()) * 0.045F) * 0.25F)), (modelLoader) -> new SimpleModelHeadFeatureRenderer(new WardenHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.WARDEN_HEAD)), RenderLayer.getEntityTranslucentEmissive(new Identifier("textures/entity/warden/warden_pulsating_spots_2.png")), Math.max(0.0F, MathHelper.cos((MinecraftClient.getInstance().world == null ? 0 : MinecraftClient.getInstance().world.getTime()) * 0.045F + 3.1415927F) * 0.25F)));
Expand All @@ -187,6 +189,8 @@ public void onInitializeClient() {
TextureToHeadMap.addHead(HeadURLs.FISHERMAN_ZOMBIE_VILLAGER, (modelLoader) -> new VillagerHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.VILLAGER_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/zombie_villager/zombie_villager.png")), "Fisherman Zombie Villager", SoundEvents.ENTITY_ZOMBIE_VILLAGER_AMBIENT.getId().toString(), (modelLoader) -> new VillagerProfessionHeadFeatureRenderer(VillagerProfession.FISHERMAN, "zombie_villager"));
TextureToHeadMap.addHead(HeadURLs.FLETCHER_ZOMBIE_VILLAGER, (modelLoader) -> new VillagerHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.VILLAGER_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/zombie_villager/zombie_villager.png")), "Fletcher Zombie Villager", SoundEvents.ENTITY_ZOMBIE_VILLAGER_AMBIENT.getId().toString(), (modelLoader) -> new VillagerProfessionHeadFeatureRenderer(VillagerProfession.FLETCHER, "zombie_villager"));
TextureToHeadMap.addHead(HeadURLs.LIBRARIAN_ZOMBIE_VILLAGER, (modelLoader) -> new VillagerHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.VILLAGER_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/zombie_villager/zombie_villager.png")), "Librarian Zombie Villager", SoundEvents.ENTITY_ZOMBIE_VILLAGER_AMBIENT.getId().toString(), (modelLoader) -> new VillagerProfessionHeadFeatureRenderer(VillagerProfession.LIBRARIAN, "zombie_villager"));
TextureToHeadMap.addHead(HeadURLs.SHEPHERD_ZOMBIE_VILLAGER, (modelLoader) -> new VillagerHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.VILLAGER_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/zombie_villager/zombie_villager.png")), "Shepherd Zombie Villager", SoundEvents.ENTITY_ZOMBIE_VILLAGER_AMBIENT.getId().toString(), (modelLoader) -> new VillagerProfessionHeadFeatureRenderer(VillagerProfession.SHEPHERD, "zombie_villager"));
TextureToHeadMap.addHead(HeadURLs.WEAPONSMITH_ZOMBIE_VILLAGER, (modelLoader) -> new VillagerHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.VILLAGER_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/zombie_villager/zombie_villager.png")), "Weaponsmith Zombie Villager", SoundEvents.ENTITY_ZOMBIE_VILLAGER_AMBIENT.getId().toString(), (modelLoader) -> new VillagerProfessionHeadFeatureRenderer(VillagerProfession.WEAPONSMITH, "zombie_villager"));
TextureToHeadMap.addHead(HeadURLs.ZOMBIFIED_PIGLIN, (modelLoader) -> new PiglinHeadEntityModel(modelLoader.getModelPart(HeadedEntityModelLayers.ZOMBIFIED_PIGLIN_HEAD)), RenderLayer.getEntityCutoutNoCull(new Identifier("textures/entity/piglin/zombified_piglin.png")), "Zombified Piglin", SoundEvents.ENTITY_ZOMBIFIED_PIGLIN_AMBIENT.getId().toString());
HeadedCreativeTab.init();
ClientPlayConnectionEvents.DISCONNECT.register((handler, client) -> HeadedContext.isInHeadedServer = false);
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/net/pedroricardo/HeadedRewritten.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ public void onInitialize() {
TextureToServerHeadMap.addHead(HeadURLs.FISHERMAN_VILLAGER, "Fisherman Villager", SoundEvents.ENTITY_VILLAGER_WORK_FISHERMAN.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.FLETCHER_VILLAGER, "Fletcher Villager", SoundEvents.ENTITY_VILLAGER_WORK_FLETCHER.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.LIBRARIAN_VILLAGER, "Librarian Villager", SoundEvents.ENTITY_VILLAGER_WORK_LIBRARIAN.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.SHEPHERD_VILLAGER, "Shepherd Villager", SoundEvents.ENTITY_VILLAGER_WORK_SHEPHERD.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.WEAPONSMITH_VILLAGER, "Weaponsmith Villager", SoundEvents.ENTITY_VILLAGER_WORK_WEAPONSMITH.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.VINDICATOR, "Vindicator", SoundEvents.ENTITY_VINDICATOR_AMBIENT.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.WANDERING_TRADER, "Wandering Trader", SoundEvents.ENTITY_WANDERING_TRADER_AMBIENT.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.WARDEN, "Warden", SoundEvents.ENTITY_WARDEN_AMBIENT.getId().toString());
Expand All @@ -183,6 +185,8 @@ public void onInitialize() {
TextureToServerHeadMap.addHead(HeadURLs.FISHERMAN_ZOMBIE_VILLAGER, "Fisherman Zombie Villager", SoundEvents.ENTITY_ZOMBIE_VILLAGER_AMBIENT.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.FLETCHER_ZOMBIE_VILLAGER, "Fletcher Zombie Villager", SoundEvents.ENTITY_ZOMBIE_VILLAGER_AMBIENT.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.LIBRARIAN_ZOMBIE_VILLAGER, "Librarian Zombie Villager", SoundEvents.ENTITY_ZOMBIE_VILLAGER_AMBIENT.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.SHEPHERD_ZOMBIE_VILLAGER, "Shepherd Zombie Villager", SoundEvents.ENTITY_ZOMBIE_VILLAGER_AMBIENT.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.WEAPONSMITH_ZOMBIE_VILLAGER, "Weaponsmith Zombie Villager", SoundEvents.ENTITY_ZOMBIE_VILLAGER_AMBIENT.getId().toString());
TextureToServerHeadMap.addHead(HeadURLs.ZOMBIFIED_PIGLIN, "Zombified Piglin", SoundEvents.ENTITY_ZOMBIFIED_PIGLIN_AMBIENT.getId().toString());

S2CPlayChannelEvents.REGISTER.register(new Identifier(MOD_ID, MOD_ID), (handler, sender, server, channels) ->
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/net/pedroricardo/content/HeadURLs.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ public class HeadURLs {
public static final String FISHERMAN_VILLAGER = "http://textures.minecraft.net/texture/d189fb4acd15d73ff2a58a88df0466ad9f4c154a2008e5c6265d5c2f07d39376";
public static final String FLETCHER_VILLAGER = "http://textures.minecraft.net/texture/bf611f12e18ce44a57238eef1cae03cd9f730a7a45e0ec248f14ce84e9c48056";
public static final String LIBRARIAN_VILLAGER = "http://textures.minecraft.net/texture/cdcaa574babb40ee0fa83f2fd5ea20cff31ffa272fe113588ceee469682128e7";
public static final String SHEPHERD_VILLAGER = "http://textures.minecraft.net/texture/2abf4e9154ac9271941c733eacc62dc9fc0a6dc1b5d67c78ca98afb5cb1be9b2";
public static final String WEAPONSMITH_VILLAGER = "http://textures.minecraft.net/texture/8476ffa410bbe7fa70909965a125f4a4e9a4fb1ce1b8b3c34bfb73aaffd4ce43";
public static final String VINDICATOR = "http://textures.minecraft.net/texture/2dabafde27ee12b09865047aff6f183fdb64e04dae1c00ccbde04ad93dcc6c95";
public static final String WANDERING_TRADER = "http://textures.minecraft.net/texture/5f1379a82290d7abe1efaabbc70710ff2ec02dd34ade386bc00c930c461cf932";
public static final String WARDEN = "http://textures.minecraft.net/texture/b2f3879b737127485eb35ddee748d06cf914b193d97753ae34e92230842831fb";
Expand All @@ -160,5 +162,7 @@ public class HeadURLs {
public static final String FISHERMAN_ZOMBIE_VILLAGER = "http://textures.minecraft.net/texture/6905d53fe4faeb0b315a6878c9ab81b4be52c31cd478c027f0d7ece9f6da8914";
public static final String FLETCHER_ZOMBIE_VILLAGER = "http://textures.minecraft.net/texture/2ea26ac0e25498adada4ecea58bb4e76da32d5ca2de307efe5e4218fb7c5ef89";
public static final String LIBRARIAN_ZOMBIE_VILLAGER = "http://textures.minecraft.net/texture/62211a1f409cca4249c70d20ca80399fa4844ea417458be988cc21eb4797375e";
public static final String SHEPHERD_ZOMBIE_VILLAGER = "http://textures.minecraft.net/texture/691391bef3a46ef267d3b7171086ba4c8d17f2a6b0f83fa2ac30efe914b7c249";
public static final String WEAPONSMITH_ZOMBIE_VILLAGER = "http://textures.minecraft.net/texture/4370894b5cc305d87aa08c3b4b08587db68ff29e7a3ef354cad6abca50e5528b";
public static final String ZOMBIFIED_PIGLIN = "http://textures.minecraft.net/texture/2df03128b002a70708d6825ed6cf54ddf694b3766d78d5649030b1cb8b34c6fa";
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ public static void init() {
.with(HeadedServerHead.entryBuilder(HeadURLs.VILLAGER)
.conditionally(EntityPropertiesLootCondition.builder(LootContext.EntityTarget.THIS, EntityPredicate.Builder.create().nbt(predicate("{VillagerData:{profession:\"minecraft:none\"}}"))))
.conditionally(KilledByChargedCreeperLootCondition.builder()).build())
.with(HeadedServerHead.entryBuilder(HeadURLs.VILLAGER)
.with(HeadedServerHead.entryBuilder(HeadURLs.SHEPHERD_VILLAGER)
.conditionally(EntityPropertiesLootCondition.builder(LootContext.EntityTarget.THIS, EntityPredicate.Builder.create().nbt(predicate("{VillagerData:{profession:\"minecraft:shepherd\"}}"))))
.conditionally(KilledByChargedCreeperLootCondition.builder()).build())
.with(HeadedServerHead.entryBuilder(HeadURLs.VILLAGER)
.conditionally(EntityPropertiesLootCondition.builder(LootContext.EntityTarget.THIS, EntityPredicate.Builder.create().nbt(predicate("{VillagerData:{profession:\"minecraft:toolsmith\"}}"))))
.conditionally(KilledByChargedCreeperLootCondition.builder()).build())
.with(HeadedServerHead.entryBuilder(HeadURLs.VILLAGER)
.with(HeadedServerHead.entryBuilder(HeadURLs.WEAPONSMITH_VILLAGER)
.conditionally(EntityPropertiesLootCondition.builder(LootContext.EntityTarget.THIS, EntityPredicate.Builder.create().nbt(predicate("{VillagerData:{profession:\"minecraft:weaponsmith\"}}"))))
.conditionally(KilledByChargedCreeperLootCondition.builder())).build())
.build();
Expand Down Expand Up @@ -144,13 +144,13 @@ public static void init() {
.with(HeadedServerHead.entryBuilder(HeadURLs.ZOMBIE_VILLAGER)
.conditionally(EntityPropertiesLootCondition.builder(LootContext.EntityTarget.THIS, EntityPredicate.Builder.create().nbt(predicate("{VillagerData:{profession:\"minecraft:none\"}}"))))
.conditionally(KilledByChargedCreeperLootCondition.builder()).build())
.with(HeadedServerHead.entryBuilder(HeadURLs.ZOMBIE_VILLAGER)
.with(HeadedServerHead.entryBuilder(HeadURLs.SHEPHERD_ZOMBIE_VILLAGER)
.conditionally(EntityPropertiesLootCondition.builder(LootContext.EntityTarget.THIS, EntityPredicate.Builder.create().nbt(predicate("{VillagerData:{profession:\"minecraft:shepherd\"}}"))))
.conditionally(KilledByChargedCreeperLootCondition.builder()).build())
.with(HeadedServerHead.entryBuilder(HeadURLs.ZOMBIE_VILLAGER)
.conditionally(EntityPropertiesLootCondition.builder(LootContext.EntityTarget.THIS, EntityPredicate.Builder.create().nbt(predicate("{VillagerData:{profession:\"minecraft:toolsmith\"}}"))))
.conditionally(KilledByChargedCreeperLootCondition.builder()).build())
.with(HeadedServerHead.entryBuilder(HeadURLs.ZOMBIE_VILLAGER)
.with(HeadedServerHead.entryBuilder(HeadURLs.WEAPONSMITH_ZOMBIE_VILLAGER)
.conditionally(EntityPropertiesLootCondition.builder(LootContext.EntityTarget.THIS, EntityPredicate.Builder.create().nbt(predicate("{VillagerData:{profession:\"minecraft:weaponsmith\"}}"))))
.conditionally(KilledByChargedCreeperLootCondition.builder()).build())
.build()).build();
Expand Down

0 comments on commit 6141b66

Please sign in to comment.