-
Notifications
You must be signed in to change notification settings - Fork 79
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
1 parent
3438ef1
commit 3cc5746
Showing
7 changed files
with
63 additions
and
19 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
39 changes: 39 additions & 0 deletions
39
...java/me/aleksilassila/litematica/printer/v1_19/guides/interaction/FlowerPotFillGuide.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,39 @@ | ||
package me.aleksilassila.litematica.printer.v1_19.guides.interaction; | ||
|
||
import me.aleksilassila.litematica.printer.v1_19.SchematicBlockState; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.block.FlowerPotBlock; | ||
import net.minecraft.client.network.ClientPlayerEntity; | ||
import net.minecraft.item.ItemStack; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public class FlowerPotFillGuide extends InteractionGuide { | ||
private final Block content; | ||
|
||
public FlowerPotFillGuide(SchematicBlockState state) { | ||
super(state); | ||
|
||
Block targetBlock = state.targetState.getBlock(); | ||
if (targetBlock instanceof FlowerPotBlock) { | ||
this.content = ((FlowerPotBlock) targetBlock).getContent(); | ||
} else { | ||
this.content = null; | ||
} | ||
} | ||
|
||
@Override | ||
public boolean canExecute(ClientPlayerEntity player) { | ||
if (content == null) return false; | ||
|
||
return super.canExecute(player); | ||
} | ||
|
||
@Override | ||
protected @NotNull List<ItemStack> getRequiredItems() { | ||
if (content == null) return Collections.emptyList(); | ||
else return Collections.singletonList(new ItemStack(content)); | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
.../main/java/me/aleksilassila/litematica/printer/v1_19/guides/placement/FlowerPotGuide.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,20 @@ | ||
package me.aleksilassila.litematica.printer.v1_19.guides.placement; | ||
|
||
import me.aleksilassila.litematica.printer.v1_19.SchematicBlockState; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.item.Items; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public class FlowerPotGuide extends BlockPlacementGuide { | ||
public FlowerPotGuide(SchematicBlockState state) { | ||
super(state); | ||
} | ||
|
||
@Override | ||
protected @NotNull List<ItemStack> getRequiredItems() { | ||
return Collections.singletonList(new ItemStack(Items.FLOWER_POT)); | ||
} | ||
} |
12 changes: 0 additions & 12 deletions
12
...src/main/java/me/aleksilassila/litematica/printer/v1_19/mixin/FlowerPotBlockAccessor.java
This file was deleted.
Oops, something went wrong.
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