Skip to content

Commit

Permalink
tried fixing torch placement issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Jun 14, 2024
1 parent 789f04d commit e05ca09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ public InteractionResult onItemUse(IBasicAntimatterTool instance, UseOnContext c
break;
}
}
if (!stack.isEmpty() || c.getPlayer().isCreative()) {
InteractionResult resultType = tryPlace(new BlockPlaceContext(c), stack);
if (!stack.isEmpty()) {
InteractionResult resultType = stack.useOn(new UseOnContext(c.getPlayer().getLevel(), c.getPlayer(), c.getHand(), stack, c.getHitResult()));
if (resultType.consumesAction()) {
if (!c.getPlayer().isCreative()) stack.shrink(1);
return resultType;
}
}
Expand Down
4 changes: 3 additions & 1 deletion common/src/main/resources/antimatter.accesswidener
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ accessible method net/minecraft/world/level/levelgen/feature/foliageplacers/Foli
accessible method net/minecraft/world/item/crafting/ShapedRecipe dissolvePattern ([Ljava/lang/String;Ljava/util/Map;II)Lnet/minecraft/core/NonNullList;
accessible method net/minecraft/world/item/crafting/ShapedRecipe patternFromJson (Lcom/google/gson/JsonArray;)[Ljava/lang/String;
accessible method net/minecraft/world/item/crafting/ShapedRecipe keyFromJson (Lcom/google/gson/JsonObject;)Ljava/util/Map;
accessible method net/minecraft/world/item/crafting/ShapedRecipe matches (Lnet/minecraft/world/inventory/CraftingContainer;IIZ)Z
accessible method net/minecraft/world/item/crafting/ShapedRecipe matches (Lnet/minecraft/world/inventory/CraftingContainer;IIZ)Z
accessible method net/minecraft/world/item/context/UseOnContext <init> (Lnet/minecraft/world/level/Level;Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/InteractionHand;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/phys/BlockHitResult;)V
accessible method net/minecraft/world/item/context/UseOnContext getHitResult ()Lnet/minecraft/world/phys/BlockHitResult;

0 comments on commit e05ca09

Please sign in to comment.