Skip to content

Commit 4876cf4

Browse files
committed
Bug fixes
1 parent 4cd0c4c commit 4876cf4

File tree

97 files changed

+373
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+373
-271
lines changed

src/main/resources/datapack-1.21.4/mappings/sounds.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,48 @@ item.wolf_armor.damage: item.wolf_armor.damage
15491549
item.wolf_armor.repair: item.wolf_armor.repair
15501550
entity.wolf.shake: entity.wolf.shake
15511551
entity.wolf.step: entity.wolf.step
1552+
entity.wolf.ambient: entity.wolf.ambient
1553+
entity.wolf.death: entity.wolf.death
1554+
entity.wolf.growl: entity.wolf.growl
1555+
entity.wolf.hurt: entity.wolf.hurt
1556+
entity.wolf.pant: entity.wolf.pant
1557+
entity.wolf.whine: entity.wolf.whine
1558+
entity.wolf_puglin.ambient: entity.wolf.ambient # fallback
1559+
entity.wolf_puglin.death: entity.wolf.death # fallback
1560+
entity.wolf_puglin.growl: entity.wolf.growl # fallback
1561+
entity.wolf_puglin.hurt: entity.wolf.hurt # fallback
1562+
entity.wolf_puglin.pant: entity.wolf.pant # fallback
1563+
entity.wolf_puglin.whine: entity.wolf.whine # fallback
1564+
entity.wolf_sad.ambient: entity.wolf.ambient # fallback
1565+
entity.wolf_sad.death: entity.wolf.death # fallback
1566+
entity.wolf_sad.growl: entity.wolf.growl # fallback
1567+
entity.wolf_sad.hurt: entity.wolf.hurt # fallback
1568+
entity.wolf_sad.pant: entity.wolf.pant # fallback
1569+
entity.wolf_sad.whine: entity.wolf.whine # fallback
1570+
entity.wolf_angry.ambient: entity.wolf.ambient # fallback
1571+
entity.wolf_angry.death: entity.wolf.death # fallback
1572+
entity.wolf_angry.growl: entity.wolf.growl # fallback
1573+
entity.wolf_angry.hurt: entity.wolf.hurt # fallback
1574+
entity.wolf_angry.pant: entity.wolf.pant # fallback
1575+
entity.wolf_angry.whine: entity.wolf.whine # fallback
1576+
entity.wolf_grumpy.ambient: entity.wolf.ambient # fallback
1577+
entity.wolf_grumpy.death: entity.wolf.death # fallback
1578+
entity.wolf_grumpy.growl: entity.wolf.growl # fallback
1579+
entity.wolf_grumpy.hurt: entity.wolf.hurt # fallback
1580+
entity.wolf_grumpy.pant: entity.wolf.pant # fallback
1581+
entity.wolf_grumpy.whine: entity.wolf.whine # fallback
1582+
entity.wolf_big.ambient: entity.wolf.ambient # fallback
1583+
entity.wolf_big.death: entity.wolf.death # fallback
1584+
entity.wolf_big.growl: entity.wolf.growl # fallback
1585+
entity.wolf_big.hurt: entity.wolf.hurt # fallback
1586+
entity.wolf_big.pant: entity.wolf.pant # fallback
1587+
entity.wolf_big.whine: entity.wolf.whine # fallback
1588+
entity.wolf_cute.ambient: entity.wolf.ambient # fallback
1589+
entity.wolf_cute.death: entity.wolf.death # fallback
1590+
entity.wolf_cute.growl: entity.wolf.growl # fallback
1591+
entity.wolf_cute.hurt: entity.wolf.hurt # fallback
1592+
entity.wolf_cute.pant: entity.wolf.pant # fallback
1593+
entity.wolf_cute.whine: entity.wolf.whine # fallback
15521594
block.wooden_door.close: block.wooden_door.close
15531595
block.wooden_door.open: block.wooden_door.open
15541596
block.wooden_trapdoor.close: block.wooden_trapdoor.close

src/main/resources/neoforge-1.21.4/templates/block/block.java.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ package ${package}.block;
4444

4545
import net.minecraft.world.level.block.state.BlockBehaviour.Properties;
4646

47-
<#compress>
47+
<@javacompress>
4848
public class ${name}Block extends
4949
<#if data.hasGravity>
5050
FallingBlock
@@ -735,5 +735,5 @@ public class ${name}Block extends
735735
</#list>
736736

737737
}
738-
</#compress>
738+
</@javacompress>
739739
<#-- @formatter:on -->

src/main/resources/neoforge-1.21.4/templates/block/blockentity.java.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
package ${package}.block.entity;
3535

36-
<#compress>
36+
<@javacompress>
3737
public class ${name}BlockEntity extends RandomizableContainerBlockEntity implements WorldlyContainer
3838
<#if data.sensitiveToVibration>, GameEventListener.Provider<VibrationSystem.Listener>, VibrationSystem</#if> {
3939

@@ -333,5 +333,5 @@ public class ${name}BlockEntity extends RandomizableContainerBlockEntity impleme
333333
}
334334
</#if>
335335
}
336-
</#compress>
336+
</@javacompress>
337337
<#-- @formatter:on -->

src/main/resources/neoforge-1.21.4/templates/block/blockentity_renderer.java.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ package ${package}.client.renderer.block;
6666
}
6767

6868
@Override public void render(${name}BlockEntity blockEntity, float partialTick, PoseStack poseStack, MultiBufferSource renderer, int light, int overlayLight) {
69-
<#compress>
69+
<@javacompress>
7070
updateRenderState(blockEntity, partialTick);
7171
poseStack.pushPose();
7272
poseStack.scale(-1, -1, 1);
@@ -107,7 +107,7 @@ package ${package}.client.renderer.block;
107107
model.setupBlockEntityAnim(blockEntity, renderState);
108108
model.renderToBuffer(poseStack, builder, light, overlayLight);
109109
poseStack.popPose();
110-
</#compress>
110+
</@javacompress>
111111
}
112112

113113
@SubscribeEvent public static void registerBlockEntityRenderers(EntityRenderersEvent.RegisterRenderers event) {

src/main/resources/neoforge-1.21.4/templates/dimension/dimension.java.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
package ${package}.world.dimension;
3636

37-
<#compress>
37+
<@javacompress>
3838

3939
<#if hasProcedure(data.onPlayerLeavesDimension) || hasProcedure(data.onPlayerEntersDimension)>
4040
@EventBusSubscriber
@@ -96,4 +96,4 @@ public class ${name}Dimension {
9696
</#if>
9797

9898
}
99-
</#compress>
99+
</@javacompress>

src/main/resources/neoforge-1.21.4/templates/dispensebehaviour.java.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
package ${package}.item.extension;
3737

38-
<#compress>
38+
<@javacompress>
3939
@EventBusSubscriber public class ${name}ItemExtension {
4040
@SubscribeEvent public static void init(FMLCommonSetupEvent event) {
4141
event.enqueueWork(() -> DispenserBlock.registerBehavior(${mappedMCItemToItem(data.item)}, new OptionalDispenseItemBehavior() {
@@ -70,4 +70,4 @@ package ${package}.item.extension;
7070
}
7171
}));
7272
}
73-
}</#compress>
73+
}</@javacompress>

src/main/resources/neoforge-1.21.4/templates/elementinits/blockentities.java.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class ${JavaModName}BlockEntities {
5959
}
6060

6161
<#if blockentitiesWithInventory?size != 0>
62-
<#compress>
62+
<@javacompress>
6363
@SubscribeEvent public static void registerCapabilities(RegisterCapabilitiesEvent event) {
6464
<#list blockentitiesWithInventory as blockentity>
6565
event.registerBlockEntity(Capabilities.ItemHandler.BLOCK, ${blockentity.getModElement().getRegistryNameUpper()}.get(), SidedInvWrapper::new);
@@ -71,7 +71,7 @@ public class ${JavaModName}BlockEntities {
7171
</#if>
7272
</#list>
7373
}
74-
</#compress>
74+
</@javacompress>
7575
</#if>
7676

7777
}

src/main/resources/neoforge-1.21.4/templates/elementinits/blocks.java.ftl

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,42 @@ package ${package}.init;
4949
</#if>
5050
</#list>
5151

52+
<#assign chunks = blocks?chunk(2500)>
53+
<#assign has_chunks = chunks?size gt 1>
54+
5255
public class ${JavaModName}Blocks {
5356

5457
public static final DeferredRegister.Blocks REGISTRY = DeferredRegister.createBlocks(${JavaModName}.MODID);
5558

59+
<@javacompress>
5660
<#list blocks as block>
5761
<#if block.getModElement().getTypeString() == "dimension">
58-
public static final DeferredBlock<Block> ${block.getModElement().getRegistryNameUpper()}_PORTAL =
59-
register("${block.getModElement().getRegistryName()}_portal", ${block.getModElement().getName()}PortalBlock::new);
62+
public static <#if !has_chunks>final</#if> DeferredBlock<Block> ${block.getModElement().getRegistryNameUpper()}_PORTAL;
6063
<#else>
61-
public static final DeferredBlock<Block> ${block.getModElement().getRegistryNameUpper()} =
62-
register("${block.getModElement().getRegistryName()}", ${block.getModElement().getName()}Block::new);
64+
public static <#if !has_chunks>final</#if> DeferredBlock<Block> ${block.getModElement().getRegistryNameUpper()};
6365
</#if>
6466
</#list>
67+
</@javacompress>
68+
69+
<#list chunks as sub_blocks>
70+
<#if has_chunks>public static void register${sub_blocks?index}()<#else>static</#if> {
71+
<#list sub_blocks as block>
72+
<#if block.getModElement().getTypeString() == "dimension">
73+
${block.getModElement().getRegistryNameUpper()}_PORTAL =
74+
register("${block.getModElement().getRegistryName()}_portal", ${block.getModElement().getName()}PortalBlock::new);
75+
<#else>
76+
${block.getModElement().getRegistryNameUpper()} =
77+
register("${block.getModElement().getRegistryName()}", ${block.getModElement().getName()}Block::new);
78+
</#if>
79+
</#list>
80+
}
81+
</#list>
82+
83+
<#if has_chunks>
84+
static {
85+
<#list 0..chunks?size-1 as i>register${i}();</#list>
86+
}
87+
</#if>
6588

6689
// Start of user code block custom blocks
6790
// End of user code block custom blocks

src/main/resources/neoforge-1.21.4/templates/elementinits/entities.java.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ public class ${JavaModName}Entities {
8080
}
8181

8282
<#if entitiesWithInventory?size != 0>
83-
<#compress>
83+
<@javacompress>
8484
<#-- #4780: entities have equipment inventory capability registered before custom ones without priority set -->
8585
@SubscribeEvent(priority = EventPriority.HIGHEST) public static void registerCapabilities(RegisterCapabilitiesEvent event) {
8686
<#list entitiesWithInventory as entity>
8787
event.registerEntity(Capabilities.ItemHandler.ENTITY, ${entity.getModElement().getRegistryNameUpper()}.get(), (living, context) -> living.getCombinedInventory());
8888
</#list>
8989
}
90-
</#compress>
90+
</@javacompress>
9191
</#if>
9292

9393
<#if hasLivingEntities>

src/main/resources/neoforge-1.21.4/templates/elementinits/fuels.java.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ package ${package}.init;
4242
@EventBusSubscriber public class ${JavaModName}Fuels {
4343

4444
@SubscribeEvent public static void furnaceFuelBurnTimeEvent(FurnaceFuelBurnTimeEvent event) {
45-
<#compress>
45+
<@javacompress>
4646
ItemStack itemstack = event.getItemStack();
4747
<#list itemextensions?filter(e -> e.enableFuel) as extension>
4848
if (itemstack.getItem() == ${mappedMCItemToItem(extension.item)}
@@ -54,7 +54,7 @@ package ${package}.init;
5454
</#if>
5555
<#sep>else
5656
</#list>
57-
</#compress>
57+
</@javacompress>
5858
}
5959
}
6060
<#-- @formatter:on -->

0 commit comments

Comments
 (0)