From 1866ed4f10173ae4b1350d8aa1bc94cf34935e31 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 17 Dec 2021 12:10:28 +0100 Subject: [PATCH 01/10] Bump to v1.10.0-beta.4 --- CHANGELOG.md | 2 ++ build.gradle | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddb1f97439..632b66e482 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [v1.10.0-beta.3] - 2021-12-17 + ### Fixed - Fixed networks and network devices being removed when a chunk unloads. diff --git a/build.gradle b/build.gradle index 6c540f7409..a0ef3e0baf 100755 --- a/build.gradle +++ b/build.gradle @@ -33,7 +33,7 @@ apply plugin: 'maven-publish' group = 'com.refinedmods' archivesBaseName = 'refinedstorage' -version = '1.10.0-beta.3' +version = '1.10.0-beta.4' if (System.getenv('GITHUB_SHA') != null) { version += '+' + System.getenv('GITHUB_SHA').substring(0, 7) From 2f65c26e80f352e6c6d6714ff8300bfd8d56447d Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 18 Dec 2021 14:31:33 +0100 Subject: [PATCH 02/10] Add TODO --- .../refinedmods/refinedstorage/blockentity/BaseBlockEntity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/BaseBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/BaseBlockEntity.java index 3752ad65b0..e1af23cf39 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/BaseBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/BaseBlockEntity.java @@ -53,6 +53,7 @@ public void handleUpdateTag(CompoundTag tag) { @Override public void setRemoved() { super.setRemoved(); + // TODO: remove when https://github.com/MinecraftForge/MinecraftForge/pull/8303/files is merged // @Volatile: MC calls setRemoved when a chunk unloads now as well (see ServerLevel#unload -> LevelChunk#clearAllBlockEntities). // Since we don't want to remove network node data in that case, we need to know if it was removed due to unloading. // We can use "unloaded" for that, it's set in #onChunkUnloaded. From 5ec745f17dd8fd2d8ed1a5c636d889b6a125cc27 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 18 Dec 2021 16:47:48 +0100 Subject: [PATCH 03/10] Add FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..bc4961c0ff --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +patreon: raoulvdberge \ No newline at end of file From f3059c819d69a7ef0f9ab185e7f267d57b8dd0f2 Mon Sep 17 00:00:00 2001 From: "E. Kim" Date: Mon, 27 Dec 2021 20:48:57 +0900 Subject: [PATCH 04/10] Update ko_kr.json --- .../assets/refinedstorage/lang/ko_kr.json | 245 ++++++++++++++---- 1 file changed, 194 insertions(+), 51 deletions(-) diff --git a/src/main/resources/assets/refinedstorage/lang/ko_kr.json b/src/main/resources/assets/refinedstorage/lang/ko_kr.json index fa3901bc39..0b09cadb33 100644 --- a/src/main/resources/assets/refinedstorage/lang/ko_kr.json +++ b/src/main/resources/assets/refinedstorage/lang/ko_kr.json @@ -1,33 +1,54 @@ { - "itemGroup.refinedstorage": "Refined Storage", + "itemGroup.refinedstorage": "리파인드 스토리지", + "itemGroup.refinedstorage.covers": "리파인드 스토리지 커버즈", "key.refinedstorage.focusSearchBar": "그리드 검색", + "key.refinedstorage.clearGridCraftingMatrix": "그리드 제작 매트릭스 지우기", + "key.refinedstorage.openWirelessGrid": "무선 그리드 열기", + "key.refinedstorage.openWirelessFluidGrid": "무선 액체 그리드 열기", + "key.refinedstorage.openPortableGrid": "휴대용 그리드 열기", + "key.refinedstorage.openWirelessCraftingMonitor": "무선 제작 모니터 열기", - "gui.refinedstorage.controller": "컨트롤러", - "gui.refinedstorage.creative_controller": "크리에이티브 컨트롤러", + "gui.refinedstorage.controller": "콘트롤러", + "gui.refinedstorage.creative_controller": "크리에이티브 콘트롤러", "gui.refinedstorage.grid": "그리드", "gui.refinedstorage.grid.craft": "제작", + "gui.refinedstorage.crafting_grid": "제작 그리드", + "gui.refinedstorage.pattern_grid": "패턴 그리드", "gui.refinedstorage.grid.pattern_create": "패턴 제작", - "gui.refinedstorage.wireless_grid": "무선 그리드", "gui.refinedstorage.fluid_grid": "액체 그리드", "gui.refinedstorage.portable_grid": "휴대용 그리드", + "gui.refinedstorage.item_amount": "아이템 양", + "gui.refinedstorage.fluid_amount": "액량(mB)", "gui.refinedstorage.disk_drive": "디스크 드라이브", "gui.refinedstorage.disk_drive.disks": "디스크", - "gui.refinedstorage.external_storage": "외부 저장 포트", - "gui.refinedstorage.importer": "입력 포트", - "gui.refinedstorage.exporter": "출력 포트", + "gui.refinedstorage.disk_manipulator": "디스크 조작기", + "gui.refinedstorage.disk_manipulator.in": "입력", + "gui.refinedstorage.disk_manipulator.out": "출력", + "gui.refinedstorage.external_storage": "외부 저장공간", + "gui.refinedstorage.importer": "입력기", + "gui.refinedstorage.exporter": "출력기", "gui.refinedstorage.detector": "감지기", "gui.refinedstorage.destructor": "파괴기", "gui.refinedstorage.constructor": "설치기", "gui.refinedstorage.relay": "중계기", "gui.refinedstorage.interface.import": "인터페이스 입력", "gui.refinedstorage.interface.export": "인터페이스 출력", - "gui.refinedstorage.crafting_monitor": "조합 모니터", - "gui.refinedstorage.wireless_crafting_monitor": "무선 조합 모니터", - "gui.refinedstorage.crafting_monitor.machine_none": "기계를 찾을 수 없음", + "gui.refinedstorage.crafting_monitor": "제작 모니터", + "gui.refinedstorage.wireless_crafting_monitor": "무선 제작 모니터", + "gui.refinedstorage.crafting_monitor.tooltip.requested": "%d 요청됨", + "gui.refinedstorage.crafting_monitor.stored": "저장: %d", + "gui.refinedstorage.crafting_monitor.missing": "부족: %d", + "gui.refinedstorage.crafting_monitor.processing": "처리: %d", + "gui.refinedstorage.crafting_monitor.scheduled": "예정: %d", + "gui.refinedstorage.crafting_monitor.crafting": "제작: %d", + "gui.refinedstorage.crafting_monitor.machine_does_not_accept_item": "기계가 아이템을 허용하지 않습니다.", + "gui.refinedstorage.crafting_monitor.machine_does_not_accept_fluid": "기계가 액체를 허용하지 않습니다.", + "gui.refinedstorage.crafting_monitor.machine_none": "기계를 찾을 수 없습니다.", + "gui.refinedstorage.crafting_monitor.crafter_is_locked": "제작기가 잠겼습니다.", "gui.refinedstorage.wireless_transmitter": "무선 송신기", "gui.refinedstorage.wireless_transmitter.distance": "%d블럭", - "gui.refinedstorage.crafter": "조합기", + "gui.refinedstorage.crafter": "제작기", "gui.refinedstorage.filter": "필터", "gui.refinedstorage.filter.compare_nbt": "NBT", "gui.refinedstorage.filter.mod_filter": "모드 필터", @@ -41,16 +62,22 @@ "gui.refinedstorage.crafting_preview.to_craft": "제작할 아이템: %d", "gui.refinedstorage.crafting_preview.available": "사용 가능: %d", "gui.refinedstorage.crafting_preview.missing": "부족: %d", - "gui.refinedstorage.crafting_preview.circular": "제작할 아이템이 서로를 필요로 합니다!", - "gui.refinedstorage.crafting_preview.loop": "처리 중..", + "gui.refinedstorage.crafting_preview.error": "요청에 실패했습니다.", + "gui.refinedstorage.crafting_preview.error.recursive.0": "제작 재료 중 하나는 결국 ", + "gui.refinedstorage.crafting_preview.error.recursive.1": "스스로가 필요하게 되었습니다.", + "gui.refinedstorage.crafting_preview.error.recursive.2": "패턴을 제거하거나 제작 시 ", + "gui.refinedstorage.crafting_preview.error.recursive.3": "패턴이 사용되지 않도록 해야 합니다.", + "gui.refinedstorage.crafting_preview.error.recursive.4": "불쾌감을 주는 패턴:", + "gui.refinedstorage.crafting_preview.error.too_complex.0": "제작 작업 계산이 너무 복잡하여 ", + "gui.refinedstorage.crafting_preview.error.too_complex.1": "서버 부담을 피하기 위해 중지되었습니다.", "gui.refinedstorage.security_manager": "보안 관리자", "gui.refinedstorage.security_manager.configure": "설정", - "gui.refinedstorage.security_manager.permission.0": "보관하기", - "gui.refinedstorage.security_manager.permission.0.tooltip": "네트워크에 아이템 넣기", - "gui.refinedstorage.security_manager.permission.1": "꺼내기", - "gui.refinedstorage.security_manager.permission.1.tooltip": "네트워크에서 아이템 가져오기", - "gui.refinedstorage.security_manager.permission.2": "자동 조합하기", - "gui.refinedstorage.security_manager.permission.2.tooltip": "자동 조합 시작, 중지 및 현재 작업 보기", + "gui.refinedstorage.security_manager.permission.0": "삽입", + "gui.refinedstorage.security_manager.permission.0.tooltip": "네트워크에 아이템이나 액체를 삽입하기", + "gui.refinedstorage.security_manager.permission.1": "추출", + "gui.refinedstorage.security_manager.permission.1.tooltip": "네트워크에서 아이템이나 액체를 추출하기", + "gui.refinedstorage.security_manager.permission.2": "자동 제작하기", + "gui.refinedstorage.security_manager.permission.2.tooltip": "자동 제작 시작, 중지 및 현재 작업 보기", "gui.refinedstorage.security_manager.permission.3": "수정", "gui.refinedstorage.security_manager.permission.3.tooltip": "네트워크 상의 GUI 열기", "gui.refinedstorage.security_manager.permission.4": "조작", @@ -58,39 +85,77 @@ "gui.refinedstorage.security_manager.permission.5": "보안", "gui.refinedstorage.security_manager.permission.5.tooltip": "보안 옵션 조정하기", "gui.refinedstorage.storage_monitor": "저장 모니터", - + "gui.refinedstorage.crafter_manager": "제작기 관리자", + "gui.refinedstorage.alternatives": "대체", + "gui.refinedstorage.alternatives.apply": "적용", + "gui.refinedstorage.jei.transfer.autocrafting_available": "자동 제작 사용 가능", + "gui.refinedstorage.jei.transfer.request_autocrafting": "CTRL + 클릭하여 자동 제작 요청", "misc.refinedstorage.energy_stored": "%d / %d FE", "misc.refinedstorage.energy_usage": "사용: %d FE/t", "misc.refinedstorage.energy_usage_minimal": "%d FE/t", - "misc.refinedstorage.storage.stored": "저장량: %s", "misc.refinedstorage.storage.stored_capacity": "저쟝량: %s / %s", "misc.refinedstorage.storage.stored_minimal": "%s", "misc.refinedstorage.storage.stored_capacity_minimal": "%s / %s", "misc.refinedstorage.storage.full": "%d%% 가득 참", - "misc.refinedstorage.network_item.tooltip": "%d, %d, %d로 연결됨", "misc.refinedstorage.network_item.out_of_range": "근방에 무선 송신기가 없습니다.", - "misc.refinedstorage.network_item.not_found": "컨트롤러를 찾을 수 없습니다.", + "misc.refinedstorage.network_item.not_found": "콘트롤러를 찾을 수 없습니다.", + "misc.refinedstorage.network_item.shortcut_not_found": "인벤토리에 %s이(가) 없습니다.", + "misc.refinedstorage.network_item.shortcut_duplicate": "인벤토리에 두 개 이상의 %s이(가) 있습니다.", + "misc.refinedstorage.network_item.out_of_energy": "%s의 에너지가 부족합니다.", "misc.refinedstorage.network_card.tooltip": "%d, %d, %d로 연결됨", "misc.refinedstorage.pattern.inputs": "입력", "misc.refinedstorage.pattern.outputs": "출력", "misc.refinedstorage.pattern.invalid": "잘못된 패턴", + "misc.refinedstorage.pattern.exact": "정확한 모드 사용", + "misc.refinedstorage.pattern.allowed_item_tag": "%s에 대해 %s의 아이템을 사용합니다.", + "misc.refinedstorage.pattern.allowed_fluid_tag": "%s에 대해 %s의 액체를 사용합니다.", + "misc.refinedstorage.pattern.error.processing_no_outputs": "처리 패턴에 출력이 없습니다.", + "misc.refinedstorage.pattern.error.no_output": "제작법에 출력이 없습니다.", + "misc.refinedstorage.pattern.error.recipe_does_not_exist": "제작법이 존재하지 않습니다.", + "misc.refinedstorage.pattern.error.tag_no_longer_applicable": "%s 태그를 %s에 더 이상 적용할 수 없습니다.", "misc.refinedstorage.security.no_permission": "해당 작업을 실행할 권한이 없습니다.", - "misc.refinedstorage.start": "시작", "misc.refinedstorage.clear": "초기화", "misc.refinedstorage.set": "설정", "misc.refinedstorage.cancel_all": "모두 취소", "misc.refinedstorage.priority": "우선 순위", + "misc.refinedstorage.exact": "정확성", + "misc.refinedstorage.processing": "처리", + "misc.refinedstorage.fluidmode": "액체", + "misc.refinedstorage.total": "%s 합계", + "misc.refinedstorage.last_modified.just_now": "%s에 의해 방금 전에 최종 수정됨", + "misc.refinedstorage.last_modified.second": "%s에 의해 %d초 전에 마지막으로 수정됨", + "misc.refinedstorage.last_modified.seconds": "%s에 의해 %d초 전에 마지막으로 수정됨", + "misc.refinedstorage.last_modified.minute": "%s에 의해 %d분 전에 마지막으로 수정됨", + "misc.refinedstorage.last_modified.minutes": "%s에 의해 %d분 전에 마지막으로 수정됨", + "misc.refinedstorage.last_modified.hour": "%s에 의해 %d시간 전에 마지막으로 수정됨", + "misc.refinedstorage.last_modified.hours": "%s에 의해 %d시간 전에 마지막으로 수정됨", + "misc.refinedstorage.last_modified.day": "%s에 의해 %d일 전에 마지막으로 수정됨", + "misc.refinedstorage.last_modified.days": "%s에 의해 %d일 전에 마지막으로 수정됨", + "misc.refinedstorage.last_modified.week": "%s에 의해 %d주 전에 마지막으로 수정됨", + "misc.refinedstorage.last_modified.weeks": "%s에 의해 %d주 전에 마지막으로 수정됨", + "misc.refinedstorage.last_modified.year": "%s에 의해 %d년 전에 마지막으로 수정됨", + "misc.refinedstorage.last_modified.years": "%s에 의해 %d년 전에 마지막으로 수정됨", + + "sidebutton.refinedstorage.exact_mode": "정확한 모드", + "sidebutton.refinedstorage.exact_mode.on": "켜짐", + "sidebutton.refinedstorage.exact_mode.off": "꺼짐", "sidebutton.refinedstorage.redstone_mode": "레드스톤 모드", "sidebutton.refinedstorage.redstone_mode.0": "신호와 상관 없이 작동", "sidebutton.refinedstorage.redstone_mode.1": "신호를 받을 때 작동", "sidebutton.refinedstorage.redstone_mode.2": "신호를 받지 않을 때 작동", + + "sidebutton.refinedstorage.crafter_mode": "제작기 모드", + "sidebutton.refinedstorage.crafter_mode.0": "레드스톤 신호 무시", + "sidebutton.refinedstorage.crafter_mode.1": "레드스톤 신호가 자동 제작의 잠금을 해제합니다.", + "sidebutton.refinedstorage.crafter_mode.2": "레드스톤 신호가 자동 제작을 잠급니다.", + "sidebutton.refinedstorage.crafter_mode.3": "레드스톤 펄스가 다음 세트를 삽입합니다.", "sidebutton.refinedstorage.grid.view_type": "표시", "sidebutton.refinedstorage.grid.view_type.0": "일반", @@ -103,11 +168,15 @@ "sidebutton.refinedstorage.grid.sorting.type.0": "수량", "sidebutton.refinedstorage.grid.sorting.type.1": "이름", "sidebutton.refinedstorage.grid.sorting.type.2": "ID", + "sidebutton.refinedstorage.grid.sorting.type.3": "인벤토리트윅스", + "sidebutton.refinedstorage.grid.sorting.type.4": "최근 수정", "sidebutton.refinedstorage.grid.search_box_mode": "검색 모드", "sidebutton.refinedstorage.grid.search_box_mode.0": "일반", "sidebutton.refinedstorage.grid.search_box_mode.1": "일반 (자동 선택됨)", "sidebutton.refinedstorage.grid.search_box_mode.2": "JEI 통합", "sidebutton.refinedstorage.grid.search_box_mode.3": "JEI 통합 (자동 선택됨)", + "sidebutton.refinedstorage.grid.search_box_mode.4": "JEI 통합 (양방향)", + "sidebutton.refinedstorage.grid.search_box_mode.5": "JEI 통합 (양방향 자동 선택됨)", "sidebutton.refinedstorage.grid.size": "크기", "sidebutton.refinedstorage.grid.size.0": "맞춤", "sidebutton.refinedstorage.grid.size.1": "작음", @@ -130,58 +199,53 @@ "sidebutton.refinedstorage.detector.mode.0": "수량 이하일 때 신호 출력", "sidebutton.refinedstorage.detector.mode.1": "수량과 일치할 때 신호 출력", "sidebutton.refinedstorage.detector.mode.2": "수량 이상일 때 신호 출력", - "sidebutton.refinedstorage.constructor.drop": "블럭을 설치하지 않고 떨어트림", - "sidebutton.refinedstorage.destructor.pickup": "블럭을 파괴하지 않고 주움", - "sidebutton.refinedstorage.access_type": "액세스 종류", "sidebutton.refinedstorage.access_type.0": "입출력", "sidebutton.refinedstorage.access_type.1": "입력", "sidebutton.refinedstorage.access_type.2": "출력", - - "block.refinedstorage.controller": "컨트롤러", - "block.refinedstorage.creative_controller": "크리에이티브 컨트롤러", + "block.refinedstorage.controller": "콘트롤러", + "block.refinedstorage.creative_controller": "크리에이티브 콘트롤러", "block.refinedstorage.cable": "케이블", "block.refinedstorage.grid": "그리드", - "block.refinedstorage.crafting_grid": "조합 그리드", + "block.refinedstorage.crafting_grid": "제작 그리드", "block.refinedstorage.pattern_grid": "패턴 그리드", "block.refinedstorage.fluid_grid": "액체 그리드", "block.refinedstorage.disk_drive": "디스크 드라이브", "block.refinedstorage.disk_manipulator": "디스크 조작기", - "block.refinedstorage.external_storage": "외부 저장 포트", - "block.refinedstorage.importer": "입력 포트", - "block.refinedstorage.exporter": "출력 포트", + "block.refinedstorage.external_storage": "외부 저장공간", + "block.refinedstorage.importer": "입력기", + "block.refinedstorage.exporter": "출력기", "block.refinedstorage.detector": "감지기", "block.refinedstorage.machine_casing": "기계 케이싱", "block.refinedstorage.destructor": "파괴기", "block.refinedstorage.constructor": "설치기", - "block.refinedstorage.1k_storage_block": "1k 저장 공간", - "block.refinedstorage.4k_storage_block": "4k 저장 공간", - "block.refinedstorage.16k_storage_block": "16k 저장 공간", - "block.refinedstorage.64k_storage_block": "64k 저장 공간", - "block.refinedstorage.creative_storage_block": "크리에이티브 저장 공간", + "block.refinedstorage.1k_storage_block": "1k 저장공간", + "block.refinedstorage.4k_storage_block": "4k 저장공간", + "block.refinedstorage.16k_storage_block": "16k 저장공간", + "block.refinedstorage.64k_storage_block": "64k 저장공간", + "block.refinedstorage.creative_storage_block": "크리에이티브 저장공간", "block.refinedstorage.relay": "중계기", "block.refinedstorage.interface": "인터페이스", - "block.refinedstorage.crafting_monitor": "조합 모니터", + "block.refinedstorage.crafting_monitor": "제작 모니터", "block.refinedstorage.wireless_transmitter": "무선 송신기", - "block.refinedstorage.wireless_transmitter.tooltip": "%s에 설치되어야 합니다.", - "block.refinedstorage.crafter": "조합기", + "block.refinedstorage.crafter": "제작기", "block.refinedstorage.network_receiver": "네트워크 수신기", "block.refinedstorage.network_transmitter": "네트워크 송신기", "block.refinedstorage.fluid_interface": "액체 인터페이스", - "block.refinedstorage.64k_fluid_storage_block": "64k 액체 저장 공간", - "block.refinedstorage.256k_fluid_storage_block": "256k 액체 저장 공간", - "block.refinedstorage.1024k_fluid_storage_block": "1024k 액체 저장 공간", - "block.refinedstorage.4096k_fluid_storage_block": "4096k 액체 저장 공간", - "block.refinedstorage.creative_fluid_storage_block": "크리에이티브 액체 저장 공간", + "block.refinedstorage.64k_fluid_storage_block": "64k 액체 저장공간", + "block.refinedstorage.256k_fluid_storage_block": "256k 액체 저장공간", + "block.refinedstorage.1024k_fluid_storage_block": "1024k 액체 저장공간", + "block.refinedstorage.4096k_fluid_storage_block": "4096k 액체 저장공간", + "block.refinedstorage.creative_fluid_storage_block": "크리에이티브 액체 저장공간", "block.refinedstorage.security_manager": "보안 관리자", "block.refinedstorage.quartz_enriched_iron_block": "석영 강화 철 블럭", "block.refinedstorage.storage_monitor": "저장 모니터", "block.refinedstorage.portable_grid": "휴대용 그리드", "block.refinedstorage.creative_portable_grid": "크리에이티브 휴대용 그리드", "block.refinedstorage.portable_grid.tooltip": "웅크리기로 설치할 수 있습니다.", - + "block.refinedstorage.crafter_manager": "제작기 관리자", "item.refinedstorage.1k_storage_disk": "1k 저장 디스크", "item.refinedstorage.4k_storage_disk": "4k 저장 디스크", "item.refinedstorage.16k_storage_disk": "16k 저장 디스크", @@ -202,6 +266,9 @@ "item.refinedstorage.construction_core": "형성 코어", "item.refinedstorage.destruction_core": "파괴 코어", "item.refinedstorage.silicon": "실리콘", + "item.refinedstorage.raw_basic_processor": "처리되지 않은 기본 프로세서", + "item.refinedstorage.raw_improved_processor": "처리되지 않은 강화 프로세서", + "item.refinedstorage.raw_advanced_processor": "처리되지 않은 고급 프로세서", "item.refinedstorage.basic_processor": "기본 프로세서", "item.refinedstorage.improved_processor": "강화 프로세서", "item.refinedstorage.advanced_processor": "고급 프로세서", @@ -223,10 +290,86 @@ "item.refinedstorage.fortune_1_upgrade": "행운 업그레이드", "item.refinedstorage.fortune_2_upgrade": "행운 업그레이드", "item.refinedstorage.fortune_3_upgrade": "행운 업그레이드", - "item.refinedstorage.storage_housing": "빈 저장 디스크", + "item.refinedstorage.regulator_upgrade": "조절기 업그레이드", + "item.refinedstorage.storage_housing": "저장공간 하우징", "item.refinedstorage.filter": "필터", "item.refinedstorage.network_card": "네트워크 카드", "item.refinedstorage.wrench": "렌치", "item.refinedstorage.security_card": "보안 카드", - "item.refinedstorage.security_card.owner": "플레이어: %s" -} \ No newline at end of file + "item.refinedstorage.security_card.owner": "플레이어: %s", + "item.refinedstorage.processor_binding": "프로세서 바인딩", + "item.refinedstorage.cover": "커버", + "item.refinedstorage.hollow_cover": "빈 커버", + "commands.refinedstorage.disk.create.error.disk_not_found": "%s 디스크를 찾을 수 없습니다.", + "commands.refinedstorage.disk.create.success": "%s 디스크에 %s을(를) 부여했습니다.", + "commands.refinedstorage.network.list.pos": "X: %d, Y: %d, Z: %d에서의 네트워크", + "commands.refinedstorage.network.list.tick_times": "평균 틱 시간: %s ms. 평균 TPS: %s", + "commands.refinedstorage.network.list.autocrafting_tasks": "%s 작업", + "commands.refinedstorage.network.list.nodes": "%s 노드", + "commands.refinedstorage.network.list.energy_usage": "에너지 사용: %s", + "commands.refinedstorage.network.get.error.not_found": "네트워크를 찾지 못했습니다.", + "commands.refinedstorage.network.autocrafting.get.error.not_found": "작업를 찾지 못했습니다.", + "commands.refinedstorage.network.autocrafting.cancel.single": "작업 %d개를 취소했습니다.", + "commands.refinedstorage.network.autocrafting.cancel.multiple": "작업 %d개를 취소했습니다.", + "advancements.refinedstorage.controlling.description": "콘트롤러를 제작합니다.", + "advancements.refinedstorage.connecting": "연결", + "advancements.refinedstorage.connecting.description": "모든 장치를 나란히 배치하여 연결하거나 케이블을 사용할 수 있습니다.", + "advancements.refinedstorage.conditional_connecting": "조건부 연결", + "advancements.refinedstorage.conditional_connecting.description": "네트워크 신호가 레드스톤으로 전달될 수 있는지 제어하기 위해 중계기를 제작합니다.", + "advancements.refinedstorage.drives": "드라이브", + "advancements.refinedstorage.drives.description": "디스크를 저장할 수 있도록 디스크 드라이브를 제작합니다.", + "advancements.refinedstorage.manipulating_disks": "디스크 조작", + "advancements.refinedstorage.manipulating_disks.description": "디스크 조작기를 사용하여 디스크 내용을 쉽게 수정합니다.", + "advancements.refinedstorage.storing_items": "아이템 정렬", + "advancements.refinedstorage.storing_items.description": "저장 디스크를 제작하여 디스크 드라이브에 넣습니다.", + "advancements.refinedstorage.viewing_items": "아이템 보기", + "advancements.refinedstorage.viewing_items.description": "그리드를 제작하여 아이템 저장공간과 상호 작용합니다.", + "advancements.refinedstorage.portable_storage": "휴대용 저장공간", + "advancements.refinedstorage.portable_storage.description": "휴대용 그리드를 제작하여 네트워크에 있지 않고 디스크의 아이템 및 액체에 접근할 수 있습니다.", + "advancements.refinedstorage.upgrading_your_grid": "그리드를 업그레이드하기", + "advancements.refinedstorage.upgrading_your_grid.description": "그리드를 제작 그리드로 업그레이드하여 그리드에서 제작 기능을 얻으십시오.", + "advancements.refinedstorage.storing_fluids": "액체 저장", + "advancements.refinedstorage.storing_fluids.description": "액체 저장 디스크를 제작하여 디스크 드라이브에 넣습니다.", + "advancements.refinedstorage.viewing_fluids": "액체 보기", + "advancements.refinedstorage.viewing_fluids.description": "액체 저장공간과 상호 작용하도록 액체 그리드를 제작합니다.", + "advancements.refinedstorage.better_than_a_barrel": "통보다 좋다!", + "advancements.refinedstorage.better_than_a_barrel.description": "저장 모니터를 제작하여 네트워크의 아이템을 보거나 삽입 또는 추출합니다.", + "advancements.refinedstorage.autocrafting": "자동 제작", + "advancements.refinedstorage.autocrafting.description": "제작기를 제작합니다.", + "advancements.refinedstorage.pattern_creation": "패턴 제작", + "advancements.refinedstorage.pattern_creation.description": "패턴 그리드 및 패턴을 사용하여 패턴을 작성합니다.", + "advancements.refinedstorage.monitoring": "감시", + "advancements.refinedstorage.monitoring.description": "제작 모니터로 제작 작업의 상태를 확인합니다.", + "advancements.refinedstorage.managing_patterns": "패턴 관리", + "advancements.refinedstorage.managing_patterns.description": "제작기 관리자를 제작하여 패턴을 보다 효율적으로 관리할 수 있습니다.", + "advancements.refinedstorage.importing": "입력", + "advancements.refinedstorage.importing.description": "입력기를 사용하여 아이템 또는 액체를 저장공간 네트워크로 가져옵니다.", + "advancements.refinedstorage.destruction": "파괴", + "advancements.refinedstorage.destruction.description": "파괴기를 사용하여 블록이나 액체를 저장공간 네트워크로 가져옵니다.", + "advancements.refinedstorage.exporting": "출력", + "advancements.refinedstorage.exporting.description": "출력기를 사용하여 블록이나 액체를 저장공간 네트워크로 가져옵니다.", + "advancements.refinedstorage.construction": "설치", + "advancements.refinedstorage.construction.description": "설치기를 사용하여 저장공간 네트워크에서 블록이나 액체를 얻습니다.", + "advancements.refinedstorage.security": "보안", + "advancements.refinedstorage.security.description": "보안 관리자 및 보안 카드를 사용하여 네트워크를 보호하십시오.", + "advancements.refinedstorage.wireless": "무선", + "advancements.refinedstorage.wireless.description": "무선 송신기로 네트워크 신호를 전송합니다.", + "advancements.refinedstorage.wireless_items": "무선 아이템", + "advancements.refinedstorage.wireless_items.description": "무선 그리드를 통해 아이템 저장공간과 무선으로 상호작용하십시오.", + "advancements.refinedstorage.wireless_fluids": "무선 액체", + "advancements.refinedstorage.wireless_fluids.description": "무선 액체 그리드로 액체 저장공간과 무선으로 상호작용하십시오.", + "advancements.refinedstorage.wireless_monitoring": "무선 감시", + "advancements.refinedstorage.wireless_monitoring.description": "무선 제작 모니터로 무선으로 제작 작업의 상태를 확인하십시오.", + "advancements.refinedstorage.no_cables_required": "케이블을 요구하지 않습니다.", + "advancements.refinedstorage.no_cables_required.description": "네트워크 송신기, 네트워크 수신기 및 네트워크 카드를 사용하여 케이블을 사용하지 않고도 네트워크에 추가 구성요소를 추가할 수 있습니다.", + "advancements.refinedstorage.upgrading": "업그레이드", + "advancements.refinedstorage.upgrading.description": "다양한 장치를 개선하기 위해 업그레이드를 제작합니다.", + "advancements.refinedstorage.crafting_on_demand": "주문형 제작", + "advancements.refinedstorage.crafting_on_demand.description": "인터페이스, 출력기 또는 설치기에서 제작 업그레이드를 사용하여 주문형 아이템 및 블록을 제작합니다.", + "advancements.refinedstorage.detecting": "탐지", + "advancements.refinedstorage.detecting.description": "감지기를 사용하여 네트워크의 아이템 또는 액체를 탐지합니다.", + "advancements.refinedstorage.interface_to_the_world": "월드에 대한 인터페이스", + "advancements.refinedstorage.interface_to_the_world.description": "인터페이스로 아이템을 동시에 내보내고 가져옵니다.", + "advancements.refinedstorage.storing_externally": "외부로 저장", + "advancements.refinedstorage.storing_externally.description": "외부 저장공간을 사용하여 네트워크에 상자와 같은 외부 블록의 저장공간을 제공합니다." +} From 2785b2c1492a3c26dce4efc8245aa2a41274612a Mon Sep 17 00:00:00 2001 From: Jack Steel Date: Tue, 28 Dec 2021 00:59:21 +1300 Subject: [PATCH 05/10] Return an ArrayList rather than ImmutableList for FluidGrid tooltip Fixes #3187 --- .../refinedstorage/screen/grid/stack/FluidGridStack.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/FluidGridStack.java b/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/FluidGridStack.java index c978400549..6d6c56bcb6 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/FluidGridStack.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/FluidGridStack.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage.screen.grid.stack; +import com.google.common.collect.Lists; import com.mojang.blaze3d.vertex.PoseStack; import com.refinedmods.refinedstorage.api.storage.tracker.StorageTrackerEntry; import com.refinedmods.refinedstorage.apiimpl.API; @@ -135,11 +136,10 @@ public List getTooltip(boolean bypassCache) { if (bypassCache || cachedTooltip == null) { List tooltip; try { - tooltip = Arrays.asList(stack.getDisplayName()); + tooltip = Lists.newArrayList(stack.getDisplayName()); } catch (Throwable t) { logger.warn("Could not retrieve fluid tooltip of {}", stack.getFluid().getRegistryName()); - - tooltip = Arrays.asList(new TextComponent(ERROR_PLACEHOLDER)); + tooltip = Lists.newArrayList(new TextComponent(ERROR_PLACEHOLDER)); } if (bypassCache) { From 4ef36c24a63e70f0433c3c465958b8b4b7198911 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 18 Dec 2021 22:12:43 +0100 Subject: [PATCH 06/10] Some more World -> Level renames --- .../com/refinedmods/refinedstorage/apiimpl/API.java | 4 ++-- .../apiimpl/network/NetworkListener.java | 2 +- .../apiimpl/network/NetworkManager.java | 4 ++-- .../apiimpl/network/NetworkNodeGraph.java | 2 +- .../apiimpl/network/NetworkNodeListener.java | 6 +++--- .../apiimpl/network/NetworkNodeManager.java | 4 ++-- .../item/WirelessCraftingMonitorNetworkItem.java | 4 ++-- .../network/item/WirelessFluidGridNetworkItem.java | 4 ++-- .../network/item/WirelessGridNetworkItem.java | 4 ++-- .../apiimpl/network/node/ConstructorNetworkNode.java | 6 +++--- .../apiimpl/network/node/CrafterNetworkNode.java | 6 +++--- .../apiimpl/network/node/DestructorNetworkNode.java | 10 +++++----- .../apiimpl/network/node/ExporterNetworkNode.java | 6 +++--- .../apiimpl/network/node/ImporterNetworkNode.java | 6 +++--- .../apiimpl/network/node/NetworkNode.java | 4 ++-- .../network/node/NetworkTransmitterNetworkNode.java | 6 +++--- .../network/node/StorageMonitorNetworkNode.java | 12 ++++++------ .../network/node/diskdrive/DiskDriveNetworkNode.java | 8 ++++---- .../diskmanipulator/DiskManipulatorNetworkNode.java | 6 +++--- .../StorageDiskFluidManipulatorWrapper.java | 4 ++-- .../StorageDiskItemManipulatorWrapper.java | 4 ++-- .../apiimpl/storage/disk/StorageDiskManager.java | 4 ++-- .../FluidExternalStorageProvider.java | 6 +++--- .../externalstorage/ItemExternalStorageProvider.java | 6 +++--- .../storage/tracker/StorageTrackerManager.java | 4 ++-- .../util/{RSWorldSavedData.java => RSSavedData.java} | 4 ++-- .../refinedstorage/block/StorageMonitorBlock.java | 4 ++-- .../refinedstorage/blockentity/CableBlockEntity.java | 4 ++-- .../blockentity/ConstructorBlockEntity.java | 4 ++-- .../blockentity/DestructorBlockEntity.java | 4 ++-- .../blockentity/DiskDriveBlockEntity.java | 4 ++-- .../blockentity/DiskManipulatorBlockEntity.java | 4 ++-- .../blockentity/ExporterBlockEntity.java | 4 ++-- .../blockentity/ExternalStorageBlockEntity.java | 4 ++-- .../blockentity/ImporterBlockEntity.java | 4 ++-- .../grid/portable/PortableGridBlockEntity.java | 4 ++-- .../refinedmods/refinedstorage/item/CoverItem.java | 6 +++--- .../refinedmods/refinedstorage/item/NetworkItem.java | 6 +++--- .../refinedmods/refinedstorage/item/WrenchItem.java | 4 ++-- .../util/{WorldUtils.java => LevelUtils.java} | 4 ++-- .../refinedstorage/util/NetworkUtils.java | 2 +- 41 files changed, 99 insertions(+), 99 deletions(-) rename src/main/java/com/refinedmods/refinedstorage/apiimpl/util/{RSWorldSavedData.java => RSSavedData.java} (91%) rename src/main/java/com/refinedmods/refinedstorage/util/{WorldUtils.java => LevelUtils.java} (98%) diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/API.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/API.java index 8746f8fd0a..97e8af8eb9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/API.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/API.java @@ -245,7 +245,7 @@ public Set> getExternalStorageProviders(StorageType @Nonnull public IStorageDisk createDefaultItemDisk(ServerLevel level, int capacity, @Nullable Player owner) { if (level == null) { - throw new IllegalArgumentException("World cannot be null"); + throw new IllegalArgumentException("Level cannot be null"); } return new ItemStorageDisk(level, capacity, owner == null ? null : owner.getGameProfile().getId()); @@ -255,7 +255,7 @@ public IStorageDisk createDefaultItemDisk(ServerLevel level, int capa @Nonnull public IStorageDisk createDefaultFluidDisk(ServerLevel level, int capacity, @Nullable Player owner) { if (level == null) { - throw new IllegalArgumentException("World cannot be null"); + throw new IllegalArgumentException("Level cannot be null"); } return new FluidStorageDisk(level, capacity, owner == null ? null : owner.getGameProfile().getId()); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkListener.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkListener.java index 080c2b6456..b3e2a81b52 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkListener.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkListener.java @@ -9,7 +9,7 @@ public class NetworkListener { @SubscribeEvent - public void onWorldTick(TickEvent.WorldTickEvent e) { + public void onLevelTick(TickEvent.WorldTickEvent e) { if (!e.world.isClientSide() && e.phase == TickEvent.Phase.END) { e.world.getProfiler().push("network ticking"); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkManager.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkManager.java index 3bf0757bdc..5342ec87eb 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkManager.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkManager.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage.api.network.INetwork; import com.refinedmods.refinedstorage.api.network.INetworkManager; import com.refinedmods.refinedstorage.api.network.NetworkType; -import com.refinedmods.refinedstorage.apiimpl.util.RSWorldSavedData; +import com.refinedmods.refinedstorage.apiimpl.util.RSSavedData; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.concurrent.ConcurrentHashMap; -public class NetworkManager extends RSWorldSavedData implements INetworkManager { +public class NetworkManager extends RSSavedData implements INetworkManager { public static final String NAME = "refinedstorage_networks"; private static final String NBT_NETWORKS = "Networks"; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeGraph.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeGraph.java index 4af6cfc1e1..8ac6f8338b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeGraph.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeGraph.java @@ -91,7 +91,7 @@ public void disconnectAll() { listeners.forEach(INetworkNodeGraphListener::onChanged); } - protected Level getWorld() { + protected Level getLevel() { return network.getLevel(); } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeListener.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeListener.java index 640f784239..5fb43827fc 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeListener.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeListener.java @@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage.api.util.Action; import com.refinedmods.refinedstorage.util.NetworkUtils; import com.refinedmods.refinedstorage.util.PlayerUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerPlayer; @@ -27,7 +27,7 @@ public void onBlockPlace(BlockEvent.EntityPlaceEvent e) { INetworkNode node = NetworkUtils.getNodeFromBlockEntity(e.getWorld().getBlockEntity(e.getBlockSnapshot().getPos().relative(facing))); if (node != null && node.getNetwork() != null && !node.getNetwork().getSecurityManager().hasPermission(Permission.BUILD, player)) { - WorldUtils.sendNoPermissionMessage(player); + LevelUtils.sendNoPermissionMessage(player); e.setCanceled(true); @@ -63,7 +63,7 @@ public void onBlockBreak(BlockEvent.BreakEvent e) { INetworkNode node = NetworkUtils.getNodeFromBlockEntity(e.getWorld().getBlockEntity(e.getPos())); if (node != null && node.getNetwork() != null && !node.getNetwork().getSecurityManager().hasPermission(Permission.BUILD, e.getPlayer())) { - WorldUtils.sendNoPermissionMessage(e.getPlayer()); + LevelUtils.sendNoPermissionMessage(e.getPlayer()); e.setCanceled(true); } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeManager.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeManager.java index 496210f850..745fbab312 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeManager.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeManager.java @@ -4,7 +4,7 @@ import com.refinedmods.refinedstorage.api.network.node.INetworkNodeFactory; import com.refinedmods.refinedstorage.api.network.node.INetworkNodeManager; import com.refinedmods.refinedstorage.apiimpl.API; -import com.refinedmods.refinedstorage.apiimpl.util.RSWorldSavedData; +import com.refinedmods.refinedstorage.apiimpl.util.RSSavedData; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; @@ -18,7 +18,7 @@ import java.util.Collection; import java.util.concurrent.ConcurrentHashMap; -public class NetworkNodeManager extends RSWorldSavedData implements INetworkNodeManager { +public class NetworkNodeManager extends RSSavedData implements INetworkNodeManager { public static final String NAME = "refinedstorage_nodes"; private static final String NBT_NODES = "Nodes"; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessCraftingMonitorNetworkItem.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessCraftingMonitorNetworkItem.java index f8e9c8a948..28d772011b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessCraftingMonitorNetworkItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessCraftingMonitorNetworkItem.java @@ -10,7 +10,7 @@ import com.refinedmods.refinedstorage.container.factory.CraftingMonitorMenuProvider; import com.refinedmods.refinedstorage.inventory.player.PlayerSlot; import com.refinedmods.refinedstorage.item.WirelessCraftingMonitorItem; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; @@ -52,7 +52,7 @@ public boolean onOpen(INetwork network) { if (!network.getSecurityManager().hasPermission(Permission.MODIFY, player) || !network.getSecurityManager().hasPermission(Permission.AUTOCRAFTING, player)) { - WorldUtils.sendNoPermissionMessage(player); + LevelUtils.sendNoPermissionMessage(player); return false; } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessFluidGridNetworkItem.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessFluidGridNetworkItem.java index dfae8f2cb0..c251886720 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessFluidGridNetworkItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessFluidGridNetworkItem.java @@ -9,7 +9,7 @@ import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.WirelessFluidGridGridFactory; import com.refinedmods.refinedstorage.inventory.player.PlayerSlot; import com.refinedmods.refinedstorage.item.WirelessFluidGridItem; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; @@ -49,7 +49,7 @@ public boolean onOpen(INetwork network) { } if (!network.getSecurityManager().hasPermission(Permission.MODIFY, player)) { - WorldUtils.sendNoPermissionMessage(player); + LevelUtils.sendNoPermissionMessage(player); return false; } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessGridNetworkItem.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessGridNetworkItem.java index 60922f91b4..d3d847a7d0 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessGridNetworkItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessGridNetworkItem.java @@ -9,7 +9,7 @@ import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.WirelessGridGridFactory; import com.refinedmods.refinedstorage.inventory.player.PlayerSlot; import com.refinedmods.refinedstorage.item.WirelessGridItem; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; @@ -49,7 +49,7 @@ public boolean onOpen(INetwork network) { } if (!network.getSecurityManager().hasPermission(Permission.MODIFY, player)) { - WorldUtils.sendNoPermissionMessage(player); + LevelUtils.sendNoPermissionMessage(player); return false; } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ConstructorNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ConstructorNetworkNode.java index 52b8b02d86..cbd443502a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ConstructorNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ConstructorNetworkNode.java @@ -15,7 +15,7 @@ import com.refinedmods.refinedstorage.inventory.listener.NetworkNodeInventoryListener; import com.refinedmods.refinedstorage.item.UpgradeItem; import com.refinedmods.refinedstorage.util.StackUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.PositionImpl; @@ -105,7 +105,7 @@ private void extractAndPlaceFluid(FluidStack stack) { network.getCraftingManager().request(this, stack, FluidAttributes.BUCKET_VOLUME); } } else if (!level.getBlockState(front).getFluidState().isSource()) { - FluidUtil.tryPlaceFluid(WorldUtils.getFakePlayer((ServerLevel) level, getOwner()), level, InteractionHand.MAIN_HAND, front, new NetworkFluidHandler(StackUtils.copy(stack, FluidAttributes.BUCKET_VOLUME)), stack); + FluidUtil.tryPlaceFluid(LevelUtils.getFakePlayer((ServerLevel) level, getOwner()), level, InteractionHand.MAIN_HAND, front, new NetworkFluidHandler(StackUtils.copy(stack, FluidAttributes.BUCKET_VOLUME)), stack); } } @@ -114,7 +114,7 @@ private void extractAndPlaceBlock(ItemStack stack) { if (!took.isEmpty()) { BlockPlaceContext ctx = new ConstructorBlockItemUseContext( level, - WorldUtils.getFakePlayer((ServerLevel) level, getOwner()), + LevelUtils.getFakePlayer((ServerLevel) level, getOwner()), InteractionHand.MAIN_HAND, took, new BlockHitResult(Vec3.ZERO, getDirection(), pos, false) diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/CrafterNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/CrafterNetworkNode.java index 2c37791ac1..362eeb700e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/CrafterNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/CrafterNetworkNode.java @@ -13,7 +13,7 @@ import com.refinedmods.refinedstorage.inventory.listener.NetworkNodeInventoryListener; import com.refinedmods.refinedstorage.item.UpgradeItem; import com.refinedmods.refinedstorage.util.StackUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -260,7 +260,7 @@ public IItemHandler getConnectedInventory() { return null; } - return WorldUtils.getItemHandler(proxy.getFacingBlockEntity(), proxy.getDirection().getOpposite()); + return LevelUtils.getItemHandler(proxy.getFacingBlockEntity(), proxy.getDirection().getOpposite()); } @Nullable @@ -271,7 +271,7 @@ public IFluidHandler getConnectedFluidInventory() { return null; } - return WorldUtils.getFluidHandler(proxy.getFacingBlockEntity(), proxy.getDirection().getOpposite()); + return LevelUtils.getFluidHandler(proxy.getFacingBlockEntity(), proxy.getDirection().getOpposite()); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DestructorNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DestructorNetworkNode.java index f87972eb30..9facb3b6c6 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DestructorNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DestructorNetworkNode.java @@ -16,7 +16,7 @@ import com.refinedmods.refinedstorage.inventory.listener.NetworkNodeInventoryListener; import com.refinedmods.refinedstorage.item.UpgradeItem; import com.refinedmods.refinedstorage.util.StackUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; @@ -122,7 +122,7 @@ private void breakBlock() { new BlockHitResult(Vec3.ZERO, getDirection().getOpposite(), front, false), level, front, - WorldUtils.getFakePlayer((ServerLevel) level, getOwner()) + LevelUtils.getFakePlayer((ServerLevel) level, getOwner()) ); if (!frontStack.isEmpty() && @@ -133,7 +133,7 @@ private void breakBlock() { (ServerLevel) level, front, level.getBlockEntity(front), - WorldUtils.getFakePlayer((ServerLevel) level, getOwner()), + LevelUtils.getFakePlayer((ServerLevel) level, getOwner()), tool ); @@ -143,10 +143,10 @@ private void breakBlock() { } } - BlockEvent.BreakEvent e = new BlockEvent.BreakEvent(level, front, frontBlockState, WorldUtils.getFakePlayer((ServerLevel) level, getOwner())); + BlockEvent.BreakEvent e = new BlockEvent.BreakEvent(level, front, frontBlockState, LevelUtils.getFakePlayer((ServerLevel) level, getOwner())); if (!MinecraftForge.EVENT_BUS.post(e)) { - frontBlock.playerWillDestroy(level, front, frontBlockState, WorldUtils.getFakePlayer((ServerLevel) level, getOwner())); + frontBlock.playerWillDestroy(level, front, frontBlockState, LevelUtils.getFakePlayer((ServerLevel) level, getOwner())); level.removeBlock(front, false); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExporterNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExporterNetworkNode.java index 5832284547..be793264f3 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExporterNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExporterNetworkNode.java @@ -16,7 +16,7 @@ import com.refinedmods.refinedstorage.inventory.listener.NetworkNodeInventoryListener; import com.refinedmods.refinedstorage.item.UpgradeItem; import com.refinedmods.refinedstorage.util.StackUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; @@ -87,7 +87,7 @@ public void update() { if (canUpdate() && ticks % upgrades.getSpeed() == 0 && level.isLoaded(pos)) { if (type == IType.ITEMS) { - IItemHandler handler = WorldUtils.getItemHandler(getFacingBlockEntity(), getDirection().getOpposite()); + IItemHandler handler = LevelUtils.getItemHandler(getFacingBlockEntity(), getDirection().getOpposite()); if (handler != null) { while (filterSlot + 1 < itemFilters.getSlots() && itemFilters.getStackInSlot(filterSlot).isEmpty()) { @@ -167,7 +167,7 @@ public void update() { filterSlot = 0; } - IFluidHandler handler = WorldUtils.getFluidHandler(getFacingBlockEntity(), getDirection().getOpposite()); + IFluidHandler handler = LevelUtils.getFluidHandler(getFacingBlockEntity(), getDirection().getOpposite()); if (handler != null) { FluidStack stack = fluids[filterSlot]; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ImporterNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ImporterNetworkNode.java index 68012c32fe..c607165dae 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ImporterNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ImporterNetworkNode.java @@ -17,7 +17,7 @@ import com.refinedmods.refinedstorage.blockentity.config.IType; import com.refinedmods.refinedstorage.blockentity.config.IWhitelistBlacklist; import com.refinedmods.refinedstorage.util.StackUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; @@ -68,7 +68,7 @@ public void update() { if (type == IType.ITEMS) { BlockEntity facing = getFacingBlockEntity(); - IItemHandler handler = WorldUtils.getItemHandler(facing, getDirection().getOpposite()); + IItemHandler handler = LevelUtils.getItemHandler(facing, getDirection().getOpposite()); if (facing instanceof DiskDriveBlockEntity || handler == null) { return; @@ -100,7 +100,7 @@ public void update() { } } } else if (type == IType.FLUIDS && ticks % upgrades.getSpeed() == 0) { - IFluidHandler handler = WorldUtils.getFluidHandler(getFacingBlockEntity(), getDirection().getOpposite()); + IFluidHandler handler = LevelUtils.getFluidHandler(getFacingBlockEntity(), getDirection().getOpposite()); if (handler != null) { FluidStack stack = handler.drain(FluidAttributes.BUCKET_VOLUME, IFluidHandler.FluidAction.SIMULATE); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkNode.java index 8263d20de4..5de1057ffc 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkNode.java @@ -36,8 +36,8 @@ public abstract class NetworkNode implements INetworkNode, INetworkNodeVisitor { // However, due to the memory footprint of worlds and modded minecraft having the tendency to have lots of worlds, // Forge is planning to unload (aka remove) worlds so their instances will change. // This is problematic as this attribute will target the wrong world in that case. - // Idea: possibly change to a getter based on RegistryKey? - // Another note: this attribute isn't the *real* problem. Because network nodes are in WorldSavedData in a tick handler, + // Idea: possibly change to a getter based on RegistryKey? + // Another note: this attribute isn't the *real* problem. Because network nodes are in SavedData in a tick handler, // new instances of network nodes will be created when the world refreshes (causing this field to be different too). // However, network nodes in the network graph *AREN'T* recreated when the world refreshes, causing the graph to have the incorrect instance, and even worse, // having multiple different instances of the same network node. diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkTransmitterNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkTransmitterNetworkNode.java index 5a3a0c02d8..e3eda5f7f0 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkTransmitterNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkTransmitterNetworkNode.java @@ -114,10 +114,10 @@ public void visit(INetworkNodeVisitor.Operator operator) { if (canTransmit()) { if (!isSameDimension()) { - Level dimensionWorld = level.getServer().getLevel(receiverDimension); + Level dimensionLevel = level.getServer().getLevel(receiverDimension); - if (dimensionWorld != null && dimensionWorld.getBlockEntity(receiver) instanceof NetworkReceiverBlockEntity) { - operator.apply(dimensionWorld, receiver, null); + if (dimensionLevel != null && dimensionLevel.getBlockEntity(receiver) instanceof NetworkReceiverBlockEntity) { + operator.apply(dimensionLevel, receiver, null); } } else { if (level.getBlockEntity(receiver) instanceof NetworkReceiverBlockEntity) { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/StorageMonitorNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/StorageMonitorNetworkNode.java index 47d3cc5734..02d1eb06e9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/StorageMonitorNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/StorageMonitorNetworkNode.java @@ -14,7 +14,7 @@ import com.refinedmods.refinedstorage.blockentity.config.RedstoneMode; import com.refinedmods.refinedstorage.util.NetworkUtils; import com.refinedmods.refinedstorage.util.StackUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -46,14 +46,14 @@ public class StorageMonitorNetworkNode extends NetworkNode implements IComparabl .addListener(new NetworkNodeInventoryListener(this)) .addListener((handler, slot, reading) -> { if (!reading) { - WorldUtils.updateBlock(level, pos); + LevelUtils.updateBlock(level, pos); } }); private final FluidInventory fluidFilter = new FluidInventory(1, FluidAttributes.BUCKET_VOLUME) .addListener((handler, slot, reading) -> { if (!reading) { - WorldUtils.updateBlock(level, pos); + LevelUtils.updateBlock(level, pos); } }); private final Map> deposits = new HashMap<>(); @@ -82,7 +82,7 @@ public void update() { } else if (oldAmount != newAmount) { oldAmount = newAmount; - WorldUtils.updateBlock(level, pos); + LevelUtils.updateBlock(level, pos); } } @@ -249,7 +249,7 @@ public int getCompare() { public void setCompare(int compare) { this.compare = compare; - WorldUtils.updateBlock(level, pos); + LevelUtils.updateBlock(level, pos); markDirty(); } @@ -325,7 +325,7 @@ public int getType() { public void setType(int type) { this.type = type; - WorldUtils.updateBlock(level, pos); + LevelUtils.updateBlock(level, pos); markDirty(); } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/DiskDriveNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/DiskDriveNetworkNode.java index 6a545fa15f..87871e0e07 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/DiskDriveNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/DiskDriveNetworkNode.java @@ -23,7 +23,7 @@ import com.refinedmods.refinedstorage.inventory.listener.NetworkNodeInventoryListener; import com.refinedmods.refinedstorage.util.AccessTypeUtils; import com.refinedmods.refinedstorage.util.StackUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; @@ -75,7 +75,7 @@ public class DiskDriveNetworkNode extends NetworkNode implements IStorageProvide } if (!reading) { - WorldUtils.updateBlock(level, pos); + LevelUtils.updateBlock(level, pos); } } }); @@ -125,7 +125,7 @@ public void update() { ++ticksSinceBlockUpdateRequested; if (ticksSinceBlockUpdateRequested > DISK_STATE_UPDATE_THROTTLE) { - WorldUtils.updateBlock(level, pos); + LevelUtils.updateBlock(level, pos); this.blockUpdateRequested = false; this.ticksSinceBlockUpdateRequested = 0; @@ -148,7 +148,7 @@ public void onConnectedStateChange(INetwork network, boolean state, Connectivity network.getNodeGraph().runActionWhenPossible(ItemStorageCache.INVALIDATE_ACTION.apply(InvalidateCause.CONNECTED_STATE_CHANGED)); network.getNodeGraph().runActionWhenPossible(FluidStorageCache.INVALIDATE_ACTION.apply(InvalidateCause.CONNECTED_STATE_CHANGED)); - WorldUtils.updateBlock(level, pos); + LevelUtils.updateBlock(level, pos); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/DiskManipulatorNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/DiskManipulatorNetworkNode.java index 7b5a9582ff..2a9fcfee48 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/DiskManipulatorNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/DiskManipulatorNetworkNode.java @@ -22,7 +22,7 @@ import com.refinedmods.refinedstorage.inventory.listener.NetworkNodeInventoryListener; import com.refinedmods.refinedstorage.item.UpgradeItem; import com.refinedmods.refinedstorage.util.StackUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; @@ -68,7 +68,7 @@ public class DiskManipulatorNetworkNode extends NetworkNode implements IComparab ); if (!reading) { - WorldUtils.updateBlock(level, pos); + LevelUtils.updateBlock(level, pos); } } }); @@ -88,7 +88,7 @@ public class DiskManipulatorNetworkNode extends NetworkNode implements IComparab ); if (!reading) { - WorldUtils.updateBlock(level, pos); + LevelUtils.updateBlock(level, pos); } } })); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskFluidManipulatorWrapper.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskFluidManipulatorWrapper.java index 44f6f8dd51..51a62d0273 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskFluidManipulatorWrapper.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskFluidManipulatorWrapper.java @@ -8,7 +8,7 @@ import com.refinedmods.refinedstorage.apiimpl.network.node.DiskState; import com.refinedmods.refinedstorage.blockentity.config.IWhitelistBlacklist; import com.refinedmods.refinedstorage.util.StackUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.fluids.FluidStack; @@ -33,7 +33,7 @@ public StorageDiskFluidManipulatorWrapper(DiskManipulatorNetworkNode diskManipul if (lastState != currentState) { lastState = currentState; - WorldUtils.updateBlock(diskManipulator.getLevel(), diskManipulator.getPos()); + LevelUtils.updateBlock(diskManipulator.getLevel(), diskManipulator.getPos()); } }, diskManipulator diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskItemManipulatorWrapper.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskItemManipulatorWrapper.java index 9304404869..05fbabf9fb 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskItemManipulatorWrapper.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskItemManipulatorWrapper.java @@ -7,7 +7,7 @@ import com.refinedmods.refinedstorage.api.util.Action; import com.refinedmods.refinedstorage.apiimpl.network.node.DiskState; import com.refinedmods.refinedstorage.blockentity.config.IWhitelistBlacklist; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; @@ -33,7 +33,7 @@ public StorageDiskItemManipulatorWrapper(DiskManipulatorNetworkNode diskManipula if (lastState != currentState) { lastState = currentState; - WorldUtils.updateBlock(diskManipulator.getLevel(), diskManipulator.getPos()); + LevelUtils.updateBlock(diskManipulator.getLevel(), diskManipulator.getPos()); } }, diskManipulator diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/StorageDiskManager.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/StorageDiskManager.java index d7820feb56..d27cc150f7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/StorageDiskManager.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/StorageDiskManager.java @@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage.api.storage.disk.IStorageDiskManager; import com.refinedmods.refinedstorage.api.storage.disk.IStorageDiskProvider; import com.refinedmods.refinedstorage.apiimpl.API; -import com.refinedmods.refinedstorage.apiimpl.util.RSWorldSavedData; +import com.refinedmods.refinedstorage.apiimpl.util.RSSavedData; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; @@ -18,7 +18,7 @@ import java.util.Map; import java.util.UUID; -public class StorageDiskManager extends RSWorldSavedData implements IStorageDiskManager { +public class StorageDiskManager extends RSSavedData implements IStorageDiskManager { public static final String NAME = "refinedstorage_disks"; private static final String NBT_DISKS = "Disks"; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageProvider.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageProvider.java index 43dad3c93e..be727ccea5 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageProvider.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageProvider.java @@ -4,7 +4,7 @@ import com.refinedmods.refinedstorage.api.storage.externalstorage.IExternalStorageContext; import com.refinedmods.refinedstorage.api.storage.externalstorage.IExternalStorageProvider; import com.refinedmods.refinedstorage.blockentity.FluidInterfaceBlockEntity; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.Direction; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.fluids.FluidStack; @@ -14,7 +14,7 @@ public class FluidExternalStorageProvider implements IExternalStorageProvider { @Override public boolean canProvide(BlockEntity blockEntity, Direction direction) { - return WorldUtils.getFluidHandler(blockEntity, direction.getOpposite()) != null; + return LevelUtils.getFluidHandler(blockEntity, direction.getOpposite()) != null; } @Nonnull @@ -25,7 +25,7 @@ public IExternalStorage provide(IExternalStorageContext context, Blo return null; } - return WorldUtils.getFluidHandler(blockEntity, direction.getOpposite()); + return LevelUtils.getFluidHandler(blockEntity, direction.getOpposite()); }, blockEntity instanceof FluidInterfaceBlockEntity); } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageProvider.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageProvider.java index 18e257dd73..6d2e6cb8a2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageProvider.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageProvider.java @@ -7,7 +7,7 @@ import com.refinedmods.refinedstorage.api.storage.externalstorage.IExternalStorageProvider; import com.refinedmods.refinedstorage.blockentity.InterfaceBlockEntity; import com.refinedmods.refinedstorage.util.NetworkUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.Direction; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntity; @@ -23,7 +23,7 @@ public boolean canProvide(BlockEntity blockEntity, Direction direction) { return false; } - return WorldUtils.getItemHandler(blockEntity, direction.getOpposite()) != null; + return LevelUtils.getItemHandler(blockEntity, direction.getOpposite()) != null; } @Nonnull @@ -34,7 +34,7 @@ public IExternalStorage provide(IExternalStorageContext context, Bloc return null; } - return WorldUtils.getItemHandler(blockEntity, direction.getOpposite()); + return LevelUtils.getItemHandler(blockEntity, direction.getOpposite()); }, blockEntity instanceof InterfaceBlockEntity); } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/tracker/StorageTrackerManager.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/tracker/StorageTrackerManager.java index caa49fae94..2ef9615331 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/tracker/StorageTrackerManager.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/tracker/StorageTrackerManager.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage.api.storage.StorageType; import com.refinedmods.refinedstorage.api.storage.tracker.IStorageTracker; import com.refinedmods.refinedstorage.api.storage.tracker.IStorageTrackerManager; -import com.refinedmods.refinedstorage.apiimpl.util.RSWorldSavedData; +import com.refinedmods.refinedstorage.apiimpl.util.RSSavedData; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; @@ -12,7 +12,7 @@ import java.util.Map; import java.util.UUID; -public class StorageTrackerManager extends RSWorldSavedData implements IStorageTrackerManager { +public class StorageTrackerManager extends RSSavedData implements IStorageTrackerManager { public static final String NAME = "refinedstorage_tracker"; private static final String NBT_TRACKERS = "Tracker"; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/RSWorldSavedData.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/RSSavedData.java similarity index 91% rename from src/main/java/com/refinedmods/refinedstorage/apiimpl/util/RSWorldSavedData.java rename to src/main/java/com/refinedmods/refinedstorage/apiimpl/util/RSSavedData.java index 68b70491cc..7924228da1 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/RSWorldSavedData.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/RSSavedData.java @@ -11,8 +11,8 @@ import java.io.IOException; -public abstract class RSWorldSavedData extends SavedData { - private final Logger LOGGER = LogManager.getLogger(RSWorldSavedData.class); +public abstract class RSSavedData extends SavedData { + private final Logger LOGGER = LogManager.getLogger(RSSavedData.class); public abstract void load(CompoundTag nbt); diff --git a/src/main/java/com/refinedmods/refinedstorage/block/StorageMonitorBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/StorageMonitorBlock.java index 227a87dcea..051f3a5088 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/StorageMonitorBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/StorageMonitorBlock.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage.blockentity.StorageMonitorBlockEntity; import com.refinedmods.refinedstorage.util.BlockUtils; import com.refinedmods.refinedstorage.util.NetworkUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.server.level.ServerPlayer; @@ -72,7 +72,7 @@ public void attack(BlockState state, Level level, BlockPos pos, Player player) { super.attack(state, level, pos, player); if (!level.isClientSide) { - HitResult result = WorldUtils.rayTracePlayer(level, player); + HitResult result = LevelUtils.rayTracePlayer(level, player); if (!(result instanceof BlockHitResult)) { return; diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/CableBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/CableBlockEntity.java index 99f6866e20..0a9cdf6b1d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/CableBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/CableBlockEntity.java @@ -4,7 +4,7 @@ import com.refinedmods.refinedstorage.apiimpl.network.node.CableNetworkNode; import com.refinedmods.refinedstorage.apiimpl.network.node.cover.CoverManager; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataSerializers; @@ -53,6 +53,6 @@ public void readUpdate(CompoundTag tag) { requestModelDataUpdate(); - WorldUtils.updateBlock(level, worldPosition); + LevelUtils.updateBlock(level, worldPosition); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/ConstructorBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/ConstructorBlockEntity.java index 95b4d012ce..5e383b4e5c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/ConstructorBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/ConstructorBlockEntity.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage.blockentity.config.IComparable; import com.refinedmods.refinedstorage.blockentity.config.IType; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataSerializers; @@ -69,6 +69,6 @@ public void readUpdate(CompoundTag tag) { requestModelDataUpdate(); - WorldUtils.updateBlock(level, worldPosition); + LevelUtils.updateBlock(level, worldPosition); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/DestructorBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/DestructorBlockEntity.java index ad524444ee..1b7148ec86 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/DestructorBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/DestructorBlockEntity.java @@ -7,7 +7,7 @@ import com.refinedmods.refinedstorage.blockentity.config.IType; import com.refinedmods.refinedstorage.blockentity.config.IWhitelistBlacklist; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataSerializers; @@ -72,6 +72,6 @@ public void readUpdate(CompoundTag tag) { requestModelDataUpdate(); - WorldUtils.updateBlock(level, worldPosition); + LevelUtils.updateBlock(level, worldPosition); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskDriveBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskDriveBlockEntity.java index bbe3a45642..98e5b8452e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskDriveBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskDriveBlockEntity.java @@ -8,7 +8,7 @@ import com.refinedmods.refinedstorage.blockentity.config.*; import com.refinedmods.refinedstorage.blockentity.data.RSSerializers; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -127,7 +127,7 @@ public void readUpdate(CompoundTag tag) { requestModelDataUpdate(); - WorldUtils.updateBlock(level, worldPosition); + LevelUtils.updateBlock(level, worldPosition); } @Nonnull diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskManipulatorBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskManipulatorBlockEntity.java index 6fab659949..ea3fd877ff 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskManipulatorBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskManipulatorBlockEntity.java @@ -7,7 +7,7 @@ import com.refinedmods.refinedstorage.blockentity.config.IType; import com.refinedmods.refinedstorage.blockentity.config.IWhitelistBlacklist; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -84,7 +84,7 @@ public void readUpdate(CompoundTag tag) { requestModelDataUpdate(); - WorldUtils.updateBlock(level, worldPosition); + LevelUtils.updateBlock(level, worldPosition); } @Nonnull diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/ExporterBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/ExporterBlockEntity.java index eba115b1da..2e2e11d0bc 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/ExporterBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/ExporterBlockEntity.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage.blockentity.config.IComparable; import com.refinedmods.refinedstorage.blockentity.config.IType; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataSerializers; @@ -65,6 +65,6 @@ public void readUpdate(CompoundTag tag) { requestModelDataUpdate(); - WorldUtils.updateBlock(level, worldPosition); + LevelUtils.updateBlock(level, worldPosition); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/ExternalStorageBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/ExternalStorageBlockEntity.java index 640f1db96e..8f34afc23f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/ExternalStorageBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/ExternalStorageBlockEntity.java @@ -8,7 +8,7 @@ import com.refinedmods.refinedstorage.blockentity.config.*; import com.refinedmods.refinedstorage.blockentity.data.RSSerializers; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataSerializers; @@ -99,6 +99,6 @@ public void readUpdate(CompoundTag tag) { requestModelDataUpdate(); - WorldUtils.updateBlock(level, worldPosition); + LevelUtils.updateBlock(level, worldPosition); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/ImporterBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/ImporterBlockEntity.java index e2e55fc5e6..1aa85b314a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/ImporterBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/ImporterBlockEntity.java @@ -7,7 +7,7 @@ import com.refinedmods.refinedstorage.blockentity.config.IType; import com.refinedmods.refinedstorage.blockentity.config.IWhitelistBlacklist; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataSerializers; @@ -63,6 +63,6 @@ public void readUpdate(CompoundTag tag) { requestModelDataUpdate(); - WorldUtils.updateBlock(level, worldPosition); + LevelUtils.updateBlock(level, worldPosition); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGridBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGridBlockEntity.java index 3f1e9e6c47..ad78b56d67 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGridBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGridBlockEntity.java @@ -48,7 +48,7 @@ import com.refinedmods.refinedstorage.screen.BaseScreen; import com.refinedmods.refinedstorage.screen.grid.GridScreen; import com.refinedmods.refinedstorage.util.StackUtils; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -189,7 +189,7 @@ public static void serverTick(PortableGridBlockEntity blockEntity) { if (!reading) { updateState(); - WorldUtils.updateBlock(level, worldPosition); // Re-send grid type + LevelUtils.updateBlock(level, worldPosition); // Re-send grid type } } }); diff --git a/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java b/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java index 6cf97eb7a9..f4c72a6eb8 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java @@ -10,7 +10,7 @@ import com.refinedmods.refinedstorage.apiimpl.network.node.cover.CoverType; import com.refinedmods.refinedstorage.block.CableBlock; import com.refinedmods.refinedstorage.blockentity.NetworkNodeBlockEntity; -import com.refinedmods.refinedstorage.util.WorldUtils; +import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -135,7 +135,7 @@ public InteractionResult useOn(UseOnContext context) { INetworkNode node = ((NetworkNodeBlockEntity) blockEntity).getNode(); if (node.getNetwork() != null && !node.getNetwork().getSecurityManager().hasPermission(Permission.BUILD, context.getPlayer())) { - WorldUtils.sendNoPermissionMessage(context.getPlayer()); + LevelUtils.sendNoPermissionMessage(context.getPlayer()); return InteractionResult.FAIL; } @@ -143,7 +143,7 @@ public InteractionResult useOn(UseOnContext context) { if (((ICoverable) node).getCoverManager().setCover(facing, createCover(getItem(stack)))) { context.getPlayer().getItemInHand(context.getHand()).shrink(1); - WorldUtils.updateBlock(level, pos); + LevelUtils.updateBlock(level, pos); API.instance().getNetworkNodeManager((ServerLevel) level).markForSaving(); return InteractionResult.SUCCESS; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/NetworkItem.java b/src/main/java/com/refinedmods/refinedstorage/item/NetworkItem.java index c1e0062c54..68e5c769c3 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/NetworkItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/NetworkItem.java @@ -98,13 +98,13 @@ public void applyNetwork(MinecraftServer server, ItemStack stack, Consumer Date: Sat, 18 Dec 2021 22:13:36 +0100 Subject: [PATCH 07/10] Rename MainItemGroup to MainCreativeTab --- src/main/java/com/refinedmods/refinedstorage/RS.java | 4 ++-- src/main/java/com/refinedmods/refinedstorage/RSItems.java | 2 +- .../java/com/refinedmods/refinedstorage/item/CoreItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/CoverItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/FilterItem.java | 2 +- .../refinedmods/refinedstorage/item/FluidStorageDiskItem.java | 2 +- .../refinedmods/refinedstorage/item/FluidStoragePartItem.java | 2 +- .../com/refinedmods/refinedstorage/item/NetworkCardItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/PatternItem.java | 2 +- .../refinedmods/refinedstorage/item/ProcessorBindingItem.java | 2 +- .../com/refinedmods/refinedstorage/item/ProcessorItem.java | 2 +- .../refinedstorage/item/QuartzEnrichedIronItem.java | 2 +- .../com/refinedmods/refinedstorage/item/SecurityCardItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/SiliconItem.java | 2 +- .../com/refinedmods/refinedstorage/item/StorageDiskItem.java | 2 +- .../refinedmods/refinedstorage/item/StorageHousingItem.java | 2 +- .../com/refinedmods/refinedstorage/item/StoragePartItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/UpgradeItem.java | 2 +- .../refinedstorage/item/WirelessCraftingMonitorItem.java | 2 +- .../refinedstorage/item/WirelessFluidGridItem.java | 2 +- .../com/refinedmods/refinedstorage/item/WirelessGridItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/WrenchItem.java | 2 +- .../refinedstorage/item/blockitem/ControllerBlockItem.java | 2 +- .../refinedstorage/item/blockitem/FluidStorageBlockItem.java | 2 +- .../refinedstorage/item/blockitem/PortableGridBlockItem.java | 2 +- .../refinedstorage/item/blockitem/StorageBlockItem.java | 2 +- .../item/group/{MainItemGroup.java => MainCreativeTab.java} | 4 ++-- .../java/com/refinedmods/refinedstorage/util/ColorMap.java | 2 +- 28 files changed, 30 insertions(+), 30 deletions(-) rename src/main/java/com/refinedmods/refinedstorage/item/group/{MainItemGroup.java => MainCreativeTab.java} (84%) diff --git a/src/main/java/com/refinedmods/refinedstorage/RS.java b/src/main/java/com/refinedmods/refinedstorage/RS.java index 5f01b797f8..36fb4e0740 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RS.java +++ b/src/main/java/com/refinedmods/refinedstorage/RS.java @@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage.config.ServerConfig; import com.refinedmods.refinedstorage.datageneration.DataGenerators; import com.refinedmods.refinedstorage.integration.curios.CuriosIntegration; -import com.refinedmods.refinedstorage.item.group.MainItemGroup; +import com.refinedmods.refinedstorage.item.group.MainCreativeTab; import com.refinedmods.refinedstorage.network.NetworkHandler; import com.refinedmods.refinedstorage.setup.ClientSetup; import com.refinedmods.refinedstorage.setup.CommonSetup; @@ -28,7 +28,7 @@ public final class RS { public static final String NAME = "Refined Storage"; public static final NetworkHandler NETWORK_HANDLER = new NetworkHandler(); - public static final CreativeModeTab MAIN_GROUP = new MainItemGroup(); + public static final CreativeModeTab CREATIVE_TAB = new MainCreativeTab(); public static final ServerConfig SERVER_CONFIG = new ServerConfig(); public static final ClientConfig CLIENT_CONFIG = new ClientConfig(); diff --git a/src/main/java/com/refinedmods/refinedstorage/RSItems.java b/src/main/java/com/refinedmods/refinedstorage/RSItems.java index 9fcce9fc8d..97ff6bf87e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RSItems.java +++ b/src/main/java/com/refinedmods/refinedstorage/RSItems.java @@ -207,7 +207,7 @@ private RSItems() { } private static RegistryObject registerBlockItemFor(RegistryObject block) { - return ITEMS.register(block.getId().getPath(), () -> new BaseBlockItem(block.get(), new Item.Properties().tab(RS.MAIN_GROUP))); + return ITEMS.register(block.getId().getPath(), () -> new BaseBlockItem(block.get(), new Item.Properties().tab(RS.CREATIVE_TAB))); } public static void register() { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/CoreItem.java b/src/main/java/com/refinedmods/refinedstorage/item/CoreItem.java index a82e7a6f73..68913a948a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/CoreItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/CoreItem.java @@ -5,7 +5,7 @@ public class CoreItem extends Item { public CoreItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP)); + super(new Item.Properties().tab(RS.CREATIVE_TAB)); } public enum Type { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java b/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java index f4c72a6eb8..d79bf00efe 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java @@ -40,7 +40,7 @@ public class CoverItem extends Item { public CoverItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP)); + super(new Item.Properties().tab(RS.CREATIVE_TAB)); } public static void setItem(ItemStack cover, ItemStack item) { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java b/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java index 66789681c4..ea0a2291da 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java @@ -41,7 +41,7 @@ public class FilterItem extends Item { private static final String NBT_TYPE = "Type"; public FilterItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); } public static int getCompare(ItemStack stack) { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/FluidStorageDiskItem.java b/src/main/java/com/refinedmods/refinedstorage/item/FluidStorageDiskItem.java index 94bc0e8e58..3f68397eb6 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/FluidStorageDiskItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/FluidStorageDiskItem.java @@ -35,7 +35,7 @@ public class FluidStorageDiskItem extends Item implements IStorageDiskProvider { private final FluidStorageType type; public FluidStorageDiskItem(FluidStorageType type) { - super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/FluidStoragePartItem.java b/src/main/java/com/refinedmods/refinedstorage/item/FluidStoragePartItem.java index 8a478999b4..68185037a6 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/FluidStoragePartItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/FluidStoragePartItem.java @@ -7,7 +7,7 @@ public class FluidStoragePartItem extends Item { public FluidStoragePartItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP)); + super(new Item.Properties().tab(RS.CREATIVE_TAB)); } public static FluidStoragePartItem getByType(FluidStorageType type) { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/NetworkCardItem.java b/src/main/java/com/refinedmods/refinedstorage/item/NetworkCardItem.java index a84bd90bd1..ddd00443e2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/NetworkCardItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/NetworkCardItem.java @@ -28,7 +28,7 @@ public class NetworkCardItem extends Item { private static final String NBT_DIMENSION = "Dimension"; public NetworkCardItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); } @Nullable diff --git a/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java b/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java index 7187d20f7b..f69cbdb204 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java @@ -54,7 +54,7 @@ public class PatternItem extends Item implements ICraftingPatternProvider, IItem private static final int VERSION = 1; public PatternItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP)); + super(new Item.Properties().tab(RS.CREATIVE_TAB)); } public static ICraftingPattern fromCache(Level level, ItemStack stack) { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/ProcessorBindingItem.java b/src/main/java/com/refinedmods/refinedstorage/item/ProcessorBindingItem.java index 5b6f4e7a70..9b2b8758c2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/ProcessorBindingItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/ProcessorBindingItem.java @@ -5,6 +5,6 @@ public class ProcessorBindingItem extends Item { public ProcessorBindingItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP)); + super(new Item.Properties().tab(RS.CREATIVE_TAB)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/ProcessorItem.java b/src/main/java/com/refinedmods/refinedstorage/item/ProcessorItem.java index 52a80bafff..85d802e7d4 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/ProcessorItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/ProcessorItem.java @@ -5,7 +5,7 @@ public class ProcessorItem extends Item { public ProcessorItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP)); + super(new Item.Properties().tab(RS.CREATIVE_TAB)); } public enum Type { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/QuartzEnrichedIronItem.java b/src/main/java/com/refinedmods/refinedstorage/item/QuartzEnrichedIronItem.java index 5c68fe5f57..35d22e888b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/QuartzEnrichedIronItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/QuartzEnrichedIronItem.java @@ -5,6 +5,6 @@ public class QuartzEnrichedIronItem extends Item { public QuartzEnrichedIronItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP)); + super(new Item.Properties().tab(RS.CREATIVE_TAB)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/SecurityCardItem.java b/src/main/java/com/refinedmods/refinedstorage/item/SecurityCardItem.java index 93bd9db754..01946ac84f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/SecurityCardItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/SecurityCardItem.java @@ -25,7 +25,7 @@ public class SecurityCardItem extends Item { private static final String NBT_PERMISSION = "Permission_%d"; public SecurityCardItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); } @Nullable diff --git a/src/main/java/com/refinedmods/refinedstorage/item/SiliconItem.java b/src/main/java/com/refinedmods/refinedstorage/item/SiliconItem.java index 543f4bf287..1b40d2540c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/SiliconItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/SiliconItem.java @@ -5,6 +5,6 @@ public class SiliconItem extends Item { public SiliconItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP)); + super(new Item.Properties().tab(RS.CREATIVE_TAB)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/StorageDiskItem.java b/src/main/java/com/refinedmods/refinedstorage/item/StorageDiskItem.java index c3607d36ad..4737f41ba9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/StorageDiskItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/StorageDiskItem.java @@ -35,7 +35,7 @@ public class StorageDiskItem extends Item implements IStorageDiskProvider { private final ItemStorageType type; public StorageDiskItem(ItemStorageType type) { - super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/StorageHousingItem.java b/src/main/java/com/refinedmods/refinedstorage/item/StorageHousingItem.java index 9554f1afac..91a9b723dc 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/StorageHousingItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/StorageHousingItem.java @@ -5,6 +5,6 @@ public class StorageHousingItem extends Item { public StorageHousingItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP)); + super(new Item.Properties().tab(RS.CREATIVE_TAB)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/StoragePartItem.java b/src/main/java/com/refinedmods/refinedstorage/item/StoragePartItem.java index f920152d4b..4640a153a3 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/StoragePartItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/StoragePartItem.java @@ -7,7 +7,7 @@ public class StoragePartItem extends Item { public StoragePartItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP)); + super(new Item.Properties().tab(RS.CREATIVE_TAB)); } public static StoragePartItem getByType(ItemStorageType type) { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/UpgradeItem.java b/src/main/java/com/refinedmods/refinedstorage/item/UpgradeItem.java index 4b506ab29b..83558d83cd 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/UpgradeItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/UpgradeItem.java @@ -16,7 +16,7 @@ public class UpgradeItem extends Item { private final Type type; public UpgradeItem(Type type) { - super(new Item.Properties().tab(RS.MAIN_GROUP)); + super(new Item.Properties().tab(RS.CREATIVE_TAB)); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/WirelessCraftingMonitorItem.java b/src/main/java/com/refinedmods/refinedstorage/item/WirelessCraftingMonitorItem.java index 5c1cb99faa..eec466b00d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/WirelessCraftingMonitorItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/WirelessCraftingMonitorItem.java @@ -20,7 +20,7 @@ public class WirelessCraftingMonitorItem extends NetworkItem { private final Type type; public WirelessCraftingMonitorItem(Type type) { - super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessCraftingMonitor().getCapacity()); + super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessCraftingMonitor().getCapacity()); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/WirelessFluidGridItem.java b/src/main/java/com/refinedmods/refinedstorage/item/WirelessFluidGridItem.java index da9ab17c2a..f61b613213 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/WirelessFluidGridItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/WirelessFluidGridItem.java @@ -17,7 +17,7 @@ public class WirelessFluidGridItem extends NetworkItem { private final Type type; public WirelessFluidGridItem(Type type) { - super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessFluidGrid().getCapacity()); + super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessFluidGrid().getCapacity()); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/WirelessGridItem.java b/src/main/java/com/refinedmods/refinedstorage/item/WirelessGridItem.java index ea1a287dd9..18e6f93ab2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/WirelessGridItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/WirelessGridItem.java @@ -17,7 +17,7 @@ public class WirelessGridItem extends NetworkItem { private final Type type; public WirelessGridItem(Type type) { - super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessGrid().getCapacity()); + super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessGrid().getCapacity()); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java b/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java index 9cf0dbca9d..440ab635be 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java @@ -18,7 +18,7 @@ public class WrenchItem extends Item { public WrenchItem() { - super(new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/ControllerBlockItem.java b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/ControllerBlockItem.java index 72ceb592dc..920e0c08b5 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/ControllerBlockItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/ControllerBlockItem.java @@ -14,7 +14,7 @@ public class ControllerBlockItem extends EnergyBlockItem { private final Component displayName; public ControllerBlockItem(ControllerBlock block, DyeColor color, Component displayName) { - super(block, new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1), block.getType() == NetworkType.CREATIVE, () -> RS.SERVER_CONFIG.getController().getCapacity()); + super(block, new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), block.getType() == NetworkType.CREATIVE, () -> RS.SERVER_CONFIG.getController().getCapacity()); if (color != ColorMap.DEFAULT_COLOR) { this.displayName = new TranslatableComponent("color.minecraft." + color.getName()) diff --git a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/FluidStorageBlockItem.java b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/FluidStorageBlockItem.java index d42bae55c0..fff574ef2a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/FluidStorageBlockItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/FluidStorageBlockItem.java @@ -35,7 +35,7 @@ public class FluidStorageBlockItem extends BaseBlockItem { private final FluidStorageType type; public FluidStorageBlockItem(FluidStorageBlock block) { - super(block, new Item.Properties().tab(RS.MAIN_GROUP)); + super(block, new Item.Properties().tab(RS.CREATIVE_TAB)); this.type = block.getType(); } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/PortableGridBlockItem.java b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/PortableGridBlockItem.java index 35383634e8..c1f7449dcc 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/PortableGridBlockItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/PortableGridBlockItem.java @@ -29,7 +29,7 @@ public class PortableGridBlockItem extends EnergyBlockItem { public PortableGridBlockItem(Type type) { super( type == Type.CREATIVE ? RSBlocks.CREATIVE_PORTABLE_GRID.get() : RSBlocks.PORTABLE_GRID.get(), - new Item.Properties().tab(RS.MAIN_GROUP).stacksTo(1), + new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getPortableGrid().getCapacity() ); diff --git a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/StorageBlockItem.java b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/StorageBlockItem.java index 9d52901bbe..0f8e8a6e9a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/StorageBlockItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/StorageBlockItem.java @@ -32,7 +32,7 @@ public class StorageBlockItem extends BaseBlockItem { private final ItemStorageType type; public StorageBlockItem(StorageBlock block) { - super(block, new Item.Properties().tab(RS.MAIN_GROUP)); + super(block, new Item.Properties().tab(RS.CREATIVE_TAB)); this.type = block.getType(); } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/group/MainItemGroup.java b/src/main/java/com/refinedmods/refinedstorage/item/group/MainCreativeTab.java similarity index 84% rename from src/main/java/com/refinedmods/refinedstorage/item/group/MainItemGroup.java rename to src/main/java/com/refinedmods/refinedstorage/item/group/MainCreativeTab.java index 778e4f70a0..74e3e0d932 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/group/MainItemGroup.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/group/MainCreativeTab.java @@ -6,8 +6,8 @@ import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; -public class MainItemGroup extends CreativeModeTab { - public MainItemGroup() { +public class MainCreativeTab extends CreativeModeTab { + public MainCreativeTab() { super(RS.ID); } diff --git a/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java b/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java index 3e2589da94..4fb9d7f6f1 100644 --- a/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java +++ b/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java @@ -95,7 +95,7 @@ private RegistryObject registerBlockItemFor(RegistryObj block.getId().getPath(), () -> new ColoredBlockItem( block.get(), - new Item.Properties().tab(RS.MAIN_GROUP), + new Item.Properties().tab(RS.CREATIVE_TAB), color, BlockUtils.getBlockTranslation(translationBlock.get()) ) From 42d33759231caf4f21cf6b4069a7015b3a3ebd6a Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 18 Dec 2021 22:13:58 +0100 Subject: [PATCH 08/10] Rename MainItemGroup to MainCreativeTab --- src/main/java/com/refinedmods/refinedstorage/RS.java | 4 ++-- src/main/java/com/refinedmods/refinedstorage/RSItems.java | 2 +- .../java/com/refinedmods/refinedstorage/item/CoreItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/CoverItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/FilterItem.java | 2 +- .../refinedmods/refinedstorage/item/FluidStorageDiskItem.java | 2 +- .../refinedmods/refinedstorage/item/FluidStoragePartItem.java | 2 +- .../com/refinedmods/refinedstorage/item/NetworkCardItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/PatternItem.java | 2 +- .../refinedmods/refinedstorage/item/ProcessorBindingItem.java | 2 +- .../com/refinedmods/refinedstorage/item/ProcessorItem.java | 2 +- .../refinedstorage/item/QuartzEnrichedIronItem.java | 2 +- .../com/refinedmods/refinedstorage/item/SecurityCardItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/SiliconItem.java | 2 +- .../com/refinedmods/refinedstorage/item/StorageDiskItem.java | 2 +- .../refinedmods/refinedstorage/item/StorageHousingItem.java | 2 +- .../com/refinedmods/refinedstorage/item/StoragePartItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/UpgradeItem.java | 2 +- .../refinedstorage/item/WirelessCraftingMonitorItem.java | 2 +- .../refinedstorage/item/WirelessFluidGridItem.java | 2 +- .../com/refinedmods/refinedstorage/item/WirelessGridItem.java | 2 +- .../java/com/refinedmods/refinedstorage/item/WrenchItem.java | 2 +- .../refinedstorage/item/blockitem/ControllerBlockItem.java | 2 +- .../refinedstorage/item/blockitem/FluidStorageBlockItem.java | 2 +- .../refinedstorage/item/blockitem/PortableGridBlockItem.java | 2 +- .../refinedstorage/item/blockitem/StorageBlockItem.java | 2 +- .../group/{MainCreativeTab.java => MainCreativeModeTab.java} | 4 ++-- .../java/com/refinedmods/refinedstorage/util/ColorMap.java | 2 +- 28 files changed, 30 insertions(+), 30 deletions(-) rename src/main/java/com/refinedmods/refinedstorage/item/group/{MainCreativeTab.java => MainCreativeModeTab.java} (83%) diff --git a/src/main/java/com/refinedmods/refinedstorage/RS.java b/src/main/java/com/refinedmods/refinedstorage/RS.java index 36fb4e0740..a6a48c1175 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RS.java +++ b/src/main/java/com/refinedmods/refinedstorage/RS.java @@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage.config.ServerConfig; import com.refinedmods.refinedstorage.datageneration.DataGenerators; import com.refinedmods.refinedstorage.integration.curios.CuriosIntegration; -import com.refinedmods.refinedstorage.item.group.MainCreativeTab; +import com.refinedmods.refinedstorage.item.group.MainCreativeModeTab; import com.refinedmods.refinedstorage.network.NetworkHandler; import com.refinedmods.refinedstorage.setup.ClientSetup; import com.refinedmods.refinedstorage.setup.CommonSetup; @@ -28,7 +28,7 @@ public final class RS { public static final String NAME = "Refined Storage"; public static final NetworkHandler NETWORK_HANDLER = new NetworkHandler(); - public static final CreativeModeTab CREATIVE_TAB = new MainCreativeTab(); + public static final CreativeModeTab CREATIVE_MODE_TAB = new MainCreativeModeTab(); public static final ServerConfig SERVER_CONFIG = new ServerConfig(); public static final ClientConfig CLIENT_CONFIG = new ClientConfig(); diff --git a/src/main/java/com/refinedmods/refinedstorage/RSItems.java b/src/main/java/com/refinedmods/refinedstorage/RSItems.java index 97ff6bf87e..b28a3b69c5 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RSItems.java +++ b/src/main/java/com/refinedmods/refinedstorage/RSItems.java @@ -207,7 +207,7 @@ private RSItems() { } private static RegistryObject registerBlockItemFor(RegistryObject block) { - return ITEMS.register(block.getId().getPath(), () -> new BaseBlockItem(block.get(), new Item.Properties().tab(RS.CREATIVE_TAB))); + return ITEMS.register(block.getId().getPath(), () -> new BaseBlockItem(block.get(), new Item.Properties().tab(RS.CREATIVE_MODE_TAB))); } public static void register() { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/CoreItem.java b/src/main/java/com/refinedmods/refinedstorage/item/CoreItem.java index 68913a948a..6105217a65 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/CoreItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/CoreItem.java @@ -5,7 +5,7 @@ public class CoreItem extends Item { public CoreItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); } public enum Type { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java b/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java index d79bf00efe..7980fe8b31 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java @@ -40,7 +40,7 @@ public class CoverItem extends Item { public CoverItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); } public static void setItem(ItemStack cover, ItemStack item) { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java b/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java index ea0a2291da..26cac855e0 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java @@ -41,7 +41,7 @@ public class FilterItem extends Item { private static final String NBT_TYPE = "Type"; public FilterItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB).stacksTo(1)); } public static int getCompare(ItemStack stack) { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/FluidStorageDiskItem.java b/src/main/java/com/refinedmods/refinedstorage/item/FluidStorageDiskItem.java index 3f68397eb6..3b5a9bc531 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/FluidStorageDiskItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/FluidStorageDiskItem.java @@ -35,7 +35,7 @@ public class FluidStorageDiskItem extends Item implements IStorageDiskProvider { private final FluidStorageType type; public FluidStorageDiskItem(FluidStorageType type) { - super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB).stacksTo(1)); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/FluidStoragePartItem.java b/src/main/java/com/refinedmods/refinedstorage/item/FluidStoragePartItem.java index 68185037a6..51871b5e06 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/FluidStoragePartItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/FluidStoragePartItem.java @@ -7,7 +7,7 @@ public class FluidStoragePartItem extends Item { public FluidStoragePartItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); } public static FluidStoragePartItem getByType(FluidStorageType type) { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/NetworkCardItem.java b/src/main/java/com/refinedmods/refinedstorage/item/NetworkCardItem.java index ddd00443e2..d43c2366e9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/NetworkCardItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/NetworkCardItem.java @@ -28,7 +28,7 @@ public class NetworkCardItem extends Item { private static final String NBT_DIMENSION = "Dimension"; public NetworkCardItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB).stacksTo(1)); } @Nullable diff --git a/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java b/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java index f69cbdb204..d21ab9c070 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java @@ -54,7 +54,7 @@ public class PatternItem extends Item implements ICraftingPatternProvider, IItem private static final int VERSION = 1; public PatternItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); } public static ICraftingPattern fromCache(Level level, ItemStack stack) { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/ProcessorBindingItem.java b/src/main/java/com/refinedmods/refinedstorage/item/ProcessorBindingItem.java index 9b2b8758c2..b2bccf9301 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/ProcessorBindingItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/ProcessorBindingItem.java @@ -5,6 +5,6 @@ public class ProcessorBindingItem extends Item { public ProcessorBindingItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/ProcessorItem.java b/src/main/java/com/refinedmods/refinedstorage/item/ProcessorItem.java index 85d802e7d4..21d7552808 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/ProcessorItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/ProcessorItem.java @@ -5,7 +5,7 @@ public class ProcessorItem extends Item { public ProcessorItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); } public enum Type { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/QuartzEnrichedIronItem.java b/src/main/java/com/refinedmods/refinedstorage/item/QuartzEnrichedIronItem.java index 35d22e888b..651ed842f7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/QuartzEnrichedIronItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/QuartzEnrichedIronItem.java @@ -5,6 +5,6 @@ public class QuartzEnrichedIronItem extends Item { public QuartzEnrichedIronItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/SecurityCardItem.java b/src/main/java/com/refinedmods/refinedstorage/item/SecurityCardItem.java index 01946ac84f..86129abe36 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/SecurityCardItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/SecurityCardItem.java @@ -25,7 +25,7 @@ public class SecurityCardItem extends Item { private static final String NBT_PERMISSION = "Permission_%d"; public SecurityCardItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB).stacksTo(1)); } @Nullable diff --git a/src/main/java/com/refinedmods/refinedstorage/item/SiliconItem.java b/src/main/java/com/refinedmods/refinedstorage/item/SiliconItem.java index 1b40d2540c..7a6cd5da61 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/SiliconItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/SiliconItem.java @@ -5,6 +5,6 @@ public class SiliconItem extends Item { public SiliconItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/StorageDiskItem.java b/src/main/java/com/refinedmods/refinedstorage/item/StorageDiskItem.java index 4737f41ba9..899e77239e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/StorageDiskItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/StorageDiskItem.java @@ -35,7 +35,7 @@ public class StorageDiskItem extends Item implements IStorageDiskProvider { private final ItemStorageType type; public StorageDiskItem(ItemStorageType type) { - super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB).stacksTo(1)); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/StorageHousingItem.java b/src/main/java/com/refinedmods/refinedstorage/item/StorageHousingItem.java index 91a9b723dc..1550f0f795 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/StorageHousingItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/StorageHousingItem.java @@ -5,6 +5,6 @@ public class StorageHousingItem extends Item { public StorageHousingItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/StoragePartItem.java b/src/main/java/com/refinedmods/refinedstorage/item/StoragePartItem.java index 4640a153a3..54b03627fa 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/StoragePartItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/StoragePartItem.java @@ -7,7 +7,7 @@ public class StoragePartItem extends Item { public StoragePartItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); } public static StoragePartItem getByType(ItemStorageType type) { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/UpgradeItem.java b/src/main/java/com/refinedmods/refinedstorage/item/UpgradeItem.java index 83558d83cd..f56418cca2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/UpgradeItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/UpgradeItem.java @@ -16,7 +16,7 @@ public class UpgradeItem extends Item { private final Type type; public UpgradeItem(Type type) { - super(new Item.Properties().tab(RS.CREATIVE_TAB)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/WirelessCraftingMonitorItem.java b/src/main/java/com/refinedmods/refinedstorage/item/WirelessCraftingMonitorItem.java index eec466b00d..d4fb89b97d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/WirelessCraftingMonitorItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/WirelessCraftingMonitorItem.java @@ -20,7 +20,7 @@ public class WirelessCraftingMonitorItem extends NetworkItem { private final Type type; public WirelessCraftingMonitorItem(Type type) { - super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessCraftingMonitor().getCapacity()); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessCraftingMonitor().getCapacity()); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/WirelessFluidGridItem.java b/src/main/java/com/refinedmods/refinedstorage/item/WirelessFluidGridItem.java index f61b613213..399af9f8dd 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/WirelessFluidGridItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/WirelessFluidGridItem.java @@ -17,7 +17,7 @@ public class WirelessFluidGridItem extends NetworkItem { private final Type type; public WirelessFluidGridItem(Type type) { - super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessFluidGrid().getCapacity()); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessFluidGrid().getCapacity()); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/WirelessGridItem.java b/src/main/java/com/refinedmods/refinedstorage/item/WirelessGridItem.java index 18e6f93ab2..e7804d81b2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/WirelessGridItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/WirelessGridItem.java @@ -17,7 +17,7 @@ public class WirelessGridItem extends NetworkItem { private final Type type; public WirelessGridItem(Type type) { - super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessGrid().getCapacity()); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getWirelessGrid().getCapacity()); this.type = type; } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java b/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java index 440ab635be..7caf14d656 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java @@ -18,7 +18,7 @@ public class WrenchItem extends Item { public WrenchItem() { - super(new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1)); + super(new Item.Properties().tab(RS.CREATIVE_MODE_TAB).stacksTo(1)); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/ControllerBlockItem.java b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/ControllerBlockItem.java index 920e0c08b5..4748f328f5 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/ControllerBlockItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/ControllerBlockItem.java @@ -14,7 +14,7 @@ public class ControllerBlockItem extends EnergyBlockItem { private final Component displayName; public ControllerBlockItem(ControllerBlock block, DyeColor color, Component displayName) { - super(block, new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), block.getType() == NetworkType.CREATIVE, () -> RS.SERVER_CONFIG.getController().getCapacity()); + super(block, new Item.Properties().tab(RS.CREATIVE_MODE_TAB).stacksTo(1), block.getType() == NetworkType.CREATIVE, () -> RS.SERVER_CONFIG.getController().getCapacity()); if (color != ColorMap.DEFAULT_COLOR) { this.displayName = new TranslatableComponent("color.minecraft." + color.getName()) diff --git a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/FluidStorageBlockItem.java b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/FluidStorageBlockItem.java index fff574ef2a..caf6dfd85e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/FluidStorageBlockItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/FluidStorageBlockItem.java @@ -35,7 +35,7 @@ public class FluidStorageBlockItem extends BaseBlockItem { private final FluidStorageType type; public FluidStorageBlockItem(FluidStorageBlock block) { - super(block, new Item.Properties().tab(RS.CREATIVE_TAB)); + super(block, new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); this.type = block.getType(); } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/PortableGridBlockItem.java b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/PortableGridBlockItem.java index c1f7449dcc..6accaa97bd 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/PortableGridBlockItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/PortableGridBlockItem.java @@ -29,7 +29,7 @@ public class PortableGridBlockItem extends EnergyBlockItem { public PortableGridBlockItem(Type type) { super( type == Type.CREATIVE ? RSBlocks.CREATIVE_PORTABLE_GRID.get() : RSBlocks.PORTABLE_GRID.get(), - new Item.Properties().tab(RS.CREATIVE_TAB).stacksTo(1), + new Item.Properties().tab(RS.CREATIVE_MODE_TAB).stacksTo(1), type == Type.CREATIVE, () -> RS.SERVER_CONFIG.getPortableGrid().getCapacity() ); diff --git a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/StorageBlockItem.java b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/StorageBlockItem.java index 0f8e8a6e9a..568cef7da5 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/StorageBlockItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/StorageBlockItem.java @@ -32,7 +32,7 @@ public class StorageBlockItem extends BaseBlockItem { private final ItemStorageType type; public StorageBlockItem(StorageBlock block) { - super(block, new Item.Properties().tab(RS.CREATIVE_TAB)); + super(block, new Item.Properties().tab(RS.CREATIVE_MODE_TAB)); this.type = block.getType(); } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/group/MainCreativeTab.java b/src/main/java/com/refinedmods/refinedstorage/item/group/MainCreativeModeTab.java similarity index 83% rename from src/main/java/com/refinedmods/refinedstorage/item/group/MainCreativeTab.java rename to src/main/java/com/refinedmods/refinedstorage/item/group/MainCreativeModeTab.java index 74e3e0d932..744ce510f3 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/group/MainCreativeTab.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/group/MainCreativeModeTab.java @@ -6,8 +6,8 @@ import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; -public class MainCreativeTab extends CreativeModeTab { - public MainCreativeTab() { +public class MainCreativeModeTab extends CreativeModeTab { + public MainCreativeModeTab() { super(RS.ID); } diff --git a/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java b/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java index 4fb9d7f6f1..4884cd8d5c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java +++ b/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java @@ -95,7 +95,7 @@ private RegistryObject registerBlockItemFor(RegistryObj block.getId().getPath(), () -> new ColoredBlockItem( block.get(), - new Item.Properties().tab(RS.CREATIVE_TAB), + new Item.Properties().tab(RS.CREATIVE_MODE_TAB), color, BlockUtils.getBlockTranslation(translationBlock.get()) ) From aaa63cd51917d706a7c96731433e03133c0b08cf Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Tue, 28 Dec 2021 22:25:50 +0100 Subject: [PATCH 09/10] Fix client crashes when starting the game. Fixes #3190 --- .../refinedstorage/setup/ClientSetup.java | 121 ++++++++++-------- 1 file changed, 65 insertions(+), 56 deletions(-) diff --git a/src/main/java/com/refinedmods/refinedstorage/setup/ClientSetup.java b/src/main/java/com/refinedmods/refinedstorage/setup/ClientSetup.java index 30174fded4..88291376b4 100644 --- a/src/main/java/com/refinedmods/refinedstorage/setup/ClientSetup.java +++ b/src/main/java/com/refinedmods/refinedstorage/setup/ClientSetup.java @@ -79,30 +79,33 @@ public static void onClientSetup(FMLClientSetupEvent e) { registerBakedModelOverrides(); registerPatternRenderHandlers(); - MenuScreens.register(RSContainerMenus.FILTER, FilterScreen::new); - MenuScreens.register(RSContainerMenus.CONTROLLER, ControllerScreen::new); - MenuScreens.register(RSContainerMenus.DISK_DRIVE, DiskDriveScreen::new); - MenuScreens.register(RSContainerMenus.GRID, new GridScreenFactory()); - MenuScreens.register(RSContainerMenus.STORAGE_BLOCK, StorageBlockScreen::new); - MenuScreens.register(RSContainerMenus.FLUID_STORAGE_BLOCK, FluidStorageBlockScreen::new); - MenuScreens.register(RSContainerMenus.EXTERNAL_STORAGE, ExternalStorageScreen::new); - MenuScreens.register(RSContainerMenus.IMPORTER, ImporterScreen::new); - MenuScreens.register(RSContainerMenus.EXPORTER, ExporterScreen::new); - MenuScreens.register(RSContainerMenus.NETWORK_TRANSMITTER, NetworkTransmitterScreen::new); - MenuScreens.register(RSContainerMenus.RELAY, RelayScreen::new); - MenuScreens.register(RSContainerMenus.DETECTOR, DetectorScreen::new); - MenuScreens.register(RSContainerMenus.SECURITY_MANAGER, SecurityManagerScreen::new); - MenuScreens.register(RSContainerMenus.INTERFACE, InterfaceScreen::new); - MenuScreens.register(RSContainerMenus.FLUID_INTERFACE, FluidInterfaceScreen::new); - MenuScreens.register(RSContainerMenus.WIRELESS_TRANSMITTER, WirelessTransmitterScreen::new); - MenuScreens.register(RSContainerMenus.STORAGE_MONITOR, StorageMonitorScreen::new); - MenuScreens.register(RSContainerMenus.CONSTRUCTOR, ConstructorScreen::new); - MenuScreens.register(RSContainerMenus.DESTRUCTOR, DestructorScreen::new); - MenuScreens.register(RSContainerMenus.DISK_MANIPULATOR, DiskManipulatorScreen::new); - MenuScreens.register(RSContainerMenus.CRAFTER, CrafterScreen::new); - MenuScreens.register(RSContainerMenus.CRAFTER_MANAGER, new CrafterManagerScreenFactory()); - MenuScreens.register(RSContainerMenus.CRAFTING_MONITOR, CraftingMonitorScreen::new); - MenuScreens.register(RSContainerMenus.WIRELESS_CRAFTING_MONITOR, CraftingMonitorScreen::new); + // MenuScreens isn't thread safe + e.enqueueWork(() -> { + MenuScreens.register(RSContainerMenus.FILTER, FilterScreen::new); + MenuScreens.register(RSContainerMenus.CONTROLLER, ControllerScreen::new); + MenuScreens.register(RSContainerMenus.DISK_DRIVE, DiskDriveScreen::new); + MenuScreens.register(RSContainerMenus.GRID, new GridScreenFactory()); + MenuScreens.register(RSContainerMenus.STORAGE_BLOCK, StorageBlockScreen::new); + MenuScreens.register(RSContainerMenus.FLUID_STORAGE_BLOCK, FluidStorageBlockScreen::new); + MenuScreens.register(RSContainerMenus.EXTERNAL_STORAGE, ExternalStorageScreen::new); + MenuScreens.register(RSContainerMenus.IMPORTER, ImporterScreen::new); + MenuScreens.register(RSContainerMenus.EXPORTER, ExporterScreen::new); + MenuScreens.register(RSContainerMenus.NETWORK_TRANSMITTER, NetworkTransmitterScreen::new); + MenuScreens.register(RSContainerMenus.RELAY, RelayScreen::new); + MenuScreens.register(RSContainerMenus.DETECTOR, DetectorScreen::new); + MenuScreens.register(RSContainerMenus.SECURITY_MANAGER, SecurityManagerScreen::new); + MenuScreens.register(RSContainerMenus.INTERFACE, InterfaceScreen::new); + MenuScreens.register(RSContainerMenus.FLUID_INTERFACE, FluidInterfaceScreen::new); + MenuScreens.register(RSContainerMenus.WIRELESS_TRANSMITTER, WirelessTransmitterScreen::new); + MenuScreens.register(RSContainerMenus.STORAGE_MONITOR, StorageMonitorScreen::new); + MenuScreens.register(RSContainerMenus.CONSTRUCTOR, ConstructorScreen::new); + MenuScreens.register(RSContainerMenus.DESTRUCTOR, DestructorScreen::new); + MenuScreens.register(RSContainerMenus.DISK_MANIPULATOR, DiskManipulatorScreen::new); + MenuScreens.register(RSContainerMenus.CRAFTER, CrafterScreen::new); + MenuScreens.register(RSContainerMenus.CRAFTER_MANAGER, new CrafterManagerScreenFactory()); + MenuScreens.register(RSContainerMenus.CRAFTING_MONITOR, CraftingMonitorScreen::new); + MenuScreens.register(RSContainerMenus.WIRELESS_CRAFTING_MONITOR, CraftingMonitorScreen::new); + }); ClientRegistry.registerKeyBinding(RSKeyBindings.FOCUS_SEARCH_BAR); ClientRegistry.registerKeyBinding(RSKeyBindings.CLEAR_GRID_CRAFTING_MATRIX); @@ -111,46 +114,52 @@ public static void onClientSetup(FMLClientSetupEvent e) { ClientRegistry.registerKeyBinding(RSKeyBindings.OPEN_WIRELESS_CRAFTING_MONITOR); ClientRegistry.registerKeyBinding(RSKeyBindings.OPEN_PORTABLE_GRID); - RSBlocks.CONTROLLER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.CREATIVE_CONTROLLER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.CRAFTER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.CRAFTER_MANAGER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.CRAFTING_MONITOR.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.DETECTOR.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.DISK_MANIPULATOR.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.GRID.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.CRAFTING_GRID.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.PATTERN_GRID.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.FLUID_GRID.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.NETWORK_RECEIVER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.NETWORK_TRANSMITTER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.RELAY.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.SECURITY_MANAGER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - RSBlocks.WIRELESS_TRANSMITTER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); - ItemBlockRenderTypes.setRenderLayer(RSBlocks.CABLE.get(), RenderType.cutout()); - ItemBlockRenderTypes.setRenderLayer(RSBlocks.IMPORTER.get(), RenderType.cutout()); - ItemBlockRenderTypes.setRenderLayer(RSBlocks.EXPORTER.get(), RenderType.cutout()); - ItemBlockRenderTypes.setRenderLayer(RSBlocks.EXTERNAL_STORAGE.get(), RenderType.cutout()); - ItemBlockRenderTypes.setRenderLayer(RSBlocks.CONSTRUCTOR.get(), RenderType.cutout()); - ItemBlockRenderTypes.setRenderLayer(RSBlocks.DESTRUCTOR.get(), RenderType.cutout()); + // RenderLayer isn't thread safe + e.enqueueWork(() -> { + RSBlocks.CONTROLLER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.CREATIVE_CONTROLLER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.CRAFTER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.CRAFTER_MANAGER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.CRAFTING_MONITOR.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.DETECTOR.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.DISK_MANIPULATOR.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.GRID.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.CRAFTING_GRID.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.PATTERN_GRID.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.FLUID_GRID.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.NETWORK_RECEIVER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.NETWORK_TRANSMITTER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.RELAY.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.SECURITY_MANAGER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + RSBlocks.WIRELESS_TRANSMITTER.values().forEach(block -> ItemBlockRenderTypes.setRenderLayer(block.get(), RenderType.cutout())); + ItemBlockRenderTypes.setRenderLayer(RSBlocks.CABLE.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(RSBlocks.IMPORTER.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(RSBlocks.EXPORTER.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(RSBlocks.EXTERNAL_STORAGE.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(RSBlocks.CONSTRUCTOR.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(RSBlocks.DESTRUCTOR.get(), RenderType.cutout()); + }); BlockEntityRenderers.register(RSBlockEntities.STORAGE_MONITOR, ctx -> new StorageMonitorBlockEntityRenderer()); - Minecraft.getInstance().getItemColors().register(new PatternItemColor(), RSItems.PATTERN.get()); + // ItemProperties isn't thread safe + e.enqueueWork(() -> { + Minecraft.getInstance().getItemColors().register(new PatternItemColor(), RSItems.PATTERN.get()); - ItemProperties.register(RSItems.SECURITY_CARD.get(), new ResourceLocation("active"), new SecurityCardItemPropertyGetter()); + ItemProperties.register(RSItems.SECURITY_CARD.get(), new ResourceLocation("active"), new SecurityCardItemPropertyGetter()); - RSItems.CONTROLLER.values().forEach(controller -> ItemProperties.register(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter())); - RSItems.CREATIVE_CONTROLLER.values().forEach(controller -> ItemProperties.register(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter())); + RSItems.CONTROLLER.values().forEach(controller -> ItemProperties.register(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter())); + RSItems.CREATIVE_CONTROLLER.values().forEach(controller -> ItemProperties.register(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter())); - ItemProperties.register(RSItems.WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter()); - ItemProperties.register(RSItems.CREATIVE_WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter()); + ItemProperties.register(RSItems.WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter()); + ItemProperties.register(RSItems.CREATIVE_WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter()); - ItemProperties.register(RSItems.WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); - ItemProperties.register(RSItems.CREATIVE_WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); + ItemProperties.register(RSItems.WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); + ItemProperties.register(RSItems.CREATIVE_WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); - ItemProperties.register(RSItems.WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); - ItemProperties.register(RSItems.CREATIVE_WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); + ItemProperties.register(RSItems.WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); + ItemProperties.register(RSItems.CREATIVE_WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter()); + }); } private static void registerPatternRenderHandlers() { From 6cdb16a4cd9479a877e61ae2a1fdf8dd06448f66 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Tue, 28 Dec 2021 22:28:00 +0100 Subject: [PATCH 10/10] Update changelog --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 632b66e482..40a3e352f6 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,19 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed + +- Fixed client crash when hovering over a fluid in the Fluid Grid by [@jackodsteel](https://github.com/jackodsteel). +- Fixed random client crashes when starting the game. + +### Changed + +- Update Korean translation by [@mindy15963](https://github.com/mindy15963). + ## [v1.10.0-beta.3] - 2021-12-17 ### Fixed + - Fixed networks and network devices being removed when a chunk unloads. ## [v1.10.0-beta.2] - 2021-12-16