
snow block at bottom of schematic causes extra snowy grass block to be added
leedagee opened this issue ยท 0 comments
Describe the Bug
For some reason, SchematicWorld#getBlockState will return a fake grass block if the coordinates below the SchematicWorld's bounds. If there is a snow block at the bottom and it will transform the fake grass block into a snowy one which causes a setBlock call that actually added the fake block and extends the bounds. With extended bounds, there will be no more snow blocks at the bottom so that only one snowy grass block will be added into the fake world. This extra snowy grass block will be rendered and placed in the normal world eventually.
Reproduction Steps
- create a schematic with only one snow block
- load the schematic, place it and move it if necessary
- see the extra block
Expected Result
there is no extra blocks
Screenshots and Videos
https://www.bilibili.com/video/BV1214y1x7x4 from the original reporter
Crash Report or Log
https://fars.ee/cT-m (F3+C forced crash)
Operating System
Linux X11
Mod Version
0.5.0d
Minecraft Version
1.18.2
Forge Version
40.1.60
Other Mods
Default development environment at commit efdcbb4 with jei and curios.
Additional Context
a9c710f may be the first commit with this issue (not bisected, but code search and git blame)
if (pos.getY() - bounds.minY() == -1 && !renderMode)
return Blocks.GRASS_BLOCK.defaultBlockState();
suspicious setBlock call stack trace
setBlock:205, SchematicWorld (com.simibubi.create.content.schematics)
lambda$updateShapeAtEdge$4:359, StructureTemplate (net.minecraft.world.level.levelgen.structure.templatesystem)
consume:-1, StructureTemplate$$Lambda$11307/0x000000080153f648 (net.minecraft.world.level.levelgen.structure.templatesystem)
forAllAxisFaces:194, DiscreteVoxelShape (net.minecraft.world.phys.shapes)
forAllFaces:174, DiscreteVoxelShape (net.minecraft.world.phys.shapes)
updateShapeAtEdge:347, StructureTemplate (net.minecraft.world.level.levelgen.structure.templatesystem)
placeInWorld:311, StructureTemplate (net.minecraft.world.level.levelgen.structure.templatesystem)
setupRenderer:160, SchematicHandler (com.simibubi.create.content.schematics.client)
init:134, SchematicHandler (com.simibubi.create.content.schematics.client)
tick:113, SchematicHandler (com.simibubi.create.content.schematics.client)
onTick:130, ClientEvents (com.simibubi.create.events)
invoke:-1, ASMEventHandler_127_ClientEvents_onTick_ClientTickEvent (net.minecraftforge.eventbus)
invoke:85, ASMEventHandler (net.minecraftforge.eventbus)
invoke:-1, EventBus$$Lambda$4452/0x0000000800b64de0 (net.minecraftforge.eventbus)
post:302, EventBus (net.minecraftforge.eventbus)
post:283, EventBus (net.minecraftforge.eventbus)
onPostClientTick:907, ForgeEventFactory (net.minecraftforge.event)
tick:1797, Minecraft (net.minecraft.client)
runTick:1045, Minecraft (net.minecraft.client)
run:668, Minecraft (net.minecraft.client)
main:205, Main (net.minecraft.client.main)
invoke0:-1, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:77, NativeMethodAccessorImpl (jdk.internal.reflect)
invoke:43, DelegatingMethodAccessorImpl (jdk.internal.reflect)
invoke:568, Method (java.lang.reflect)
lambda$launchService$0:24, ForgeClientUserdevLaunchHandler (net.minecraftforge.fml.loading.targets)
call:-1, ForgeClientUserdevLaunchHandler$$Lambda$846/0x000000080047d810 (net.minecraftforge.fml.loading.targets)
launch:37, LaunchServiceHandlerDecorator (cpw.mods.modlauncher)
launch:53, LaunchServiceHandler (cpw.mods.modlauncher)
launch:71, LaunchServiceHandler (cpw.mods.modlauncher)
run:106, Launcher (cpw.mods.modlauncher)
main:77, Launcher (cpw.mods.modlauncher)
accept:26, BootstrapLaunchConsumer (cpw.mods.modlauncher)
accept:23, BootstrapLaunchConsumer (cpw.mods.modlauncher)
main:149, BootstrapLauncher (cpw.mods.bootstraplauncher)```