Skip to content

Commit 9532b77

Browse files
committed
Some fixes
1 parent 21f9ec4 commit 9532b77

16 files changed

+72
-40
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(${input$projectile_entity}.getEntity() instanceof IProjectile ? ((IProjectile) ${input$projectile_entity}.getEntity()).getMotion().distanceTo(Vec3d.ZERO) : 0)
1+
(${input$projectile_entity}.getEntity() instanceof AbstractArrowEntity ? ((AbstractArrowEntity) ${input$projectile_entity}.getEntity()).getMotion().distanceTo(Vector3d.ZERO):0)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(${input$entity} instanceof TamableEntity && ((TameableEntity) ${input$entity}).isTamed())
1+
(${input$entity} instanceof TameableEntity && ((TameableEntity) ${input$entity}).isTamed())
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
(${input$entity} instanceof TamableEntity && ${input$tamedBy} instanceof LivingEntity
1+
(${input$entity} instanceof TameableEntity && ${input$tamedBy} instanceof LivingEntity
22
&& ((TameableEntity) ${input$entity}).isOwner((LivingEntity) ${input$tamedBy}))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/*@BlockState*/(BlockStateArgument.getBlockState(arguments, "${field$param}").getState().getBlock())
1+
/*@BlockState*/(BlockStateArgument.getBlockState(arguments, "${field$param}").getState())
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<#include "mcelements.ftl">
22
if(world instanceof World)
3-
${field$dimension.replace("CUSTOM:", "")}PortalBlock.portalSpawn(world.getWorld(), ${toBlockPos(input$x,input$y,input$z)});
3+
${JavaModName}Blocks.${field$dimension.replace("CUSTOM:", "")?upper_case}_PORTAL.portalSpawn(world.getWorld(), ${toBlockPos(input$x,input$y,input$z)});
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#include "mcitems.ftl">
2-
if (world instanceof ServerWorld) {
3-
FallingBlockEntity blockToSpawn = new FallingBlockEntity(world, ${input$x}, ${input$y}, ${input$z}, ${mappedBlockToBlockStateCode(input$block)});
2+
{
3+
FallingBlockEntity blockToSpawn = new FallingBlockEntity(world.getWorld(), ${input$x}, ${input$y}, ${input$z}, ${mappedBlockToBlockStateCode(input$block)});
44
blockToSpawn.fallTime = 1;
55
world.addEntity(blockToSpawn);
66
}

src/main/resources/forge-1.14.4/templates/block/block.java.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public class ${name}Block extends
145145
<#else>
146146
3
147147
</#if>)
148-
.harvestTool(ToolType.${data.destroyTool?upper_case})
148+
.harvestTool(ToolType.<#if data.destroyTool?upper_case == "HOE">get("${data.destroyTool}")<#else>${data.destroyTool?upper_case}</#if>)
149149
</#if>
150150
<#if data.isNotColidable>
151151
.doesNotBlockMovement()

src/main/resources/forge-1.14.4/templates/dispensebehaviour.java.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ package ${package}.item.extension;
4747
int z = blockSource.getBlockPos().getZ();
4848

4949
<#if hasSuccessCondition>
50-
this.successful(<@procedureOBJToConditionCode data.dispenseSuccessCondition/>);
50+
this.successful = <@procedureOBJToConditionCode data.dispenseSuccessCondition/>;
5151
</#if>
5252

5353
<#if hasProcedure(data.dispenseResultItemstack)>

src/main/resources/forge-1.14.4/templates/elementinits/fluids.java.ftl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,5 @@ public class ${JavaModName}Fluids {
4444
public static final RegistryObject<FlowingFluid> FLOWING_${fluid.getModElement().getRegistryNameUpper()} =
4545
REGISTRY.register("flowing_${fluid.getModElement().getRegistryName()}", ${fluid.getModElement().getName()}Fluid.Flowing::new);
4646
</#list>
47-
48-
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) public static class FluidsClientSideHandler {
49-
@SubscribeEvent public static void clientSetup(FMLClientSetupEvent event) {
50-
<#list fluids as fluid>
51-
RenderTypeLookup.setRenderLayer(${fluid.getModElement().getRegistryNameUpper()}.get(), RenderType.getTranslucent());
52-
RenderTypeLookup.setRenderLayer(FLOWING_${fluid.getModElement().getRegistryNameUpper()}.get(), RenderType.getTranslucent());
53-
</#list>
54-
}
55-
}
5647
}
5748
<#-- @formatter:on -->

src/main/resources/forge-1.14.4/templates/fluid/fluidattributes.java.ftl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ public class ${name}FluidAttributes extends FluidAttributes {
5555
<#elseif data.tintType == "Foliage">
5656
BiomeColors.getFoliageColor(world, pos)
5757
<#elseif data.tintType == "Default foliage">
58-
FoliageColor.getDefault()
58+
FoliageColors.getDefault()
5959
<#elseif data.tintType == "Birch foliage">
60-
FoliageColor.getBirch()
60+
FoliageColors.getBirch()
6161
<#elseif data.tintType == "Spruce foliage">
62-
FoliageColor.getSpruce()
62+
FoliageColors.getSpruce()
6363
<#elseif data.tintType == "Water">
6464
BiomeColors.getWaterColor(world, pos)
6565
<#else>
66-
Minecraft.getInstance().world.getBiome(pos).value().getWaterFogColor()
66+
Minecraft.getInstance().world.getBiome(pos).getWaterFogColor()
6767
</#if> | 0xFF000000;
6868
}
6969
</#if>

0 commit comments

Comments
 (0)