item texture upgrade, jei fixes, machine fixes, and datagen fixes/additions
This commit is contained in:
@@ -13,5 +13,10 @@ public class JRModClient implements ClientModInitializer {
|
||||
CommonClientClass.init();
|
||||
|
||||
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.TANK.get(), RenderType.translucent());
|
||||
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.INCUBATOR.get(), RenderType.translucent());
|
||||
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.DNA_EXTRACTOR.get(), RenderType.translucent());
|
||||
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.FOSSIL_GRINDER.get(), RenderType.translucent());
|
||||
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.FOSSIL_CLEANER.get(), RenderType.translucent());
|
||||
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.DNA_HYBRIDIZER.get(), RenderType.translucent());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,16 +74,6 @@ public class FabricRecipeProvider extends net.fabricmc.fabric.api.datagen.v1.pro
|
||||
builder.save(output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildShapeless(RecipeCategory category, ItemLike result, int count, ItemLike... ingredients) {
|
||||
ShapelessRecipeBuilder builder = ShapelessRecipeBuilder.shapeless(category, result, count);
|
||||
for (ItemLike ingredient : ingredients) {
|
||||
builder.requires(ingredient);
|
||||
}
|
||||
builder.unlockedBy("has_item", has(result));
|
||||
builder.save(output);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildShapeless(RecipeCategory category, ItemLike result, int count, String name, ItemLike... ingredients) {
|
||||
ShapelessRecipeBuilder builder = ShapelessRecipeBuilder.shapeless(category, result, count);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.cmr.jurassicrevived.platform;
|
||||
|
||||
import net.cmr.jurassicrevived.block.entity.energy.ModEnergyStorage;
|
||||
import net.fabricmc.fabric.api.transfer.v1.transaction.Transaction;
|
||||
import net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext;
|
||||
import team.reborn.energy.api.EnergyStorage;
|
||||
|
||||
@@ -13,12 +14,30 @@ public class FabricEnergyWrapper implements EnergyStorage {
|
||||
|
||||
@Override
|
||||
public long insert(long maxAmount, TransactionContext transaction) {
|
||||
return storage.receiveEnergy((int) maxAmount, true);
|
||||
int accepted = storage.receiveEnergy((int) Math.min(Integer.MAX_VALUE, maxAmount), true);
|
||||
if (accepted <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
try (Transaction nested = transaction.openNested()) {
|
||||
int inserted = storage.receiveEnergy(accepted, false);
|
||||
nested.commit();
|
||||
return inserted;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long extract(long maxAmount, TransactionContext transaction) {
|
||||
return storage.extractEnergy((int) maxAmount, true);
|
||||
int extracted = storage.extractEnergy((int) Math.min(Integer.MAX_VALUE, maxAmount), true);
|
||||
if (extracted <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
try (Transaction nested = transaction.openNested()) {
|
||||
int removed = storage.extractEnergy(extracted, false);
|
||||
nested.commit();
|
||||
return removed;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
"jade": [
|
||||
"net.cmr.jurassicrevived.compat.MachineJadePlugin",
|
||||
"net.cmr.jurassicrevived.compat.EggJadePlugin"
|
||||
],
|
||||
"jei_mod_plugin": [
|
||||
"net.cmr.jurassicrevived.compat.JEIJRPlugin"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
|
||||
Reference in New Issue
Block a user