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

Commit

Permalink
Merge pull request #108 from refinedmods/develop
Browse files Browse the repository at this point in the history
v0.6.1
  • Loading branch information
raoulvdberge authored Jan 30, 2022
2 parents 0e66f12 + e0adf37 commit 33a47fa
Show file tree
Hide file tree
Showing 15 changed files with 128 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patreon: raoulvdberge
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Added

- Added German translation by [@Wizqok](https://github.com/Wizqok).
- Added Korean translation by [@mindy15963](https://github.com/mindy15963).

### Fixed

- Fixed random client crashes by [@malte0811](https://github.com/malte0811).
- Fixed crash when Extractor Attachment is interacting with inventories that have no slots.

## [0.6.0] - 2021-12-18

### Added

- Ported to Minecraft 1.18.1.

## [0.5.1] - 2021-11-28
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'maven-publish'

group = 'com.refinedmods'
archivesBaseName = 'refinedpipes'
version = '0.6.0'
version = '0.6.1'

if (System.getenv('GITHUB_SHA') != null) {
version += '+' + System.getenv('GITHUB_SHA').substring(0, 7)
Expand Down Expand Up @@ -86,7 +86,7 @@ processResources {
}

dependencies {
minecraft 'net.minecraftforge:forge:1.18.1-39.0.0'
minecraft 'net.minecraftforge:forge:1.18.1-39.0.59'
runtimeOnly fg.deobf("mezz.jei:jei-1.18.1:9.1.0.41")
}

Expand Down
Binary file removed images/energy_pipes.png
Binary file not shown.
Binary file removed images/fluid_pipes.png
Binary file not shown.
Binary file modified images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/item_pipes.png
Binary file not shown.
5 changes: 2 additions & 3 deletions src/main/java/com/refinedmods/refinedpipes/RefinedPipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@
@Mod(RefinedPipes.ID)
public class RefinedPipes {
public static final String ID = "refinedpipes";
public static final CreativeModeTab MAIN_GROUP = new MainCreativeModeTab();
public static final CreativeModeTab CREATIVE_MODE_TAB = new MainCreativeModeTab();
public static final RefinedPipesNetwork NETWORK = new RefinedPipesNetwork();
public static final ServerConfig SERVER_CONFIG = new ServerConfig();

public RefinedPipes() {
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> {
FMLJavaModLoadingContext.get().getModEventBus().addListener(ClientSetup::onClientSetup);
FMLJavaModLoadingContext.get().getModEventBus().addListener(ClientSetup::onModelBake);
FMLJavaModLoadingContext.get().getModEventBus().register(ClientSetup.class);
});

ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, SERVER_CONFIG.getSpec());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class AttachmentItem extends Item {
private final AttachmentFactory type;

public AttachmentItem(AttachmentFactory type) {
super(new Item.Properties().tab(RefinedPipes.MAIN_GROUP));
super(new Item.Properties().tab(RefinedPipes.CREATIVE_MODE_TAB));

this.type = type;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public class BaseBlockItem extends BlockItem {
public BaseBlockItem(Block block) {
super(block, new Item.Properties().tab(RefinedPipes.MAIN_GROUP));
super(block, new Item.Properties().tab(RefinedPipes.CREATIVE_MODE_TAB));

this.setRegistryName(block.getRegistryName());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ public NetworkGraph(Network network) {
this.network = network;
}

public NetworkGraphScannerResult scan(Level originWorld, BlockPos originPos) {
public NetworkGraphScannerResult scan(Level originLevel, BlockPos originPos) {
NetworkGraphScanner scanner = new NetworkGraphScanner(pipes, network.getType());

NetworkGraphScannerResult result = scanner.scanAt(originWorld, originPos);
NetworkGraphScannerResult result = scanner.scanAt(originLevel, originPos);

this.pipes = result.getFoundPipes();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ private void update(ItemNetwork network, BlockPos sourcePos, IItemHandler source
}

private Pair<Destination, Integer> findDestinationAndSourceSlot(BlockPos sourcePos, IItemHandler source) {
if (source.getSlots() <= 0) {
return null;
}

int startIndex = 0;

do {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.client.event.ModelBakeEvent;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.client.model.ForgeModelBakery;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
Expand All @@ -38,7 +39,7 @@ private ClientSetup() {
}

@SubscribeEvent
public static void onClientSetup(FMLClientSetupEvent e) {
public static void registerSpecialModels(ModelRegistryEvent ev) {
for (AttachmentFactory factory : AttachmentRegistry.INSTANCE.all()) {
LOGGER.debug("Registering attachment model {}", factory.getModelLocation());

Expand Down Expand Up @@ -70,7 +71,10 @@ public static void onClientSetup(FMLClientSetupEvent e) {
}

ForgeModelBakery.addSpecialModel(new ResourceLocation(RefinedPipes.ID + ":block/pipe/attachment/inventory_attachment"));
}

@SubscribeEvent
public static void onClientSetup(FMLClientSetupEvent e) {
MenuScreens.register(RefinedPipesContainerMenus.EXTRACTOR_ATTACHMENT, ExtractorAttachmentScreen::new);

ItemBlockRenderTypes.setRenderLayer(RefinedPipesBlocks.BASIC_ITEM_PIPE, RenderType.cutout());
Expand Down
49 changes: 49 additions & 0 deletions src/main/resources/assets/refinedpipes/lang/de_de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"itemGroup.refinedpipes": "Refined Pipes",
"block.refinedpipes.basic_item_pipe": "Einfaches Item Rohr",
"block.refinedpipes.improved_item_pipe": "Verbessertes Item Rohr",
"block.refinedpipes.advanced_item_pipe": "Fortgeschrittenes Item Rohr",
"block.refinedpipes.basic_fluid_pipe": "Einfaches Flüssigkeits Rohr",
"block.refinedpipes.improved_fluid_pipe": "Verbessertes Flüssigkeits Rohr",
"block.refinedpipes.advanced_fluid_pipe": "Fortgeschrittenes Flüssigkeits Rohr",
"block.refinedpipes.elite_fluid_pipe": "Elite Flüssigkeits Rohr",
"block.refinedpipes.ultimate_fluid_pipe": "Ultimatives Flüssigkeits Rohr",
"block.refinedpipes.basic_energy_pipe": "Einfaches Energie Rohr",
"block.refinedpipes.improved_energy_pipe": "Verbessertes Energie Rohr",
"block.refinedpipes.advanced_energy_pipe": "Fortgeschrittenes Energie Rohr",
"block.refinedpipes.elite_energy_pipe": "Elite Energie Rohr",
"block.refinedpipes.ultimate_energy_pipe": "Ultimatives Energie Rohr",
"item.refinedpipes.basic_extractor_attachment": "Einfacher Extraktor Aufsatz",
"item.refinedpipes.improved_extractor_attachment": "Verbesserter Extraktor Aufsatz",
"item.refinedpipes.advanced_extractor_attachment": "Fortgeschrittener Extraktor Aufsatz",
"item.refinedpipes.elite_extractor_attachment": "Elite Extraktor Aufsatz",
"item.refinedpipes.ultimate_extractor_attachment": "Ultimativer Extraktor Aufsatz",
"misc.refinedpipes.tier": "Stufe %s",
"tooltip.refinedpipes.fluid_pipe.capacity": "Kapazität: %s",
"tooltip.refinedpipes.item_pipe.speed": "Tempo: %s",
"tooltip.refinedpipes.fluid_pipe.transfer_rate": "Transferrate: %s",
"tooltip.refinedpipes.energy_pipe.capacity": "Kapazität: %s",
"tooltip.refinedpipes.energy_pipe.transfer_rate": "Transferrate: %s",
"tooltip.refinedpipes.extractor_attachment.item_extraction_rate": "Extrahiert %s jede %s",
"tooltip.refinedpipes.extractor_attachment.fluid_extraction_rate": "Extrahiert %s jede %s",
"tooltip.refinedpipes.extractor_attachment.filter_slots": "%d Filterplätze",
"misc.refinedpipes.second": "Sekunde",
"misc.refinedpipes.seconds": "Sekunden",
"misc.refinedpipes.item": "Item",
"misc.refinedpipes.items": "Items",
"misc.refinedpipes.redstone_mode": "Redstone-Modus",
"misc.refinedpipes.redstone_mode.ignored": "Ignoriert",
"misc.refinedpipes.redstone_mode.high": "Hoch",
"misc.refinedpipes.redstone_mode.low": "Tief",
"misc.refinedpipes.mode": "Filter-Modus",
"misc.refinedpipes.mode.blacklist": "Blacklist",
"misc.refinedpipes.mode.whitelist": "Whitelist",
"misc.refinedpipes.routing_mode": "Routing-Modus",
"misc.refinedpipes.routing_mode.nearest": "Näheste erstes",
"misc.refinedpipes.routing_mode.furthest": "Weiteste erstes",
"misc.refinedpipes.routing_mode.random": "Zufällig",
"misc.refinedpipes.routing_mode.round_robin": "Round-robin",
"misc.refinedpipes.exact_mode": "Exakter-Modus",
"misc.refinedpipes.exact_mode.on": "An",
"misc.refinedpipes.exact_mode.off": "Aus"
}
49 changes: 49 additions & 0 deletions src/main/resources/assets/refinedpipes/lang/ko_kr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"itemGroup.refinedpipes": "리파인드 파이프즈",
"block.refinedpipes.basic_item_pipe": "기본 아이템 파이프",
"block.refinedpipes.improved_item_pipe": "강화 아이템 파이프",
"block.refinedpipes.advanced_item_pipe": "고급 아이템 파이프",
"block.refinedpipes.basic_fluid_pipe": "기본 액체 파이프",
"block.refinedpipes.improved_fluid_pipe": "강화 액체 파이프",
"block.refinedpipes.advanced_fluid_pipe": "고급 액체 파이프",
"block.refinedpipes.elite_fluid_pipe": "특급 액체 파이프",
"block.refinedpipes.ultimate_fluid_pipe": "초특급 액체 파이프",
"block.refinedpipes.basic_energy_pipe": "기본 에너지 파이프",
"block.refinedpipes.improved_energy_pipe": "강화 에너지 파이프",
"block.refinedpipes.advanced_energy_pipe": "고급 에너지 파이프",
"block.refinedpipes.elite_energy_pipe": "특급 에너지 파이프",
"block.refinedpipes.ultimate_energy_pipe": "초특급 에너지 파이프",
"item.refinedpipes.basic_extractor_attachment": "기본 추출기 부가 기구",
"item.refinedpipes.improved_extractor_attachment": "강화 추출기 부가 기구",
"item.refinedpipes.advanced_extractor_attachment": "고급 추출기 부가 기구",
"item.refinedpipes.elite_extractor_attachment": "특급 추출기 부가 기구",
"item.refinedpipes.ultimate_extractor_attachment": "초특급 추출기 부가 기구",
"misc.refinedpipes.tier": "%s 단계",
"tooltip.refinedpipes.fluid_pipe.capacity": "용량: %s",
"tooltip.refinedpipes.item_pipe.speed": "속도: %s",
"tooltip.refinedpipes.fluid_pipe.transfer_rate": "전송률: %s",
"tooltip.refinedpipes.energy_pipe.capacity": "용량: %s",
"tooltip.refinedpipes.energy_pipe.transfer_rate": "전송률: %s",
"tooltip.refinedpipes.extractor_attachment.item_extraction_rate": "%s마다 %s 추출",
"tooltip.refinedpipes.extractor_attachment.fluid_extraction_rate": "%s마다 %s 추출",
"tooltip.refinedpipes.extractor_attachment.filter_slots": "%d개의 필터 슬롯",
"misc.refinedpipes.second": "",
"misc.refinedpipes.seconds": "",
"misc.refinedpipes.item": "아이템",
"misc.refinedpipes.items": "아이템",
"misc.refinedpipes.redstone_mode": "레드스톤 모드",
"misc.refinedpipes.redstone_mode.ignored": "무시됨",
"misc.refinedpipes.redstone_mode.high": "높음",
"misc.refinedpipes.redstone_mode.low": "낮음",
"misc.refinedpipes.mode": "필터 모드",
"misc.refinedpipes.mode.blacklist": "블랙리스트",
"misc.refinedpipes.mode.whitelist": "화이트리스트",
"misc.refinedpipes.routing_mode": "라우팅 모드",
"misc.refinedpipes.routing_mode.nearest": "선입선출",
"misc.refinedpipes.routing_mode.furthest": "후입선출",
"misc.refinedpipes.routing_mode.random": "랜덤",
"misc.refinedpipes.routing_mode.round_robin": "라운드 로빈",
"misc.refinedpipes.exact_mode": "추출 모드",
"misc.refinedpipes.exact_mode.on": "켜짐",
"misc.refinedpipes.exact_mode.off": "꺼짐"
}

0 comments on commit 33a47fa

Please sign in to comment.