-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/1.20.1/dev' into 1.…
…21.1/dev
- Loading branch information
Showing
19 changed files
with
253 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MultiBlockModelBuilder.java
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/OriginBlockAndTintGetter.java
This file was deleted.
Oops, something went wrong.
73 changes: 73 additions & 0 deletions
73
...on/src/lib/java/dev/engine_room/flywheel/lib/model/baked/SinglePosVirtualBlockGetter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package dev.engine_room.flywheel.lib.model.baked; | ||
|
||
import java.util.function.ToIntFunction; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
|
||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.world.level.block.Blocks; | ||
import net.minecraft.world.level.block.entity.BlockEntity; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
|
||
public class SinglePosVirtualBlockGetter extends VirtualBlockGetter { | ||
protected BlockPos pos = BlockPos.ZERO; | ||
protected BlockState blockState = Blocks.AIR.defaultBlockState(); | ||
@Nullable | ||
protected BlockEntity blockEntity; | ||
|
||
public SinglePosVirtualBlockGetter(ToIntFunction<BlockPos> blockLightFunc, ToIntFunction<BlockPos> skyLightFunc) { | ||
super(blockLightFunc, skyLightFunc); | ||
} | ||
|
||
public static SinglePosVirtualBlockGetter createFullDark() { | ||
return new SinglePosVirtualBlockGetter(p -> 0, p -> 0); | ||
} | ||
|
||
public static SinglePosVirtualBlockGetter createFullBright() { | ||
return new SinglePosVirtualBlockGetter(p -> 15, p -> 15); | ||
} | ||
|
||
public SinglePosVirtualBlockGetter pos(BlockPos pos) { | ||
this.pos = pos; | ||
return this; | ||
} | ||
|
||
public SinglePosVirtualBlockGetter blockState(BlockState state) { | ||
blockState = state; | ||
return this; | ||
} | ||
|
||
public SinglePosVirtualBlockGetter blockEntity(@Nullable BlockEntity blockEntity) { | ||
this.blockEntity = blockEntity; | ||
return this; | ||
} | ||
|
||
@Override | ||
@Nullable | ||
public BlockEntity getBlockEntity(BlockPos pos) { | ||
if (pos.equals(this.pos)) { | ||
return blockEntity; | ||
} | ||
|
||
return null; | ||
} | ||
|
||
@Override | ||
public BlockState getBlockState(BlockPos pos) { | ||
if (pos.equals(this.pos)) { | ||
return blockState; | ||
} | ||
|
||
return Blocks.AIR.defaultBlockState(); | ||
} | ||
|
||
@Override | ||
public int getHeight() { | ||
return 1; | ||
} | ||
|
||
@Override | ||
public int getMinBuildHeight() { | ||
return pos.getY(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
fabric/src/backend/java/dev/engine_room/flywheel/backend/compile/FlwProgramsReloader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.