Skip to content

Commit fcdb3c6

Browse files
committed
Recipe fixes
1 parent 2a112e4 commit fcdb3c6

File tree

11 files changed

+21
-28
lines changed

11 files changed

+21
-28
lines changed

src/generated/resources/data/nuclearcraft/advancements/recipes/misc/spaxelhoe_thorium.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"conditions": {
1212
"items": [
1313
{
14-
"tag": "forge:ingots/thorium"
14+
"tag": "forge:plates/thorium"
1515
}
1616
]
1717
},

src/generated/resources/data/nuclearcraft/recipes/assembler/plates_tough_alloy-netherite_axe-netherite_pickaxe-netherite_shovel.json renamed to src/generated/resources/data/nuclearcraft/recipes/assembler/plates_tough_alloy-ingots_iron.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,8 @@
66
"tag": "forge:plates/tough_alloy"
77
},
88
{
9-
"item": "minecraft:netherite_axe"
10-
},
11-
{
12-
"item": "minecraft:netherite_pickaxe"
13-
},
14-
{
15-
"item": "minecraft:netherite_shovel"
9+
"count": 2,
10+
"tag": "forge:ingots/iron"
1611
}
1712
],
1813
"output": [

src/generated/resources/data/nuclearcraft/recipes/decay_hastener/curium_246.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
],
88
"output": [
99
{
10-
"item": "nuclearcraft:plutonium_242"
10+
"item": "nuclearcraft:americium_242"
1111
}
1212
],
1313
"powerModifier": 1.0,

src/generated/resources/data/nuclearcraft/recipes/spaxelhoe_thorium.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"tag": "forge:ingots/iron"
77
},
88
"T": {
9-
"tag": "forge:ingots/thorium"
9+
"tag": "forge:plates/thorium"
1010
}
1111
},
1212
"pattern": [

src/main/java/igentuman/nc/block/ContainerBlock.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ public void playerDestroy(Level pLevel, Player pPlayer, BlockPos pPos, BlockStat
152152
pPlayer.causeFoodExhaustion(0.005F);
153153
ContainerBE ContainerBE = (ContainerBE) pBlockEntity;
154154
CompoundTag data = ContainerBE.getUpdateTag();
155-
156155
ItemStack drop = new ItemStack(this);
157156
drop.setTag(data);
158157
if (!pLevel.isClientSide()) {

src/main/java/igentuman/nc/datagen/recipes/NCRecipes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,9 +823,9 @@ private void parts(Consumer<FinishedRecipe> consumer) {
823823
.pattern("TTT")
824824
.pattern("TIT")
825825
.pattern(" I ")
826-
.define('T', forgeIngot(Materials.thorium))
826+
.define('T', forgePlate(Materials.thorium))
827827
.define('I', forgeIngot("iron"))
828-
.unlockedBy("item", has(forgeIngot(Materials.thorium)))
828+
.unlockedBy("item", has(forgePlate(Materials.thorium)))
829829
.save(consumer, new ResourceLocation(MODID, "spaxelhoe_thorium"));
830830

831831
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ALL_NC_ITEMS.get("upgrade_speed").get())

src/main/java/igentuman/nc/datagen/recipes/recipes/AssemblerRecipes.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ public static void generate(Consumer<FinishedRecipe> consumer) {
5353
itemsToItems(
5454
List.of(
5555
plateIngredient(Materials.tough_alloy, 5),
56-
ingredient(NETHERITE_AXE),
57-
ingredient(NETHERITE_PICKAXE),
58-
ingredient(NETHERITE_SHOVEL)
56+
ingotIngredient("iron", 2)
5957
),
6058
List.of(ingredient(SPAXELHOE_TOUGH.get()))
6159
);

src/main/java/igentuman/nc/datagen/recipes/recipes/DecayHastenerRecipes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static void generate(Consumer<FinishedRecipe> consumer) {
3737
itemToItem(isotopeIngredient(Materials.americium243), isotopeStack(Materials.plutonium238));
3838
itemToItem(isotopeIngredient(Materials.curium243), isotopeStack(Materials.plutonium239));
3939
itemToItem(isotopeIngredient(Materials.curium245), isotopeStack(Materials.plutonium241));
40-
itemToItem(isotopeIngredient(Materials.curium246), isotopeStack(Materials.plutonium242));
40+
itemToItem(isotopeIngredient(Materials.curium246), isotopeStack(Materials.americium242));
4141
itemToItem(isotopeIngredient(Materials.curium247), isotopeStack(Materials.americium243));
4242
itemToItem(isotopeIngredient(Materials.berkelium247), isotopeStack(Materials.americium243));
4343
itemToItem(isotopeIngredient(Materials.berkelium248), dustIngredient(Materials.thorium));

src/main/java/igentuman/nc/datagen/recipes/recipes/FuelReprocessorRecipes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void generate(Consumer<FinishedRecipe> consumer) {
2525
add(
2626
fuelIngredient(List.of("depleted", "americium", "hea-242", type), 1),
2727
List.of(
28-
isotopeStack(Materials.americium243, 3), isotopeStack(Materials.curium243),
28+
isotopeStack(Materials.americium243, 3), isotopeStack(Materials.americium242),
2929
isotopeStack(Materials.curium246, 2), isotopeStack(Materials.berkelium247),
3030
dustIngredient(Materials.molybdenum), dustIngredient(Materials.promethium_147)
3131
), 1.5D

src/main/java/igentuman/nc/item/QNP.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ public void setDamage(ItemStack stack, int damage)
107107
{
108108
}
109109

110-
111-
112110
@Override
113111
public boolean isBarVisible(@NotNull ItemStack pStack) {
114112
return true;
@@ -163,6 +161,10 @@ public boolean mineBlock(@NotNull ItemStack stack, @NotNull Level worldIn, @NotN
163161
if (entityLiving instanceof Player) {
164162
HitResult rayTraceResult = RayTraceUtils.rayTraceSimple(worldIn, entityLiving, 16, 0);
165163
if (rayTraceResult.getType() == HitResult.Type.BLOCK) {
164+
BlockEntity be = worldIn.getExistingBlockEntity(pos);
165+
if(be != null) {
166+
return super.mineBlock(stack, worldIn, state, pos, entityLiving);
167+
}
166168
BlockHitResult blockResult = (BlockHitResult) rayTraceResult;
167169
List<ItemStack> totalDrops = new ArrayList<>();
168170
if(getMode(stack) == Mode.VEIN_MINER) {
@@ -171,7 +173,7 @@ public boolean mineBlock(@NotNull ItemStack stack, @NotNull Level worldIn, @NotN
171173
mineArea(pos, worldIn, entityLiving, blockResult, stack, totalDrops);
172174
}
173175
totalDrops.forEach(itemStack -> {
174-
Block.popResource(worldIn, entityLiving.blockPosition().relative(entityLiving.getDirection(), 1), itemStack);
176+
Block.popResource(worldIn, entityLiving.blockPosition().relative(entityLiving.getDirection(), 2), itemStack);
175177
});
176178
}
177179
}
@@ -186,7 +188,8 @@ private List<ItemStack> harvestBlock(BlockPos pos, @NotNull Level worldIn, Livin
186188
int xp = ForgeHooks.onBlockBreakEvent(worldIn, ((ServerPlayer) entityLiving).gameMode.getGameModeForPlayer(), (ServerPlayer) entityLiving, pos);
187189
if (xp >= 0 && block.onDestroyedByPlayer(tempState, worldIn, pos, (ServerPlayer) entityLiving, true, tempState.getFluidState())) {
188190
block.destroy(worldIn, pos, tempState);
189-
Block.getDrops(tempState, (ServerLevel) worldIn, pos, null, entityLiving, tool).forEach(itemStack -> {
191+
//block.playerDestroy(worldIn, (Player) entityLiving, pos, tempState, worldIn.getExistingBlockEntity(pos), tool);
192+
Block.getDrops(tempState, (ServerLevel) worldIn, pos, worldIn.getExistingBlockEntity(pos), entityLiving, tool).forEach(itemStack -> {
190193
boolean combined = false;
191194
for (ItemStack drop : totalDrops) {
192195
if (ItemHandlerHelper.canItemStacksStack(drop, itemStack)) {

0 commit comments

Comments
 (0)