-
-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
17 additions
and
10 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
25 changes: 16 additions & 9 deletions
25
src/main/java/com/minecolonies/core/compatibility/jei/JeiFakeLevel.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 |
---|---|---|
@@ -1,17 +1,24 @@ | ||
package com.minecolonies.core.compatibility.jei; | ||
|
||
import com.ldtteam.structurize.blueprints.v1.Blueprint; | ||
import com.ldtteam.structurize.client.fakelevel.FakeLevel; | ||
import com.ldtteam.structurize.client.fakelevel.IFakeLevelLightProvider; | ||
import net.minecraft.world.scores.Scoreboard; | ||
import com.ldtteam.structurize.client.fakelevel.SingleBlockFakeLevel; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.level.block.Blocks; | ||
import net.minecraftforge.api.distmarker.Dist; | ||
import net.minecraftforge.api.distmarker.OnlyIn; | ||
|
||
public class JeiFakeLevel extends FakeLevel | ||
@OnlyIn(Dist.CLIENT) | ||
public class JeiFakeLevel extends SingleBlockFakeLevel | ||
{ | ||
private static final Scoreboard SCOREBOARD = new Scoreboard(); | ||
private static final Blueprint FAKE_BLOCK = new Blueprint((short) 1, (short) 1, (short) 1); | ||
|
||
public JeiFakeLevel() | ||
{ | ||
super(FAKE_BLOCK, IFakeLevelLightProvider.USE_CLIENT_LEVEL, SCOREBOARD, false); | ||
super(null); | ||
prepare(Blocks.AIR.defaultBlockState(), null, null); | ||
} | ||
|
||
@Override | ||
public Level realLevel() | ||
{ | ||
return Minecraft.getInstance().level; | ||
} | ||
} |