Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
fixed some recipes and the oil drilling rig structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Aug 2, 2023
1 parent a97ae21 commit 06f25b1
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class GregTechTags {
public static TagKey<Item> CIRCUITS_EXTREME = getTag("circuits/extreme");
public static TagKey<Item> CIRCUITS_ELITE = getTag("circuits/elite");
public static TagKey<Item> CIRCUITS_MASTER = getTag("circuits/master");
public static TagKey<Item> CIRCUITS_DATA_ORB = getTag("circuits/data_orb");
public static TagKey<Item> DUST_LAPIS_LAZURITE = getTag("dusts/lapislazurite");

public static TagKey<Item> getTag(String id){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public static void init() {

OIL_DRILLING_RIG.setStructure(TileEntityOilDrillingRig.class, b -> b.part("main")
.of(" ", " F ", " ").of(0).of(0).of(" F ", "FCF", " F ").of(3).of(3).of("H~H", "HCH", "HHH").build()
.at('F', FRAME.get().get(Steel)).at('C', GregTechData.CASING_SOLID_STEEL)
.at('F', FRAME.get().get(Steel).asBlock()).at('C', GregTechData.CASING_SOLID_STEEL)
.at('H', GregTechData.CASING_SOLID_STEEL, HATCH_ENERGY, HATCH_FLUID_O)
.offset(1, 6, 0).min(1, HATCH_FLUID_O, HATCH_ENERGY).build());

Expand Down
4 changes: 2 additions & 2 deletions common/src/main/java/muramasa/gregtech/data/TierMaps.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ public static void providerInit() {
builder.put(Tier.HV, GregTechTags.CIRCUITS_ADVANCED);
builder.put(Tier.EV, GregTechTags.CIRCUITS_ELITE);
builder.put(Tier.IV, GregTechTags.CIRCUITS_MASTER);
builder.put(Tier.LUV, GregTechTags.CIRCUITS_MASTER);
builder.put(Tier.ZPM, GregTechTags.CIRCUITS_MASTER);
builder.put(Tier.LUV, GregTechTags.CIRCUITS_DATA_ORB);
builder.put(Tier.ZPM, GregTechTags.CIRCUITS_DATA_ORB);
TIER_CIRCUITS = builder.build();
}
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ protected void processTags(String domain) {
//this.tag(GregTechTags.CIRCUITS_EXTREME).add(GregTechData.CircuitDataStorage);
this.tag(GregTechTags.CIRCUITS_ELITE).add(CircuitDataControl, NanoProcessor);
this.tag(GregTechTags.CIRCUITS_MASTER).add(CircuitEnergyFlow, QuantumProcessor);
this.tag(GregTechTags.CIRCUITS_DATA_ORB).add(DataOrb);
this.tag(GregTechTags.PLATES_IRON_ALUMINIUM).addTag(TagUtils.getForgelikeItemTag("plates/iron")).addTag(TagUtils.getForgelikeItemTag("plates/wrought_iron")).addTag(TagUtils.getForgelikeItemTag("plates/aluminium"));
this.tag(GregTechTags.DUST_LAPIS_LAZURITE).addTag(TagUtils.getForgelikeItemTag("dusts/lapis")).addTag(TagUtils.getForgelikeItemTag("dusts/lazurite"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,15 @@ public static void loadRecipes(Consumer<FinishedRecipe> output, AntimatterRecipe
.put('B', CABLE_GETTER.apply(PipeSize.SMALL, tier, true))
.put('C', circuit)
.put('H', hull).build(), "CFC", "BHB", "CFC"));


Tier tier2 = tier == LV ? tier : Tier.getTier(tier.getVoltage() * 4);
add(AMP_FABRICATOR, tier, (m, item) -> provider.addItemRecipe(output, "machines", "has_motor", provider.hasSafeItem(MotorLV), item,
ImmutableMap.<Character, Object>builder()
.put('C', TIER_CIRCUITS.get(tier2))
.put('W', CABLE_GETTER.apply(PipeSize.SMALL, tier, true))
.put('H', hull)
.put('P', pump).build(), "WPW", "PHP", "CPC"));
add(REPLICATOR, tier, (m,item) -> provider.addItemRecipe(output, "machines", "has_motor", provider.hasSafeItem(MotorLV), item,
ImmutableMap.<Character, Object>builder()
.put('F', field)
Expand Down Expand Up @@ -599,21 +608,21 @@ private static void addMultiblockRecipes(Consumer<FinishedRecipe> output, Antima
.build(), "PCP", "MHM", "GLG"));
add(CRACKING_UNIT, HV, (m,item) -> provider.addItemRecipe(output, "machines", "has_motor", provider.hasSafeItem(MotorHV), item,
ImmutableMap.<Character, Object>builder()
.put('P', COVER_PUMP.getItem(HV))
.put('P', COVER_PUMP.getItem(HV).getItem())
.put('O', COIL_CUPRONICKEL)
.put('H', HULL_HV)
.put('C', TIER_CIRCUITS.get(HV))
.build(), "OPO", "CHC", "OPO"));
add(DISTLLATION_TOWER, HV, (m,item) -> provider.addItemRecipe(output, "machines", "has_motor", provider.hasSafeItem(MotorHV), item,
ImmutableMap.<Character, Object>builder()
.put('P', COVER_PUMP.getItem(HV))
.put('P', COVER_PUMP.getItem(HV).getItem())
.put('I', FLUID_PIPE_STAINLESS_STEEL.getBlock(PipeSize.LARGE))
.put('H', HULL_HV)
.put('C', TIER_CIRCUITS.get(HV))
.build(), "CIC", "PHP", "CIC"));
add(HEAT_EXCHANGER, EV, (m,item) -> provider.addItemRecipe(output, "machines", "has_motor", provider.hasSafeItem(MotorEV), item,
ImmutableMap.<Character, Object>builder()
.put('P', COVER_PUMP.getItem(EV))
.put('P', COVER_PUMP.getItem(EV).getItem())
.put('I', FLUID_PIPE_TITANIUM.getBlock(PipeSize.NORMAL))
.put('H', CASING_PIPE_TITANIUM)
.build(), "PIP", "IHI", "PIP"));
Expand All @@ -635,7 +644,7 @@ private static void addMultiblockRecipes(Consumer<FinishedRecipe> output, Antima
.build(), "LCL", "CHC", "LCL"));
});

Arrays.stream(new Tier[]{HV, EV, IV, UV}).forEach(tier -> {
Arrays.stream(new Tier[]{HV, EV, IV}).forEach(tier -> {
Material gear = tier == HV ? Steel : tier == EV ? StainlessSteel : tier == IV ? Titanium : TungstenSteel;
Tier pipe = tier == UV ? IV : Tier.getTier(tier.getVoltage() / 4);
add(LARGE_TURBINE, tier, (m, item) -> {
Expand Down Expand Up @@ -682,7 +691,7 @@ private static void addMultiblockRecipes(Consumer<FinishedRecipe> output, Antima
.put('L', CABLE_GETTER.apply(PipeSize.VTINY, HV, true))
.put('F', CASING_FROST_PROOF)
.put('C', TIER_CIRCUITS.get(HV))
.put('P', COVER_PUMP.getItem(HV))
.put('P', COVER_PUMP.getItem(HV).getItem())
.build(), "PPP", "CFC", "LCL"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void serverTick(Level level, BlockPos pos, BlockState state) {

public boolean destroyBlock(Level level, BlockPos pos, boolean dropBlock, @Nullable Entity entity, ItemStack item) {
BlockState blockstate = level.getBlockState(pos);
if (blockstate.isAir()) {
if (blockstate.isAir() || blockstate.getDestroySpeed(level, pos) < 0) {
return false;
} else {
FluidState fluidstate = level.getFluidState(pos);
Expand All @@ -72,9 +72,7 @@ public boolean destroyBlock(Level level, BlockPos pos, boolean dropBlock, @Nulla
}*/
if (dropBlock) {
if (level instanceof ServerLevel) {
blockstate.getBlock().getDrops(blockstate, (ServerLevel)level, pos, blockentity, entity, item).forEach((itemStack) -> {
itemHandler.ifPresent(i -> i.addOutputs(itemStack));
});
Block.dropResources(blockstate, level, pos);
}
}

Expand Down

0 comments on commit 06f25b1

Please sign in to comment.