Merge remote-tracking branch 'origin/1.21.1' into 1.21.1
# Conflicts: # src/main/java/com/drmangotea/tfmg/content/decoration/pipes/TFMGPipes.java
This commit is contained in:
1090
ru_ru.json
Normal file
1090
ru_ru.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -72,11 +72,11 @@ public class SegmentedDisplayBlockEntity extends ElectricBlockEntity {
|
|||||||
customText = Optional.empty();
|
customText = Optional.empty();
|
||||||
}
|
}
|
||||||
public List<Integer> getSegments(){
|
public List<Integer> getSegments(){
|
||||||
List<Integer> segments = SegmentedDisplayRenderer.SYMBOLS_TO_SEGMENTS.get(getDisplayedStrings().get(true).toLowerCase());
|
List<Integer> segments = SegmentedDisplaySegments.SYMBOLS_TO_SEGMENTS.get(getDisplayedStrings().get(true).toLowerCase());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<Integer> segments2 = SegmentedDisplayRenderer.SYMBOLS_TO_SEGMENTS.get(getDisplayedStrings().get(false).toLowerCase());
|
List<Integer> segments2 = SegmentedDisplaySegments.SYMBOLS_TO_SEGMENTS.get(getDisplayedStrings().get(false).toLowerCase());
|
||||||
|
|
||||||
if(segments2 == null)
|
if(segments2 == null)
|
||||||
segments2 = new ArrayList<>();
|
segments2 = new ArrayList<>();
|
||||||
|
|||||||
@@ -60,74 +60,7 @@ public class SegmentedDisplayRenderer extends SafeBlockEntityRenderer<SegmentedD
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static Map<String, List<Integer>> SYMBOLS_TO_SEGMENTS= new HashMap<>();
|
|
||||||
static {
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
put(0,1,2,3,5,6,7);
|
|
||||||
put(1,1,2);
|
|
||||||
put(2,3,6,4,2,5);
|
|
||||||
put(3,3,4,5,6,7);
|
|
||||||
put(4,1,4,6,7);
|
|
||||||
put(5,1,3,4,5,7);
|
|
||||||
put(6,1,2,3,4,5,7);
|
|
||||||
put(7,7,6,3);
|
|
||||||
put(8,1,2,3,4,5,6,7);
|
|
||||||
put(9,1,3,4,6,7);
|
|
||||||
|
|
||||||
put(":",0);
|
|
||||||
|
|
||||||
put("a",1,2,3,4,6,7);
|
|
||||||
put("b",1,2,4,5,7);
|
|
||||||
put("c",1,2,3,5);
|
|
||||||
put("d",2,4,5,6,7);
|
|
||||||
put("e",1,2,3,4,5);
|
|
||||||
put("f",1,2,3,4);
|
|
||||||
put("g",1,2,3,5,7);
|
|
||||||
put("h",1,2,4,6,7);
|
|
||||||
put("i",1,2);
|
|
||||||
put("j",6,7,5,2);
|
|
||||||
put("k",1,2,9,10);
|
|
||||||
put("l",1,2,5);
|
|
||||||
put("m",1,2,6,7,8);
|
|
||||||
put("n",2,7,10);
|
|
||||||
put("o",1,2,6,7,3,5);
|
|
||||||
put("p",1,2,3,4,6);
|
|
||||||
put("q",1,3,4,6,7);
|
|
||||||
put("r",1,2,3,4,6,10);
|
|
||||||
put("s",1,3,4,5,7);
|
|
||||||
put("t",1,2,4,5);
|
|
||||||
put("u",2,5,7);
|
|
||||||
put("v",1,2,5,6,7);
|
|
||||||
put("w",1,2,4,5,6,7);
|
|
||||||
put("x",1,2,4,6,7);
|
|
||||||
put("y",1,4,6,7,5);
|
|
||||||
put("z",3,9,4);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
public static void put(int number, Integer... segments){
|
|
||||||
put(String.valueOf(number),segments);
|
|
||||||
}
|
|
||||||
private static void put(String string, Integer... segments){
|
|
||||||
|
|
||||||
SYMBOLS_TO_SEGMENTS.put(string, Arrays.asList(segments));
|
|
||||||
|
|
||||||
List<Integer> segments2 = new ArrayList<>();
|
|
||||||
|
|
||||||
for (Integer segment : segments){
|
|
||||||
|
|
||||||
if(segment == 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
segments2.add(10+segment);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SYMBOLS_TO_SEGMENTS.put(string, segments2);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.drmangotea.tfmg.content.electricity.utilities.segmented_display;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
public class SegmentedDisplaySegments {
|
||||||
|
public static Map<String, List<Integer>> SYMBOLS_TO_SEGMENTS= new HashMap<>();
|
||||||
|
static {
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
put(0,1,2,3,5,6,7);
|
||||||
|
put(1,1,2);
|
||||||
|
put(2,3,6,4,2,5);
|
||||||
|
put(3,3,4,5,6,7);
|
||||||
|
put(4,1,4,6,7);
|
||||||
|
put(5,1,3,4,5,7);
|
||||||
|
put(6,1,2,3,4,5,7);
|
||||||
|
put(7,7,6,3);
|
||||||
|
put(8,1,2,3,4,5,6,7);
|
||||||
|
put(9,1,3,4,6,7);
|
||||||
|
|
||||||
|
put(":",0);
|
||||||
|
|
||||||
|
put("a",1,2,3,4,6,7);
|
||||||
|
put("b",1,2,4,5,7);
|
||||||
|
put("c",1,2,3,5);
|
||||||
|
put("d",2,4,5,6,7);
|
||||||
|
put("e",1,2,3,4,5);
|
||||||
|
put("f",1,2,3,4);
|
||||||
|
put("g",1,2,3,5,7);
|
||||||
|
put("h",1,2,4,6,7);
|
||||||
|
put("i",1,2);
|
||||||
|
put("j",6,7,5,2);
|
||||||
|
put("k",1,2,9,10);
|
||||||
|
put("l",1,2,5);
|
||||||
|
put("m",1,2,6,7,8);
|
||||||
|
put("n",2,7,10);
|
||||||
|
put("o",1,2,6,7,3,5);
|
||||||
|
put("p",1,2,3,4,6);
|
||||||
|
put("q",1,3,4,6,7);
|
||||||
|
put("r",1,2,3,4,6,10);
|
||||||
|
put("s",1,3,4,5,7);
|
||||||
|
put("t",1,2,4,5);
|
||||||
|
put("u",2,5,7);
|
||||||
|
put("v",1,2,5,6,7);
|
||||||
|
put("w",1,2,4,5,6,7);
|
||||||
|
put("x",1,2,4,6,7);
|
||||||
|
put("y",1,4,6,7,5);
|
||||||
|
put("z",3,9,4);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
public static void put(int number, Integer... segments){
|
||||||
|
put(String.valueOf(number),segments);
|
||||||
|
}
|
||||||
|
private static void put(String string, Integer... segments){
|
||||||
|
|
||||||
|
SYMBOLS_TO_SEGMENTS.put(string, Arrays.asList(segments));
|
||||||
|
|
||||||
|
List<Integer> segments2 = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Integer segment : segments){
|
||||||
|
|
||||||
|
if(segment == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
segments2.add(10+segment);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SYMBOLS_TO_SEGMENTS.put(string, segments2);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.drmangotea.tfmg.content.items;
|
package com.drmangotea.tfmg.content.items;
|
||||||
|
|
||||||
import com.drmangotea.tfmg.content.decoration.pipes.TFMGPipeBlockEntity;
|
import com.drmangotea.tfmg.content.decoration.pipes.TFMGPipeBlockEntity;
|
||||||
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.InteractionResult;
|
import net.minecraft.world.InteractionResult;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
@@ -24,17 +23,13 @@ public class ScrewdriverItem extends Item {
|
|||||||
|
|
||||||
Level level = pContext.getLevel();
|
Level level = pContext.getLevel();
|
||||||
|
|
||||||
if(level.getBlockEntity(positionClicked) instanceof AbstractEngineBlockEntity){
|
if (level.getBlockEntity(positionClicked) != null && level.getBlockEntity(positionClicked) instanceof TFMGPipeBlockEntity pipeBlockEntity) {
|
||||||
|
pipeBlockEntity.toggleLock(player);
|
||||||
|
|
||||||
|
|
||||||
return super.useOn(pContext);
|
|
||||||
}
|
|
||||||
if(level.getBlockEntity(positionClicked)!=null) {
|
|
||||||
((TFMGPipeBlockEntity) level.getBlockEntity(positionClicked)).toggleLock(player);
|
|
||||||
pContext.getItemInHand().hurtAndBreak(1, pContext.getPlayer(),
|
pContext.getItemInHand().hurtAndBreak(1, pContext.getPlayer(),
|
||||||
LivingEntity.getSlotForHand(pContext.getHand()));
|
LivingEntity.getSlotForHand(pContext.getHand()));
|
||||||
|
return InteractionResult.SUCCESS;
|
||||||
|
} else {
|
||||||
|
return super.useOn(pContext);
|
||||||
}
|
}
|
||||||
return InteractionResult.SUCCESS;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -350,6 +350,10 @@ public class BlastStoveBlockEntity extends FluidTankBlockEntity implements IHave
|
|||||||
@SuppressWarnings("removal")
|
@SuppressWarnings("removal")
|
||||||
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||||
|
|
||||||
|
if (getControllerBE() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
LangBuilder mb = CreateLang.translate("generic.unit.millibuckets");
|
LangBuilder mb = CreateLang.translate("generic.unit.millibuckets");
|
||||||
|
|
||||||
TFMGTexts.header("blast_stove").forGoggles(tooltip);
|
TFMGTexts.header("blast_stove").forGoggles(tooltip);
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import com.simibubi.create.Create;
|
|||||||
import com.simibubi.create.content.kinetics.crank.ValveHandleBlock;
|
import com.simibubi.create.content.kinetics.crank.ValveHandleBlock;
|
||||||
import com.simibubi.create.content.logistics.packagePort.postbox.PostboxBlock;
|
import com.simibubi.create.content.logistics.packagePort.postbox.PostboxBlock;
|
||||||
import com.simibubi.create.content.logistics.tableCloth.TableClothBlock;
|
import com.simibubi.create.content.logistics.tableCloth.TableClothBlock;
|
||||||
import com.simibubi.create.foundation.ponder.PonderWorldBlockEntityFix;
|
|
||||||
import com.simibubi.create.infrastructure.ponder.AllCreatePonderScenes;
|
import com.simibubi.create.infrastructure.ponder.AllCreatePonderScenes;
|
||||||
import com.simibubi.create.infrastructure.ponder.AllCreatePonderTags;
|
import com.simibubi.create.infrastructure.ponder.AllCreatePonderTags;
|
||||||
import net.createmod.ponder.api.level.PonderLevel;
|
import net.createmod.ponder.api.level.PonderLevel;
|
||||||
@@ -42,11 +41,4 @@ public class TFMGPonderPlugin implements PonderPlugin {
|
|||||||
helper.registerSharedText("behaviour_modify_value_panel", "This behaviour can be modified using the value panel");
|
helper.registerSharedText("behaviour_modify_value_panel", "This behaviour can be modified using the value panel");
|
||||||
helper.registerSharedText("storage_on_contraption", "Inventories attached to the Contraption will pick up their drops automatically");
|
helper.registerSharedText("storage_on_contraption", "Inventories attached to the Contraption will pick up their drops automatically");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPonderLevelRestore(PonderLevel ponderLevel) {
|
|
||||||
PonderWorldBlockEntityFix.fixControllerBlockEntities(ponderLevel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user