some bug fixes
This commit is contained in:
17
README.md
17
README.md
@@ -23,16 +23,19 @@ We wanna be the first ones to try and prove this concept.
|
||||
|
||||
## Features
|
||||
|
||||
* Concrete (Rebar Concrete Too)
|
||||
* Steel
|
||||
* Large Distilleries
|
||||
* Blast Furnaces
|
||||
* Coke Ovens
|
||||
* OIL!!!
|
||||
* Quad Potato Cannon (Fwoomp)
|
||||
* Bauxite(For Obtaining Aluminum or for Building)
|
||||
* Realistic Electricity
|
||||
* Steel Mills
|
||||
* Concrete
|
||||
* Electrolyzers
|
||||
* Steel
|
||||
* Aluminum
|
||||
* Cast Iron
|
||||
* Lead
|
||||
* Sulfur
|
||||
* OIL!!!
|
||||
* Quad Potato Cannon
|
||||
* Flamethrowers
|
||||
* And more..
|
||||
|
||||
<br>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// 1.20.1 2025-06-28T21:43:05.723232 Registrate Provider for tfmg [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
|
||||
// 1.20.1 2025-07-02T22:26:39.170519 Registrate Provider for tfmg [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
|
||||
ff5a5721633b83465ab501cbdfdc579a0f20e938 assets/tfmg/blockstates/accumulator.json
|
||||
e982a263b6af75821042107fdeff7bd809436d08 assets/tfmg/blockstates/air_intake.json
|
||||
e7f63aadfc892e337d9f87b5e50af8b1c7e4103f assets/tfmg/blockstates/aluminum_bars.json
|
||||
@@ -436,8 +436,8 @@ a1988ec6a98f23cad8321b46345fbf1c5fd20489 assets/tfmg/blockstates/yellow_rebar_co
|
||||
c58fa20c091e5ecddfb7164cba45538a8f911431 assets/tfmg/blockstates/yellow_rebar_concrete_wall.json
|
||||
0271e2b940bb94cdb7e951b81e277ee633d64d62 assets/tfmg/blockstates/zinc_frame.json
|
||||
1bd66f29acffb67f30bfe94c8535509bd009beab assets/tfmg/blockstates/zinc_truss.json
|
||||
440e139bada2f3a312080ea81c808a06c0a0db92 assets/tfmg/lang/en_ud.json
|
||||
8b2c8944edbfcc8e41417fd12a7a0a79bfef737d assets/tfmg/lang/en_us.json
|
||||
d4597424a0c22ce7a0fc9f6fdc5a257fa20b2533 assets/tfmg/lang/en_ud.json
|
||||
e11bfa4e2988dd2ef1ae41c306c8989601bbcaf8 assets/tfmg/lang/en_us.json
|
||||
9e6a6b62f5e7528c4e4d4f72f3510edcd8f0c078 assets/tfmg/models/block/aluminum_block.json
|
||||
1d33a893d6ac05f9adaceb7f84423ebe9b195c01 assets/tfmg/models/block/aluminum_cable_hub.json
|
||||
da469bf3233944085f07d4ef437827061e408838 assets/tfmg/models/block/aluminum_cap.json
|
||||
|
||||
@@ -475,8 +475,8 @@
|
||||
"create.goggles.blast_furnace.stats": ":ǝɔɐuɹnℲ ʇsɐןᗺ",
|
||||
"create.goggles.blast_furnace.timer": "%1$s :ʇɟǝꞀ ǝɯı⟘",
|
||||
"create.goggles.blast_stove.header": " :ǝʌoʇS ʇsɐןᗺ",
|
||||
"create.goggles.blast_stove.tank1": " :Ɩ ʞuɐ⟘ ʇnduI",
|
||||
"create.goggles.blast_stove.tank2": " :ᄅ ʞuɐ⟘ ʇnduI",
|
||||
"create.goggles.blast_stove.tank1": " :ʞuɐ⟘ ʇnduI",
|
||||
"create.goggles.blast_stove.tank2": " :ʞuɐ⟘ ןǝnℲ",
|
||||
"create.goggles.blast_stove.tank3": " :Ɩ ʞuɐ⟘ ʇndʇnO",
|
||||
"create.goggles.blast_stove.tank4": " :ᄅ ʞuɐ⟘ ʇndʇnO",
|
||||
"create.goggles.coke_oven.header": ":uǝʌO ǝʞoƆ",
|
||||
@@ -521,10 +521,10 @@
|
||||
"create.goggles.pumpjack.wrong_rotation2": "ɹǝpןoH ɹǝɯɯɐH ʞɔɐظdɯnԀ ǝɥʇ ɯoɹɟ ʎɐʍɐ ǝɔɐɟ",
|
||||
"create.goggles.pumpjack_fluid_storage": ":oɟuI ʞuɐ⟘ pınןℲ",
|
||||
"create.goggles.pumpjack_info": ":oɟuI ʞɔɐظdɯnԀ",
|
||||
"create.goggles.surface_scanner.deposit_found": "¡pǝʇɐɔoꞀ ʇısodǝᗡ",
|
||||
"create.goggles.surface_scanner.distance": "sʞɔoןᗺ %1$s :ǝɔuɐʇsıᗡ",
|
||||
"create.goggles.surface_scanner.no_deposit": "punoℲ ʇısodǝᗡ oN",
|
||||
"create.goggles.surface_scanner.scanning_surface": "ǝɔɐɟɹnS ǝɥ⟘ buıuuɐɔS",
|
||||
"create.goggles.surface_scanner.deposits_found": "punoℲ sʇısodǝᗡ ןıO ɥʇıM sʞunɥƆ ",
|
||||
"create.goggles.surface_scanner.header": "ɹǝuuɐɔS ǝɔɐɟɹnS",
|
||||
"create.goggles.surface_scanner.no_deposit": "punoℲ sʇısodǝᗡ oN",
|
||||
"create.goggles.surface_scanner.no_rotation": ")ɯdɹㄣ9 spǝǝN( uoıʇɐʇoᴚ ɥbnouƎ ʇoN",
|
||||
"create.goggles.vat.attachments": ":sʇuǝɯɥɔɐʇʇⱯ",
|
||||
"create.goggles.vat.contents": ":sʇuǝʇuoƆ ʇɐΛ",
|
||||
"create.goggles.vat.header": "ʇɐΛ ןɐɔıɯǝɥƆ",
|
||||
@@ -1065,4 +1065,4 @@
|
||||
"tfmg.ponder.tag.oil_processing.description": "ןıo buıuıɯ puɐ buıuıɟǝɹ ɹoɟ pǝsn ʞɔoןᗺ",
|
||||
"tfmg.subtitle.diesel_engine_sounds": "spunoS ǝuıbuƎ ןǝsǝıᗡ",
|
||||
"tfmg.subtitle.engine_sounds": "spunoS ǝuıbuƎ"
|
||||
}
|
||||
}
|
||||
@@ -475,8 +475,8 @@
|
||||
"create.goggles.blast_furnace.stats": "Blast Furnace:",
|
||||
"create.goggles.blast_furnace.timer": "Time Left: %1$s",
|
||||
"create.goggles.blast_stove.header": "Blast Stove: ",
|
||||
"create.goggles.blast_stove.tank1": "Input Tank 1: ",
|
||||
"create.goggles.blast_stove.tank2": "Input Tank 2: ",
|
||||
"create.goggles.blast_stove.tank1": "Input Tank: ",
|
||||
"create.goggles.blast_stove.tank2": "Fuel Tank: ",
|
||||
"create.goggles.blast_stove.tank3": "Output Tank 1: ",
|
||||
"create.goggles.blast_stove.tank4": "Output Tank 2: ",
|
||||
"create.goggles.coke_oven.header": "Coke Oven:",
|
||||
@@ -521,10 +521,10 @@
|
||||
"create.goggles.pumpjack.wrong_rotation2": "face away from the Pumpjack Hammer Holder",
|
||||
"create.goggles.pumpjack_fluid_storage": "Fluid Tank Info:",
|
||||
"create.goggles.pumpjack_info": "Pumpjack Info:",
|
||||
"create.goggles.surface_scanner.deposit_found": "Deposit Located!",
|
||||
"create.goggles.surface_scanner.distance": "Distance: %1$s Blocks",
|
||||
"create.goggles.surface_scanner.no_deposit": "No Deposit Found",
|
||||
"create.goggles.surface_scanner.scanning_surface": "Scanning The Surface",
|
||||
"create.goggles.surface_scanner.deposits_found": " Chunks With Oil Deposits Found",
|
||||
"create.goggles.surface_scanner.header": "Surface Scanner",
|
||||
"create.goggles.surface_scanner.no_deposit": "No Deposits Found",
|
||||
"create.goggles.surface_scanner.no_rotation": "Not Enough Rotation (Needs 64rpm)",
|
||||
"create.goggles.vat.attachments": "Attachments:",
|
||||
"create.goggles.vat.contents": "Vat Contents:",
|
||||
"create.goggles.vat.header": "Chemical Vat",
|
||||
@@ -1065,4 +1065,4 @@
|
||||
"tfmg.ponder.tag.oil_processing.description": "Block used for refining and mining oil",
|
||||
"tfmg.subtitle.diesel_engine_sounds": "Diesel Engine Sounds",
|
||||
"tfmg.subtitle.engine_sounds": "Engine Sounds"
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public class PolarizerBlock extends TFMGHorizontalDirectionalBlock implements IB
|
||||
if(level.getBlockEntity(pos) instanceof PolarizerBlockEntity be){
|
||||
if(player.getItemInHand(hand).isEmpty()){
|
||||
if(!be.inventory.isEmpty()) {
|
||||
player.setItemInHand(hand, new ItemStack(be.inventory.getStackInSlot(0).getItem(),1));
|
||||
player.setItemInHand(hand, be.inventory.getStackInSlot(0));
|
||||
be.inventory.setItem(0, ItemStack.EMPTY);
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
@@ -94,6 +94,9 @@ public class LargeEngineBlockEntity extends AbstractEngineBlockEntity {
|
||||
|
||||
PoweredShaftBlockEntity shaft = getShaft();
|
||||
|
||||
|
||||
|
||||
|
||||
if (shaft == null) {
|
||||
if (!level.isClientSide()) {
|
||||
|
||||
@@ -207,9 +210,14 @@ public class LargeEngineBlockEntity extends AbstractEngineBlockEntity {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean isFuelValid = false;
|
||||
for(TagKey<Fluid> tag : getSupportedFuels()){
|
||||
if(fuelTank.getFluid().getFluid().is(tag))
|
||||
isFuelValid = true;
|
||||
}
|
||||
|
||||
|
||||
shaft.update(worldPosition, 2, 15 * getFuelType().getStress());
|
||||
shaft.update(worldPosition, 2, 15 * getFuelType().getStress()*(isFuelValid?1:0));
|
||||
sendData();
|
||||
setChanged();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import net.minecraft.world.item.crafting.Recipe;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
@@ -362,11 +363,12 @@ public class BlastStoveBlockEntity extends FluidTankBlockEntity implements IHave
|
||||
LangBuilder mb = CreateLang.translate("generic.unit.millibuckets");
|
||||
|
||||
CreateLang.translate("goggles.blast_stove.header")
|
||||
.forGoggles(tooltip);
|
||||
.forGoggles(tooltip);
|
||||
CreateLang.builder()
|
||||
.add(CreateLang.translate("goggles.blast_stove.tank1"))
|
||||
.add(CreateLang.number(secondaryCapability.orElseGet(null).getFluidInTank(0).getAmount())
|
||||
.add(CreateLang.number(getControllerBE().secondaryCapability.orElseGet(null).getFluidInTank(0).getAmount())
|
||||
.add(mb)
|
||||
.add(getControllerBE().secondaryCapability.orElseGet(null).getFluidInTank(0).getFluid() == Fluids.EMPTY ? CreateLang.text("") : CreateLang.text(" "+getControllerBE().secondaryCapability.orElseGet(null).getFluidInTank(0).getDisplayName().getString()))
|
||||
.style(ChatFormatting.DARK_GREEN))
|
||||
.text(ChatFormatting.GRAY, " / ")
|
||||
.add(CreateLang.number(8000)
|
||||
@@ -375,8 +377,9 @@ public class BlastStoveBlockEntity extends FluidTankBlockEntity implements IHave
|
||||
.forGoggles(tooltip, 1);
|
||||
CreateLang.builder()
|
||||
.add(CreateLang.translate("goggles.blast_stove.tank2"))
|
||||
.add(CreateLang.number(primaryCapability.orElseGet(null).getFluidInTank(1).getAmount())
|
||||
.add(CreateLang.number(getControllerBE().primaryCapability.orElseGet(null).getFluidInTank(1).getAmount())
|
||||
.add(mb)
|
||||
.add(getControllerBE().primaryCapability.orElseGet(null).getFluidInTank(1).getFluid() == Fluids.EMPTY ? CreateLang.text("") : CreateLang.text(" "+getControllerBE().primaryCapability.orElseGet(null).getFluidInTank(1).getDisplayName().getString()))
|
||||
.style(ChatFormatting.DARK_GREEN))
|
||||
.text(ChatFormatting.GRAY, " / ")
|
||||
.add(CreateLang.number(8000)
|
||||
@@ -385,8 +388,9 @@ public class BlastStoveBlockEntity extends FluidTankBlockEntity implements IHave
|
||||
.forGoggles(tooltip, 1);
|
||||
CreateLang.builder()
|
||||
.add(CreateLang.translate("goggles.blast_stove.tank3"))
|
||||
.add(CreateLang.number(primaryCapability.orElseGet(null).getFluidInTank(0).getAmount())
|
||||
.add(CreateLang.number(getControllerBE().primaryCapability.orElseGet(null).getFluidInTank(0).getAmount())
|
||||
.add(mb)
|
||||
.add(getControllerBE().primaryCapability.orElseGet(null).getFluidInTank(0).getFluid() == Fluids.EMPTY ? CreateLang.text("") : CreateLang.text(" "+getControllerBE().primaryCapability.orElseGet(null).getFluidInTank(0).getDisplayName().getString()))
|
||||
.style(ChatFormatting.YELLOW))
|
||||
.text(ChatFormatting.GRAY, " / ")
|
||||
.add(CreateLang.number(8000)
|
||||
@@ -395,8 +399,9 @@ public class BlastStoveBlockEntity extends FluidTankBlockEntity implements IHave
|
||||
.forGoggles(tooltip, 1);
|
||||
CreateLang.builder()
|
||||
.add(CreateLang.translate("goggles.blast_stove.tank4"))
|
||||
.add(CreateLang.number(secondaryCapability.orElseGet(null).getFluidInTank(1).getAmount())
|
||||
.add(CreateLang.number(getControllerBE().secondaryCapability.orElseGet(null).getFluidInTank(1).getAmount())
|
||||
.add(mb)
|
||||
.add(getControllerBE().secondaryCapability.orElseGet(null).getFluidInTank(1).getFluid() == Fluids.EMPTY ? CreateLang.text("") : CreateLang.text(" "+getControllerBE().secondaryCapability.orElseGet(null).getFluidInTank(1).getDisplayName().getString()))
|
||||
.style(ChatFormatting.YELLOW))
|
||||
.text(ChatFormatting.GRAY, " / ")
|
||||
.add(CreateLang.number(8000)
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
package com.drmangotea.tfmg.content.machinery.metallurgy.coke_oven;
|
||||
|
||||
import com.drmangotea.tfmg.TFMG;
|
||||
import com.drmangotea.tfmg.base.TFMGUtils;
|
||||
import com.drmangotea.tfmg.config.TFMGConfigs;
|
||||
import com.drmangotea.tfmg.content.electricity.base.ConnectNeightborsPacket;
|
||||
import com.drmangotea.tfmg.recipes.CokingRecipe;
|
||||
import com.drmangotea.tfmg.registry.TFMGBlocks;
|
||||
import com.drmangotea.tfmg.registry.TFMGPackets;
|
||||
import com.drmangotea.tfmg.registry.TFMGRecipeTypes;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.api.equipment.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
||||
import com.simibubi.create.foundation.fluid.SmartFluidTank;
|
||||
import com.simibubi.create.foundation.item.ItemHelper;
|
||||
import com.simibubi.create.foundation.item.SmartInventory;
|
||||
|
||||
|
||||
import net.createmod.catnip.math.VecHelper;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
import net.createmod.catnip.animation.LerpedFloat;
|
||||
import net.createmod.catnip.lang.LangBuilder;
|
||||
import net.createmod.catnip.math.VecHelper;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
@@ -26,7 +24,7 @@ import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.item.ItemEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
@@ -36,6 +34,7 @@ import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.templates.FluidTank;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
import net.minecraftforge.items.wrapper.RecipeWrapper;
|
||||
import net.minecraftforge.network.PacketDistributor;
|
||||
@@ -61,39 +60,40 @@ public class CokeOvenBlockEntity extends SmartBlockEntity implements IHaveGoggle
|
||||
public BlockPos controller = getBlockPos();
|
||||
public int size = 1;
|
||||
public boolean forceOpen = false;
|
||||
|
||||
public CokeOvenBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
setLazyTickRate(10);
|
||||
inventory = new SmartInventory(1, this)
|
||||
.withMaxStackSize(64)
|
||||
.whenContentsChanged(i->this.onContentsChanged());
|
||||
.whenContentsChanged(i -> this.onContentsChanged());
|
||||
primaryTank = new SmartFluidTank(8000, this::onFluidChanged);
|
||||
secondaryTank = new SmartFluidTank(8000, this::onFluidChanged);
|
||||
itemCapability = LazyOptional.of(() -> inventory);
|
||||
primaryFluidCapability = LazyOptional.of(()-> primaryTank);
|
||||
secondaryFluidCapability = LazyOptional.of(()-> secondaryTank);
|
||||
primaryFluidCapability = LazyOptional.of(() -> primaryTank);
|
||||
secondaryFluidCapability = LazyOptional.of(() -> secondaryTank);
|
||||
createNextTick = true;
|
||||
}
|
||||
|
||||
public void onContentsChanged(){
|
||||
if(!inventory.isEmpty()&& timer == -1){
|
||||
public void onContentsChanged() {
|
||||
if (!inventory.isEmpty() && timer == -1) {
|
||||
executeRecipe();
|
||||
}
|
||||
if(inventory.isEmpty())
|
||||
if (inventory.isEmpty())
|
||||
timer = -1;
|
||||
}
|
||||
|
||||
public void executeRecipe(){
|
||||
public void executeRecipe() {
|
||||
|
||||
Optional<CokingRecipe> optional = TFMGRecipeTypes.COKING.find(new RecipeWrapper(inventory), level);
|
||||
|
||||
if(optional.isEmpty())
|
||||
if (optional.isEmpty())
|
||||
return;
|
||||
|
||||
CokingRecipe recipe = optional.get();
|
||||
|
||||
if(recipe.getIngredients().get(0).test(inventory.getItem(0)))
|
||||
timer = recipe.getProcessingDuration()/(Math.max(size/2,1));
|
||||
if (recipe.getIngredients().get(0).test(inventory.getItem(0)))
|
||||
timer = recipe.getProcessingDuration() / (Math.max(size / 2, 1));
|
||||
}
|
||||
|
||||
private void onFluidChanged(FluidStack stack) {
|
||||
@@ -106,46 +106,45 @@ public class CokeOvenBlockEntity extends SmartBlockEntity implements IHaveGoggle
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
|
||||
tickRecipe();
|
||||
|
||||
if(level.isClientSide){
|
||||
if (level.isClientSide) {
|
||||
|
||||
doorAngle.chase((timer > 0 && timer < 50) || forceOpen ? 90 : 0, 0.1f, LerpedFloat.Chaser.EXP);
|
||||
doorAngle.tickChaser();
|
||||
if(!forceOpen)
|
||||
if (!forceOpen)
|
||||
manageDoors(timer > 0 && timer < 50);
|
||||
}
|
||||
if(createNextTick){
|
||||
if (createNextTick) {
|
||||
createMultiblock();
|
||||
createNextTick = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void tickRecipe(){
|
||||
if(inventory.isEmpty()||timer == -1)
|
||||
public void tickRecipe() {
|
||||
if (inventory.isEmpty() || timer == -1)
|
||||
return;
|
||||
|
||||
Optional<CokingRecipe> optional = TFMGRecipeTypes.COKING.find(new RecipeWrapper(inventory), level);
|
||||
|
||||
if(optional.isEmpty()) {
|
||||
if (optional.isEmpty()) {
|
||||
timer = -1;
|
||||
return;
|
||||
}
|
||||
CokingRecipe recipe = optional.get();
|
||||
|
||||
if(timer ==0){
|
||||
if (timer == 0) {
|
||||
timer = -1;
|
||||
inventory.getItem(0).shrink(recipe.getIngredients().get(0).getItems()[0].getCount());
|
||||
|
||||
Direction direction = getBlockState().getValue(FACING);
|
||||
Direction direction = getBlockState().getValue(FACING);
|
||||
|
||||
Vec3 dropVec = VecHelper.getCenterOf(worldPosition.relative(direction))
|
||||
.add(0,0.4,0);
|
||||
.add(0, 0.4, 0);
|
||||
ItemEntity dropped = new ItemEntity(level, dropVec.x, dropVec.y, dropVec.z, recipe.getResultItem(level.registryAccess()).copy());
|
||||
dropped.setDefaultPickUpDelay();
|
||||
dropped.setDeltaMovement(direction.getAxis() == Direction.Axis.X ? direction == Direction.WEST ? -.01f : .01f : 0, 0.05f, direction.getAxis() == Direction.Axis.Z ? direction == Direction.NORTH ? -.01f : .01f : 0);
|
||||
@@ -159,9 +158,9 @@ public class CokeOvenBlockEntity extends SmartBlockEntity implements IHaveGoggle
|
||||
onContentsChanged();
|
||||
}
|
||||
|
||||
if(timer >0&&primaryTank.getSpace() !=0&&secondaryTank.getSpace() !=0){
|
||||
primaryTank.fill(recipe.getPrimaryResult(), IFluidHandler.FluidAction.EXECUTE);
|
||||
secondaryTank.fill(recipe.getSecondaryResult(), IFluidHandler.FluidAction.EXECUTE);
|
||||
if (timer > 0 && primaryTank.getSpace() != 0 && secondaryTank.getSpace() != 0) {
|
||||
primaryTank.fill(recipe.getPrimaryResult(), IFluidHandler.FluidAction.EXECUTE);
|
||||
secondaryTank.fill(recipe.getSecondaryResult(), IFluidHandler.FluidAction.EXECUTE);
|
||||
timer--;
|
||||
}
|
||||
}
|
||||
@@ -172,97 +171,151 @@ public class CokeOvenBlockEntity extends SmartBlockEntity implements IHaveGoggle
|
||||
onContentsChanged();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
|
||||
CreateLang.translate("goggles.coke_oven.header")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip);
|
||||
|
||||
if(level.getBlockEntity(controller) instanceof CokeOvenBlockEntity controller)
|
||||
if (controller.timer > 0)
|
||||
CreateLang.translate("goggles.coke_oven.progress", controller.timer / 20)
|
||||
.style(ChatFormatting.GOLD)
|
||||
.forGoggles(tooltip);
|
||||
|
||||
createFluidTooltip(this,tooltip);
|
||||
TFMGUtils.createItemTooltip(this, tooltip);
|
||||
return true;
|
||||
}
|
||||
public void manageDoors(boolean open){
|
||||
|
||||
for(int i =0; i< size;i++){
|
||||
public static boolean createFluidTooltip(CokeOvenBlockEntity be, List<Component> tooltip) {
|
||||
LangBuilder mb = CreateLang.translate("generic.unit.millibuckets");
|
||||
|
||||
/////////
|
||||
|
||||
if(be.level.getBlockEntity(be.controller) instanceof CokeOvenBlockEntity controller) {
|
||||
|
||||
|
||||
IFluidHandler tank = new CombinedTankWrapper(controller.primaryTank, controller.secondaryTank);
|
||||
|
||||
|
||||
if (tank.getTanks() == 0) return false;
|
||||
|
||||
CreateLang.translate("goggles.fluid_storage").style(ChatFormatting.GRAY).forGoggles(tooltip);
|
||||
|
||||
|
||||
boolean isEmpty = true;
|
||||
for (int i = 0; i < tank.getTanks(); i++) {
|
||||
FluidStack fluidStack = tank.getFluidInTank(i);
|
||||
if (fluidStack.isEmpty()) continue;
|
||||
CreateLang.fluidName(fluidStack).style(ChatFormatting.GRAY).forGoggles(tooltip, 1);
|
||||
CreateLang.builder().add(CreateLang.number(fluidStack.getAmount()).add(mb).style(ChatFormatting.DARK_GREEN)).text(ChatFormatting.GRAY, " / ").add(CreateLang.number(tank.getTankCapacity(i)).add(mb).style(ChatFormatting.DARK_GRAY)).forGoggles(tooltip, 1);
|
||||
isEmpty = false;
|
||||
}
|
||||
if (tank.getTanks() > 1) {
|
||||
if (isEmpty) tooltip.remove(tooltip.size() - 1);
|
||||
return true;
|
||||
}
|
||||
if (!isEmpty) return true;
|
||||
|
||||
CreateLang.translate("gui.goggles.fluid_container.capacity").add(CreateLang.number(tank.getTankCapacity(0)).add(mb).style(ChatFormatting.DARK_GREEN)).style(ChatFormatting.DARK_GRAY).forGoggles(tooltip, 1);
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void manageDoors(boolean open) {
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
BlockPos pos = getBlockPos().above(i);
|
||||
|
||||
if(level.getBlockEntity(pos) instanceof CokeOvenBlockEntity be&&pos != getBlockPos()){
|
||||
if (level.getBlockEntity(pos) instanceof CokeOvenBlockEntity be && pos != getBlockPos()) {
|
||||
be.forceOpen = open;
|
||||
}
|
||||
}
|
||||
}
|
||||
public boolean isController(){
|
||||
|
||||
public boolean isController() {
|
||||
return controller == getBlockPos();
|
||||
}
|
||||
public void createMultiblock(){
|
||||
|
||||
if(level == null)
|
||||
public void createMultiblock() {
|
||||
|
||||
if (level == null)
|
||||
return;
|
||||
int maxSize = TFMGConfigs.common().machines.cokeOvenMaxSize.get();
|
||||
Direction facing = getBlockState().getValue(FACING);
|
||||
if(level.getBlockState(getBlockPos().relative(facing)).is(TFMGBlocks.COKE_OVEN.get())||level.getBlockState(getBlockPos().below()).is(TFMGBlocks.COKE_OVEN.get()))
|
||||
if (level.getBlockState(getBlockPos().relative(facing)).is(TFMGBlocks.COKE_OVEN.get()) || level.getBlockState(getBlockPos().below()).is(TFMGBlocks.COKE_OVEN.get()))
|
||||
return;
|
||||
|
||||
int size = 1;
|
||||
for(int i = 1;i<=maxSize;i++){
|
||||
boolean cantBuildMultiblock = false;
|
||||
for(BlockPos pos : BlockPos.betweenClosed(getBlockPos(),getBlockPos().above(i).relative(facing.getOpposite(),i))) {
|
||||
if(!level.getBlockState(pos).is(TFMGBlocks.COKE_OVEN.get())){
|
||||
cantBuildMultiblock = true;
|
||||
}else
|
||||
if(level.getBlockState(pos).is(TFMGBlocks.COKE_OVEN.get()) &&level.getBlockState(pos).getValue(FACING) != facing){
|
||||
cantBuildMultiblock = true;
|
||||
}
|
||||
for (int i = 1; i <= maxSize; i++) {
|
||||
boolean cantBuildMultiblock = false;
|
||||
for (BlockPos pos : BlockPos.betweenClosed(getBlockPos(), getBlockPos().above(i).relative(facing.getOpposite(), i))) {
|
||||
if (!level.getBlockState(pos).is(TFMGBlocks.COKE_OVEN.get())) {
|
||||
cantBuildMultiblock = true;
|
||||
} else if (level.getBlockState(pos).is(TFMGBlocks.COKE_OVEN.get()) && level.getBlockState(pos).getValue(FACING) != facing) {
|
||||
cantBuildMultiblock = true;
|
||||
}
|
||||
if(cantBuildMultiblock)
|
||||
break;
|
||||
size++;
|
||||
}
|
||||
for(BlockPos pos : BlockPos.betweenClosed(getBlockPos(),getBlockPos().above(size-1).relative(facing.getOpposite(),size-1))) {
|
||||
if(level.getBlockEntity(pos) instanceof CokeOvenBlockEntity be&&(!level.getBlockState(getBlockPos().relative(facing)).is(TFMGBlocks.COKE_OVEN.get())&&!level.getBlockState(getBlockPos().below()).is(TFMGBlocks.COKE_OVEN.get()))){
|
||||
if (cantBuildMultiblock)
|
||||
break;
|
||||
size++;
|
||||
}
|
||||
for (BlockPos pos : BlockPos.betweenClosed(getBlockPos(), getBlockPos().above(size - 1).relative(facing.getOpposite(), size - 1))) {
|
||||
if (level.getBlockEntity(pos) instanceof CokeOvenBlockEntity be && (!level.getBlockState(getBlockPos().relative(facing)).is(TFMGBlocks.COKE_OVEN.get()) && !level.getBlockState(getBlockPos().below()).is(TFMGBlocks.COKE_OVEN.get()))) {
|
||||
|
||||
be.controller = getBlockPos();
|
||||
be.refreshCapability();
|
||||
}
|
||||
}
|
||||
if(!level.getBlockState(getBlockPos().relative(facing)).is(TFMGBlocks.COKE_OVEN.get())&&!level.getBlockState(getBlockPos().below()).is(TFMGBlocks.COKE_OVEN.get()))
|
||||
if (!level.getBlockState(getBlockPos().relative(facing)).is(TFMGBlocks.COKE_OVEN.get()) && !level.getBlockState(getBlockPos().below()).is(TFMGBlocks.COKE_OVEN.get()))
|
||||
setBlockStates(size);
|
||||
for(BlockPos pos : BlockPos.betweenClosed(getBlockPos(), getBlockPos().above(this.size-1).relative(facing.getOpposite(),this.size-1))){
|
||||
if(level.getBlockEntity(pos) instanceof CokeOvenBlockEntity be){
|
||||
if(Math.abs(getBlockPos().getX()-be.getBlockPos().getX())>=size || Math.abs(getBlockPos().getY()-be.getBlockPos().getY())>=size || Math.abs(getBlockPos().getZ()-be.getBlockPos().getZ())>=size)
|
||||
if (be.controller == getBlockPos()||be.controller!=be.getBlockPos()) {
|
||||
for (BlockPos pos : BlockPos.betweenClosed(getBlockPos(), getBlockPos().above(this.size - 1).relative(facing.getOpposite(), this.size - 1))) {
|
||||
if (level.getBlockEntity(pos) instanceof CokeOvenBlockEntity be) {
|
||||
if (Math.abs(getBlockPos().getX() - be.getBlockPos().getX()) >= size || Math.abs(getBlockPos().getY() - be.getBlockPos().getY()) >= size || Math.abs(getBlockPos().getZ() - be.getBlockPos().getZ()) >= size)
|
||||
if (be.controller == getBlockPos() || be.controller != be.getBlockPos()) {
|
||||
be.controller = be.getBlockPos();
|
||||
be.refreshCapability();
|
||||
be.forceOpen = false;
|
||||
be.doorAngle.setValue(0);
|
||||
level.setBlock(be.getBlockPos(), getBlockState().setValue(CokeOvenBlock.CONTROLLER_TYPE ,CokeOvenBlock.ControllerType.CASUAL), 2);
|
||||
level.setBlock(be.getBlockPos(), getBlockState().setValue(CokeOvenBlock.CONTROLLER_TYPE, CokeOvenBlock.ControllerType.CASUAL), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.size = size;
|
||||
}
|
||||
public void setBlockStates(int size){
|
||||
|
||||
if(size>1){
|
||||
level.setBlock(getBlockPos(), getBlockState().setValue(CokeOvenBlock.CONTROLLER_TYPE ,CokeOvenBlock.ControllerType.BOTTOM_ON), 2);
|
||||
level.setBlock(getBlockPos().above(size-1), getBlockState().setValue(CokeOvenBlock.CONTROLLER_TYPE ,CokeOvenBlock.ControllerType.TOP_ON), 2);
|
||||
public void setBlockStates(int size) {
|
||||
|
||||
if (size > 1) {
|
||||
level.setBlock(getBlockPos(), getBlockState().setValue(CokeOvenBlock.CONTROLLER_TYPE, CokeOvenBlock.ControllerType.BOTTOM_ON), 2);
|
||||
level.setBlock(getBlockPos().above(size - 1), getBlockState().setValue(CokeOvenBlock.CONTROLLER_TYPE, CokeOvenBlock.ControllerType.TOP_ON), 2);
|
||||
} else
|
||||
level.setBlock(getBlockPos(), getBlockState().setValue(CokeOvenBlock.CONTROLLER_TYPE ,CokeOvenBlock.ControllerType.CASUAL), 2);
|
||||
level.setBlock(getBlockPos(), getBlockState().setValue(CokeOvenBlock.CONTROLLER_TYPE, CokeOvenBlock.ControllerType.CASUAL), 2);
|
||||
|
||||
for(int i = 0; i < size; i++) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
BlockPos pos = getBlockPos().above(i);
|
||||
|
||||
if (i > 0&&i != size-1) {
|
||||
if (i > 0 && i != size - 1) {
|
||||
level.setBlock(pos, getBlockState().setValue(CokeOvenBlock.CONTROLLER_TYPE, CokeOvenBlock.ControllerType.MIDDLE_ON), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void onPlaced(){
|
||||
|
||||
public void onPlaced() {
|
||||
createNextTick = true;
|
||||
updateOvenBlocks();
|
||||
if(!level.isClientSide)
|
||||
if (!level.isClientSide)
|
||||
TFMGPackets.getChannel().send(PacketDistributor.ALL.noArg(), new CokeOvenPacket(getBlockPos()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
super.remove();
|
||||
@@ -272,54 +325,61 @@ public class CokeOvenBlockEntity extends SmartBlockEntity implements IHaveGoggle
|
||||
@Override
|
||||
public void destroy() {
|
||||
super.destroy();
|
||||
if(isController())
|
||||
if (isController())
|
||||
ItemHelper.dropContents(level, worldPosition, inventory);
|
||||
}
|
||||
|
||||
public void updateOvenBlocks(){
|
||||
public void updateOvenBlocks() {
|
||||
int maxSize = TFMGConfigs.common().machines.cokeOvenMaxSize.get();
|
||||
Direction facing = getBlockState().getValue(FACING);
|
||||
|
||||
for(BlockPos pos : BlockPos.betweenClosed(getBlockPos(), getBlockPos().below(maxSize).relative(facing,maxSize))){
|
||||
//
|
||||
if(level.getBlockEntity(pos) instanceof CokeOvenBlockEntity be){
|
||||
for (BlockPos pos : BlockPos.betweenClosed(getBlockPos(), getBlockPos().below(maxSize).relative(facing, maxSize))) {
|
||||
//
|
||||
if (level.getBlockEntity(pos) instanceof CokeOvenBlockEntity be) {
|
||||
be.createMultiblock();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void refreshCapability() {
|
||||
LazyOptional<IFluidHandler> oldPrimaryFluidCap = primaryFluidCapability;
|
||||
LazyOptional<IFluidHandler> oldSecondaryFluidCap = secondaryFluidCapability;
|
||||
LazyOptional<IItemHandlerModifiable> oldItemCap = itemCapability;
|
||||
|
||||
CokeOvenBlockEntity be;
|
||||
if(level.getBlockEntity(controller) instanceof CokeOvenBlockEntity be1){
|
||||
if (level.getBlockEntity(controller) instanceof CokeOvenBlockEntity be1) {
|
||||
be = be1;
|
||||
} else {
|
||||
controller = getBlockPos();
|
||||
be = (CokeOvenBlockEntity) level.getBlockEntity(getBlockPos());
|
||||
}
|
||||
primaryFluidCapability = LazyOptional.of(()->be.primaryTank);
|
||||
secondaryFluidCapability = LazyOptional.of(()->be.secondaryTank);
|
||||
itemCapability = LazyOptional.of(()->be.inventory);
|
||||
primaryFluidCapability = LazyOptional.of(() -> be.primaryTank);
|
||||
secondaryFluidCapability = LazyOptional.of(() -> be.secondaryTank);
|
||||
itemCapability = LazyOptional.of(() -> be.inventory);
|
||||
oldPrimaryFluidCap.invalidate();
|
||||
oldSecondaryFluidCap.invalidate();
|
||||
oldItemCap.invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {}
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull <T> LazyOptional<T> getCapability(@NotNull Capability<T> cap, @Nullable Direction side) {
|
||||
|
||||
if(cap == ForgeCapabilities.FLUID_HANDLER){
|
||||
if (cap == ForgeCapabilities.FLUID_HANDLER) {
|
||||
return side == Direction.UP ? secondaryFluidCapability.cast() : primaryFluidCapability.cast();
|
||||
}
|
||||
if(cap == ForgeCapabilities.ITEM_HANDLER)
|
||||
if (cap == ForgeCapabilities.ITEM_HANDLER)
|
||||
return itemCapability.cast();
|
||||
|
||||
return super.getCapability(cap, side);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void write(CompoundTag compound, boolean clientPacket) {
|
||||
super.write(compound, clientPacket);
|
||||
@@ -329,6 +389,7 @@ public class CokeOvenBlockEntity extends SmartBlockEntity implements IHaveGoggle
|
||||
compound.put("SecondaryTankContent", secondaryTank.writeToNBT(new CompoundTag()));
|
||||
compound.putLong("Controller", controller.asLong());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
super.read(compound, clientPacket);
|
||||
|
||||
@@ -5,14 +5,18 @@ import com.drmangotea.tfmg.config.TFMGConfigs;
|
||||
import com.drmangotea.tfmg.content.machinery.misc.machine_input.MachineInputBlockEntity;
|
||||
import com.drmangotea.tfmg.registry.TFMGTags;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.api.equipment.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.ValueBoxTransform;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.scrollValue.ScrollValueBehaviour;
|
||||
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
import net.createmod.catnip.math.VecHelper;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
@@ -23,7 +27,7 @@ import net.minecraft.world.phys.Vec3;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class SurfaceScannerBlockEntity extends SmartBlockEntity {
|
||||
public class SurfaceScannerBlockEntity extends SmartBlockEntity implements IHaveGoggleInformation {
|
||||
|
||||
|
||||
public Boolean[][] grid = new Boolean[5][5];
|
||||
@@ -34,6 +38,38 @@ public class SurfaceScannerBlockEntity extends SmartBlockEntity {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
CreateLang.translate("goggles.surface_scanner.header")
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip);
|
||||
if(level.getBlockEntity(getBlockPos().below()) instanceof MachineInputBlockEntity be&&Math.abs(be.getSpeed())>=64) {
|
||||
int depositsFound = 0;
|
||||
for(Boolean[] row : grid){
|
||||
for(Boolean light : row){
|
||||
if(light)
|
||||
depositsFound++;
|
||||
}
|
||||
}
|
||||
|
||||
if(depositsFound>0){
|
||||
CreateLang.number(depositsFound)
|
||||
.add(CreateLang.translate("goggles.surface_scanner.deposits_found"))
|
||||
.style(ChatFormatting.GREEN)
|
||||
.forGoggles(tooltip);
|
||||
}else
|
||||
CreateLang.translate("goggles.surface_scanner.no_deposit")
|
||||
.style(ChatFormatting.RED)
|
||||
.forGoggles(tooltip);
|
||||
|
||||
}else
|
||||
CreateLang.translate("goggles.surface_scanner.no_rotation")
|
||||
.style(ChatFormatting.DARK_RED)
|
||||
.forGoggles(tooltip);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import net.createmod.catnip.animation.LerpedFloat;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.Containers;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
@@ -65,7 +66,10 @@ public class IndustrialMixerBlockEntity extends KineticBlockEntity implements IV
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
ItemStack mixerItem = mixerMode.item;
|
||||
Containers.dropItemStack(getLevel(), getBlockPos().getX(), getBlockPos().getY(), getBlockPos().getZ(), mixerItem);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
20
src/main/java/com/drmangotea/tfmg/mixin/UtilMixin.java
Normal file
20
src/main/java/com/drmangotea/tfmg/mixin/UtilMixin.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package com.drmangotea.tfmg.mixin;
|
||||
|
||||
|
||||
import net.minecraft.Util;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(Util.class)
|
||||
public class UtilMixin {
|
||||
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "logAndPauseIfInIde(Ljava/lang/String;)V", cancellable = true, remap = true)
|
||||
private static void logAndPauseIfInIde(String message, CallbackInfo ci) {
|
||||
if (message.contains("tfmg"))
|
||||
ci.cancel();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -310,7 +310,7 @@ public class TFMGBlockEntities {
|
||||
.blockEntity("engine_gearbox", EngineGearboxBlockEntity::new)
|
||||
.visual(() -> SingleAxisRotatingVisual::shaft)
|
||||
.validBlocks(TFMGBlocks.ENGINE_GEARBOX)
|
||||
.renderer(() -> EngineGearboxRenderer::new)
|
||||
.renderer(() -> ShaftRenderer::new)
|
||||
.register();
|
||||
|
||||
public static final BlockEntityEntry<EngineControllerBlockEntity> ENGINE_CONTROLLER = REGISTRATE
|
||||
|
||||
@@ -142,8 +142,12 @@ public class TFMGItems {
|
||||
.register(),
|
||||
CINDERFLOURBLOCK = REGISTRATE.item("cinderflourblock", Item::new).register(),
|
||||
NAPALM_POTATO = REGISTRATE.item("napalm_potato", Item::new).register(),
|
||||
MIXER_BLADE = REGISTRATE.item("mixer_blade", Item::new).register(),
|
||||
CENTRIFUGE = REGISTRATE.item("centrifuge", Item::new).register(),
|
||||
MIXER_BLADE = REGISTRATE.item("mixer_blade", Item::new)
|
||||
.properties(p->p.stacksTo(1))
|
||||
.register(),
|
||||
CENTRIFUGE = REGISTRATE.item("centrifuge", Item::new)
|
||||
.properties(p->p.stacksTo(1))
|
||||
.register(),
|
||||
CRANKSHAFT = REGISTRATE.item("crankshaft", Item::new)
|
||||
.model((c, p) -> p.withExistingParent(c.getName(), TFMG.asResource("item/crankshaft_model")))
|
||||
.register(),
|
||||
|
||||
@@ -45,7 +45,7 @@ public class TFMGPlacedFeatures {
|
||||
|
||||
register(ctx, OIL_DEPOSIT,oilDeposit,oilPlacement(RarityFilter.onAverageOnceEvery(4)));
|
||||
|
||||
register(ctx, OIL_WELL,oilWell,oilPlacement(RarityFilter.onAverageOnceEvery(500)));
|
||||
register(ctx, OIL_WELL,oilWell,oilPlacement(RarityFilter.onAverageOnceEvery(750)));
|
||||
|
||||
register(ctx, LEAD_ORE, leadOre, placement(CountPlacement.of(5), -15, 80));
|
||||
register(ctx, NICKEL_ORE, nickelOre, placement(CountPlacement.of(5), -63, 20));
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.chunk.ChunkAccess;
|
||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||
@@ -41,6 +42,8 @@ public class OilDepositFeature extends Feature<NoneFeatureConfiguration> {
|
||||
|
||||
public void placeDeposit(BlockPos startingPos, WorldGenLevel level, RandomSource randomsource) {
|
||||
BlockPos pos = startingPos;
|
||||
|
||||
|
||||
level.setBlock(startingPos, TFMGBlocks.OIL_DEPOSIT.getDefaultState(), 2);
|
||||
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
"create.goggles.item_storage": "Item Storage:",
|
||||
"create.goggles.item_storage_empty": "*Empty*",
|
||||
|
||||
"create.goggles.surface_scanner.no_deposit": "No Deposit Found",
|
||||
"create.goggles.surface_scanner.deposit_found": "Deposit Located!",
|
||||
"create.goggles.surface_scanner.distance": "Distance: %1$s Blocks",
|
||||
"create.goggles.surface_scanner.scanning_surface": "Scanning The Surface",
|
||||
"create.goggles.surface_scanner.header": "Surface Scanner",
|
||||
"create.goggles.surface_scanner.no_deposit": "No Deposits Found",
|
||||
"create.goggles.surface_scanner.no_rotation": "Not Enough Rotation (Needs 64rpm)",
|
||||
"create.goggles.surface_scanner.deposits_found": " Chunks With Oil Deposits Found",
|
||||
|
||||
"create.goggles.distillation_tower.status": "Distillation Tower Info:",
|
||||
"create.goggles.distillation_tower.tank_not_found": "Steel Fluid Tank Not Found",
|
||||
@@ -28,8 +28,8 @@
|
||||
"create.goggles.blast_furnace.batch_warning": "Warning: Large batch size.",
|
||||
|
||||
"create.goggles.blast_stove.header": "Blast Stove: ",
|
||||
"create.goggles.blast_stove.tank1": "Input Tank 1: ",
|
||||
"create.goggles.blast_stove.tank2": "Input Tank 2: ",
|
||||
"create.goggles.blast_stove.tank1": "Input Tank: ",
|
||||
"create.goggles.blast_stove.tank2": "Fuel Tank: ",
|
||||
"create.goggles.blast_stove.tank3": "Output Tank 1: ",
|
||||
"create.goggles.blast_stove.tank4": "Output Tank 2: ",
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"FluidTankBlockEntityMixin",
|
||||
"GoggleOverlayRendererMixin",
|
||||
"PipeAttachmentModelMixin",
|
||||
"UtilMixin",
|
||||
"accessor.FluidTankBlockEntityAccessor",
|
||||
"accessor.TankSegmentAccessor"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user