Update Forge

This commit is contained in:
raoulvdberge
2021-06-13 11:26:30 +02:00
parent 884610100e
commit c2adba68c0
41 changed files with 150 additions and 146 deletions

View File

@@ -26,7 +26,7 @@ public class NetworkNodeGraphEntry implements INetworkNodeGraphEntry {
NetworkNodeGraphEntry otherItem = (NetworkNodeGraphEntry) other;
if (node.getWorld().func_234923_W_() != otherItem.node.getWorld().func_234923_W_()) {
if (node.getWorld().getDimensionKey() != otherItem.node.getWorld().getDimensionKey()) {
return false;
}
@@ -36,7 +36,7 @@ public class NetworkNodeGraphEntry implements INetworkNodeGraphEntry {
@Override
public int hashCode() {
int result = node.getPos().hashCode();
result = 31 * result + node.getWorld().func_234923_W_().hashCode();
result = 31 * result + node.getWorld().getDimensionKey().hashCode();
return result;
}
}

View File

@@ -33,7 +33,7 @@ public class NetworkItemManager implements INetworkItemManager {
if (node instanceof IWirelessTransmitter &&
network.canRun() &&
node.isActive() &&
((IWirelessTransmitter) node).getDimension() == player.getEntityWorld().func_234923_W_()) {
((IWirelessTransmitter) node).getDimension() == player.getEntityWorld().getDimensionKey()) {
IWirelessTransmitter transmitter = (IWirelessTransmitter) node;
Vector3d pos = player.getPositionVec();

View File

@@ -194,7 +194,7 @@ public class CrafterNetworkNode extends NetworkNode implements ICraftingPatternC
StackUtils.readItems(upgrades, 1, tag);
if (tag.contains(NBT_DISPLAY_NAME)) {
displayName = ITextComponent.Serializer.func_240643_a_(tag.getString(NBT_DISPLAY_NAME));
displayName = ITextComponent.Serializer.getComponentFromJson(tag.getString(NBT_DISPLAY_NAME));
}
if (tag.hasUniqueId(NBT_UUID)) {

View File

@@ -98,7 +98,7 @@ public class NetworkTransmitterNetworkNode extends NetworkNode {
}
public boolean isSameDimension() {
return world.func_234923_W_() == receiverDimension;
return world.getDimensionKey() == receiverDimension;
}
private boolean canTransmit() {

View File

@@ -62,7 +62,7 @@ public class WirelessTransmitterNetworkNode extends NetworkNode implements IWire
@Override
public RegistryKey<World> getDimension() {
return world.func_234923_W_();
return world.getDimensionKey();
}
public BaseItemHandler getUpgrades() {

View File

@@ -35,7 +35,7 @@ public abstract class RSWorldSavedData extends WorldSavedData {
compoundnbt.putInt("DataVersion", SharedConstants.getVersion().getWorldVersion());
try {
CompressedStreamTools.func_244264_a(compoundnbt, tempFile);
CompressedStreamTools.writeCompressed(compoundnbt, tempFile);
if (fileIn.exists()) {
if (!fileIn.delete()) {
LOGGER.error("Failed To delete " + fileIn.getName());

View File

@@ -70,7 +70,7 @@ public class ListNetworkCommand implements Command<CommandSource> {
listItem.network.getPosition().getZ()
)
.appendString(" [")
.append(new TranslationTextComponent(
.appendSibling(new TranslationTextComponent(
"commands.refinedstorage.network.list.tick_times",
new StringTextComponent(TIME_FORMATTER.format(listItem.tickTime)).setStyle(Styles.YELLOW),
new StringTextComponent(TIME_FORMATTER.format(listItem.tps)).setStyle(Styles.YELLOW)

View File

@@ -26,11 +26,11 @@ public class ListAutocraftingCommand extends NetworkCommand {
public static void addInfo(CommandContext<CommandSource> context, ICraftingTask task) {
context.getSource().sendFeedback(
new StringTextComponent(getAmount(task.getRequested()) + "x ")
.append(getName(task.getRequested()).deepCopy().setStyle(Styles.YELLOW))
.appendSibling(getName(task.getRequested()).deepCopy().setStyle(Styles.YELLOW))
.appendString(" ")
.appendString("(" + task.getCompletionPercentage() + "%)")
.appendString(" ")
.append(new StringTextComponent("[" + task.getId().toString() + "]").setStyle(Styles.GRAY)),
.appendSibling(new StringTextComponent("[" + task.getId().toString() + "]").setStyle(Styles.GRAY)),
false
);
}

View File

@@ -32,14 +32,14 @@ public class PatternDumpCommand implements Command<CommandSource> {
ICraftingPattern pattern = PatternItem.fromCache(context.getSource().getWorld(), stack);
context.getSource().sendFeedback(new StringTextComponent("Crafting task factory ID: ").setStyle(Styles.YELLOW).append(new StringTextComponent(pattern.getCraftingTaskFactoryId().toString()).setStyle(Styles.WHITE)), false);
context.getSource().sendFeedback(new StringTextComponent("Crafting task factory ID: ").setStyle(Styles.YELLOW).appendSibling(new StringTextComponent(pattern.getCraftingTaskFactoryId().toString()).setStyle(Styles.WHITE)), false);
if (!pattern.isValid()) {
context.getSource().sendErrorMessage(new StringTextComponent("Pattern is invalid! Reason: ").append(pattern.getErrorMessage()));
context.getSource().sendErrorMessage(new StringTextComponent("Pattern is invalid! Reason: ").appendSibling(pattern.getErrorMessage()));
} else {
context.getSource().sendFeedback(new StringTextComponent("Processing: ").setStyle(Styles.YELLOW).append(new StringTextComponent(String.valueOf(processing)).setStyle(Styles.WHITE)), false);
context.getSource().sendFeedback(new StringTextComponent("Exact: ").setStyle(Styles.YELLOW).append(new StringTextComponent(String.valueOf(exact)).setStyle(Styles.WHITE)), false);
context.getSource().sendFeedback(new StringTextComponent("Has allowed tag list: ").setStyle(Styles.YELLOW).append(new StringTextComponent(String.valueOf(allowedTagList != null)).setStyle(Styles.WHITE)), false);
context.getSource().sendFeedback(new StringTextComponent("Processing: ").setStyle(Styles.YELLOW).appendSibling(new StringTextComponent(String.valueOf(processing)).setStyle(Styles.WHITE)), false);
context.getSource().sendFeedback(new StringTextComponent("Exact: ").setStyle(Styles.YELLOW).appendSibling(new StringTextComponent(String.valueOf(exact)).setStyle(Styles.WHITE)), false);
context.getSource().sendFeedback(new StringTextComponent("Has allowed tag list: ").setStyle(Styles.YELLOW).appendSibling(new StringTextComponent(String.valueOf(allowedTagList != null)).setStyle(Styles.WHITE)), false);
if (pattern.isProcessing()) {
for (int i = 0; i < pattern.getInputs().size(); ++i) {
@@ -47,7 +47,7 @@ public class PatternDumpCommand implements Command<CommandSource> {
context.getSource().sendFeedback(new StringTextComponent("Item inputs in slot " + i + ":").setStyle(Styles.YELLOW), false);
for (int j = 0; j < pattern.getInputs().get(i).size(); ++j) {
context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getInputs().get(i).get(j).getCount() + "x ").append(pattern.getInputs().get(i).get(j).getDisplayName()), false);
context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getInputs().get(i).get(j).getCount() + "x ").appendSibling(pattern.getInputs().get(i).get(j).getDisplayName()), false);
}
}
@@ -63,7 +63,7 @@ public class PatternDumpCommand implements Command<CommandSource> {
context.getSource().sendFeedback(new StringTextComponent("Fluid inputs in slot " + i + ":").setStyle(Styles.YELLOW), false);
for (int j = 0; j < pattern.getFluidInputs().get(i).size(); ++j) {
context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getFluidInputs().get(i).get(j).getAmount() + " mB ").append(pattern.getFluidInputs().get(i).get(j).getDisplayName()), false);
context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getFluidInputs().get(i).get(j).getAmount() + " mB ").appendSibling(pattern.getFluidInputs().get(i).get(j).getDisplayName()), false);
}
}
@@ -76,12 +76,12 @@ public class PatternDumpCommand implements Command<CommandSource> {
context.getSource().sendFeedback(new StringTextComponent("Outputs").setStyle(Styles.YELLOW), false);
for (ItemStack output : pattern.getOutputs()) {
context.getSource().sendFeedback(new StringTextComponent("- " + output.getCount() + "x ").append(output.getDisplayName()), false);
context.getSource().sendFeedback(new StringTextComponent("- " + output.getCount() + "x ").appendSibling(output.getDisplayName()), false);
}
context.getSource().sendFeedback(new StringTextComponent("Fluid outputs").setStyle(Styles.YELLOW), false);
for (FluidStack output : pattern.getFluidOutputs()) {
context.getSource().sendFeedback(new StringTextComponent("- " + output.getAmount() + " mB ").append(output.getDisplayName()), false);
context.getSource().sendFeedback(new StringTextComponent("- " + output.getAmount() + " mB ").appendSibling(output.getDisplayName()), false);
}
} else {
for (int i = 0; i < pattern.getInputs().size(); ++i) {
@@ -89,14 +89,14 @@ public class PatternDumpCommand implements Command<CommandSource> {
context.getSource().sendFeedback(new StringTextComponent("Inputs in slot " + i + ":").setStyle(Styles.YELLOW), false);
for (int j = 0; j < pattern.getInputs().get(i).size(); ++j) {
context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getInputs().get(i).get(j).getCount() + "x ").append(pattern.getInputs().get(i).get(j).getDisplayName()), false);
context.getSource().sendFeedback(new StringTextComponent("- Possibility #" + j + ": " + pattern.getInputs().get(i).get(j).getCount() + "x ").appendSibling(pattern.getInputs().get(i).get(j).getDisplayName()), false);
}
}
}
context.getSource().sendFeedback(new StringTextComponent("Outputs").setStyle(Styles.YELLOW), false);
for (ItemStack output : pattern.getOutputs()) {
context.getSource().sendFeedback(new StringTextComponent("- " + output.getCount() + "x ").append(output.getDisplayName()), false);
context.getSource().sendFeedback(new StringTextComponent("- " + output.getCount() + "x ").appendSibling(output.getDisplayName()), false);
}
boolean anyByproducts = false;
@@ -109,7 +109,7 @@ public class PatternDumpCommand implements Command<CommandSource> {
anyByproducts = true;
}
context.getSource().sendFeedback(new StringTextComponent("- " + byproduct.getCount() + "x ").append(byproduct.getDisplayName()), false);
context.getSource().sendFeedback(new StringTextComponent("- " + byproduct.getCount() + "x ").appendSibling(byproduct.getDisplayName()), false);
}
}
}

View File

@@ -41,7 +41,7 @@ public class NetworkCardItem extends Item {
tag.putInt(NBT_RECEIVER_X, ctx.getPos().getX());
tag.putInt(NBT_RECEIVER_Y, ctx.getPos().getY());
tag.putInt(NBT_RECEIVER_Z, ctx.getPos().getZ());
tag.putString(NBT_DIMENSION, ctx.getWorld().func_234923_W_().func_240901_a_().toString());
tag.putString(NBT_DIMENSION, ctx.getWorld().getDimensionKey().getLocation().toString());
ctx.getPlayer().getHeldItem(ctx.getHand()).setTag(tag);
@@ -64,7 +64,7 @@ public class NetworkCardItem extends Item {
pos.getX(),
pos.getY(),
pos.getZ(),
type.func_240901_a_().toString()
type.getLocation().toString()
).setStyle(Styles.GRAY));
}
}
@@ -93,7 +93,7 @@ public class NetworkCardItem extends Item {
return null;
}
return RegistryKey.func_240903_a_(Registry.WORLD_KEY, name);
return RegistryKey.getOrCreateKey(Registry.WORLD_KEY, name);
}
return null;

View File

@@ -97,7 +97,7 @@ public abstract class NetworkItem extends EnergyItem implements INetworkItemProv
tag.putInt(NBT_NODE_X, network.getPosition().getX());
tag.putInt(NBT_NODE_Y, network.getPosition().getY());
tag.putInt(NBT_NODE_Z, network.getPosition().getZ());
tag.putString(NBT_DIMENSION, ctx.getWorld().func_234923_W_().func_240901_a_().toString());
tag.putString(NBT_DIMENSION, ctx.getWorld().getDimensionKey().getLocation().toString());
stack.setTag(tag);
@@ -115,7 +115,7 @@ public abstract class NetworkItem extends EnergyItem implements INetworkItemProv
return null;
}
return RegistryKey.func_240903_a_(Registry.WORLD_KEY, name);
return RegistryKey.getOrCreateKey(Registry.WORLD_KEY, name);
}
return null;

View File

@@ -83,7 +83,7 @@ public class SecurityCardItem extends Item {
for (Permission permission : Permission.values()) {
if (hasPermission(stack, permission)) {
tooltip.add(new StringTextComponent("- ").append(new TranslationTextComponent("gui.refinedstorage.security_manager.permission." + permission.getId())).setStyle(Styles.GRAY));
tooltip.add(new StringTextComponent("- ").appendSibling(new TranslationTextComponent("gui.refinedstorage.security_manager.permission." + permission.getId())).setStyle(Styles.GRAY));
}
}
}

View File

@@ -92,7 +92,7 @@ public class UpgradeItem extends Item {
tooltip.add(
new TranslationTextComponent("enchantment.minecraft.fortune")
.appendString(" ")
.append(new TranslationTextComponent("enchantment.level." + type.getFortuneLevel()))
.appendSibling(new TranslationTextComponent("enchantment.level." + type.getFortuneLevel()))
.setStyle(Styles.GRAY)
);
}

View File

@@ -14,7 +14,9 @@ public class ColoredBlockItem extends BaseBlockItem {
super(block, builder);
if (color != ColorMap.DEFAULT_COLOR) {
this.displayName = new TranslationTextComponent("color.minecraft." + color.getTranslationKey()).appendString(" ").append(displayName);
this.displayName = new TranslationTextComponent("color.minecraft." + color.getTranslationKey())
.appendString(" ")
.appendSibling(displayName);
} else {
this.displayName = displayName;
}

View File

@@ -17,7 +17,9 @@ public class ControllerBlockItem extends EnergyBlockItem {
super(block, new Item.Properties().group(RS.MAIN_GROUP).maxStackSize(1), block.getType() == NetworkType.CREATIVE, () -> RS.SERVER_CONFIG.getController().getCapacity());
if (color != ColorMap.DEFAULT_COLOR) {
this.displayName = new TranslationTextComponent("color.minecraft." + color.getTranslationKey()).appendString(" ").append(displayName);
this.displayName = new TranslationTextComponent("color.minecraft." + color.getTranslationKey())
.appendString(" ")
.appendSibling(displayName);
} else {
this.displayName = displayName;
}

View File

@@ -33,7 +33,7 @@ public class ControllerLootFunction extends LootFunction {
}
@Override
public LootFunctionType func_230425_b_() {
public LootFunctionType getFunctionType() {
return RSLootFunctions.getController();
}

View File

@@ -35,7 +35,7 @@ public class CrafterLootFunction extends LootFunction {
}
@Override
public LootFunctionType func_230425_b_() {
public LootFunctionType getFunctionType() {
return RSLootFunctions.getCrafter();
}

View File

@@ -29,7 +29,7 @@ public class PortableGridBlockLootFunction extends LootFunction {
}
@Override
public LootFunctionType func_230425_b_() {
public LootFunctionType getFunctionType() {
return RSLootFunctions.getPortableGrid();
}

View File

@@ -50,7 +50,7 @@ public class StorageBlockLootFunction extends LootFunction {
}
@Override
public LootFunctionType func_230425_b_() {
public LootFunctionType getFunctionType() {
return RSLootFunctions.getStorageBlock();
}

View File

@@ -5,12 +5,12 @@ import net.minecraft.util.text.Style;
import net.minecraft.util.text.TextFormatting;
public final class Styles {
public static final Style WHITE = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.WHITE));
public static final Style GRAY = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.GRAY));
public static final Style YELLOW = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.YELLOW));
public static final Style RED = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.RED));
public static final Style BLUE = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.BLUE));
public static final Style AQUA = Style.EMPTY.setColor(Color.func_240744_a_(TextFormatting.AQUA));
public static final Style WHITE = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.WHITE));
public static final Style GRAY = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.GRAY));
public static final Style YELLOW = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.YELLOW));
public static final Style RED = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.RED));
public static final Style BLUE = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.BLUE));
public static final Style AQUA = Style.EMPTY.setColor(Color.fromTextFormatting(TextFormatting.AQUA));
private Styles() {
}

View File

@@ -37,8 +37,8 @@ public class DelegateBakedModel implements IBakedModel {
}
@Override
public boolean func_230044_c_() {
return base.func_230044_c_();
public boolean isSideLit() {
return base.isSideLit();
}
@Override

View File

@@ -57,7 +57,7 @@ public class FullbrightBakedModel extends DelegateBakedModel {
for (int i = 0; i < quads.size(); ++i) {
BakedQuad quad = quads.get(i);
if (textures.contains(quad.func_187508_a().getName())) {
if (textures.contains(quad.getSprite().getName())) {
quads.set(i, transformQuad(quad));
}
}
@@ -79,8 +79,8 @@ public class FullbrightBakedModel extends DelegateBakedModel {
vertexData,
quad.getTintIndex(),
quad.getFace(),
quad.func_187508_a(),
quad.func_239287_f_() // shouldApplyDiffuseLighting
quad.getSprite(),
quad.applyDiffuseLighting()
);
}

View File

@@ -25,7 +25,7 @@ public class PatternBakedModel extends DelegateBakedModel {
return new ItemOverrideList() {
@Nullable
@Override
public IBakedModel func_239290_a_(IBakedModel model, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity) {
public IBakedModel getOverrideModel(IBakedModel model, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity) {
if (entity != null) {
ICraftingPattern pattern = PatternItem.fromCache(entity.world, stack);
@@ -36,7 +36,7 @@ public class PatternBakedModel extends DelegateBakedModel {
}
}
return super.func_239290_a_(model, stack, world, entity);
return super.getOverrideModel(model, stack, world, entity);
}
@Override

View File

@@ -110,7 +110,7 @@ public class PortableGridBakedModel extends DelegateBakedModel {
private class CustomItemOverrideList extends ItemOverrideList {
@Nullable
@Override
public IBakedModel func_239290_a_(IBakedModel model, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity) {
public IBakedModel getOverrideModel(IBakedModel model, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity) {
PortableGrid portableGrid = new PortableGrid(null, stack, -1);
if (portableGrid.isGridActive()) {

View File

@@ -59,8 +59,8 @@ public class PortableGridItemBakedModel implements IBakedModel {
}
@Override
public boolean func_230044_c_() {
return base.func_230044_c_();
public boolean isSideLit() {
return base.isSideLit();
}
@Override

View File

@@ -34,7 +34,7 @@ public final class QuadTransformer {
}
for (BakedQuad quad : model.getQuads(state, side, rand, EmptyModelData.INSTANCE)) {
BakedQuadBuilder builder = new BakedQuadBuilder(quad.func_187508_a());
BakedQuadBuilder builder = new BakedQuadBuilder(quad.getSprite());
TRSRTransformer transformer = new TRSRTransformer(builder, transformation.blockCenterToCorner());
quad.pipe(transformer);

View File

@@ -159,7 +159,7 @@ public abstract class AmountSpecifyingScreen<T extends Container> extends BaseSc
blit(matrixStack, x, y, 0, 0, xSize, ySize);
amountField.renderButton(matrixStack, 0, 0, 0);
amountField.renderWidget(matrixStack, 0, 0, 0);
}
@Override

View File

@@ -126,7 +126,7 @@ public abstract class BaseScreen<T extends Container> extends ContainerScreen<T>
super.render(matrixStack, mouseX, mouseY, partialTicks);
func_230459_a_(matrixStack, mouseX, mouseY);
renderHoveredTooltip(matrixStack, mouseX, mouseY);
}
@Override

View File

@@ -71,7 +71,7 @@ public class SecurityManagerScreen extends BaseScreen<SecurityManagerContainer>
CheckboxWidget permission = permissions[i];
// getWidth_CLASH => getHeight
if (RenderUtils.inBounds(permission.x - guiLeft, permission.y - guiTop, permission.getWidth(), permission.getWidth_CLASH(), mouseX, mouseY)) {
if (RenderUtils.inBounds(permission.x - guiLeft, permission.y - guiTop, permission.getWidth(), permission.getHeight(), mouseX, mouseY)) {
renderTooltip(matrixStack, mouseX, mouseY, I18n.format("gui.refinedstorage.security_manager.permission." + i + ".tooltip"));
}
}

View File

@@ -47,7 +47,7 @@ public class CheckboxWidget extends CheckboxButton {
}
@Override
public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
public void renderWidget(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
Minecraft minecraft = Minecraft.getInstance();
minecraft.getTextureManager().bindTexture(TEXTURE);
RenderSystem.enableDepthTest();

View File

@@ -173,10 +173,10 @@ public class SearchWidget extends TextFieldWidget {
}
@Override
public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
public void renderWidget(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
if (canSyncFromJEINow() && RSJeiPlugin.getRuntime().getIngredientListOverlay().hasKeyboardFocus()) {
setTextFromJEI();
}
super.renderButton(matrixStack, mouseX, mouseY, partialTicks);
super.renderWidget(matrixStack, mouseX, mouseY, partialTicks);
}
}

View File

@@ -25,7 +25,7 @@ public abstract class SideButton extends Button {
}
@Override
public void renderButton(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
public void renderWidget(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.enableAlphaTest();

View File

@@ -253,19 +253,19 @@ public class ClientSetup {
e.getMinecraftSupplier().get().getItemColors().register(new PatternItemColor(), RSItems.PATTERN.get());
ItemModelsProperties.func_239418_a_(RSItems.SECURITY_CARD.get(), new ResourceLocation("active"), new SecurityCardItemPropertyGetter());
ItemModelsProperties.registerProperty(RSItems.SECURITY_CARD.get(), new ResourceLocation("active"), new SecurityCardItemPropertyGetter());
RSItems.CONTROLLER.values().forEach(controller -> ItemModelsProperties.func_239418_a_(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter()));
RSItems.CREATIVE_CONTROLLER.values().forEach(controller -> ItemModelsProperties.func_239418_a_(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter()));
RSItems.CONTROLLER.values().forEach(controller -> ItemModelsProperties.registerProperty(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter()));
RSItems.CREATIVE_CONTROLLER.values().forEach(controller -> ItemModelsProperties.registerProperty(controller.get(), new ResourceLocation("energy_type"), new ControllerItemPropertyGetter()));
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.registerProperty(RSItems.WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.registerProperty(RSItems.CREATIVE_WIRELESS_CRAFTING_MONITOR.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.registerProperty(RSItems.WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.registerProperty(RSItems.CREATIVE_WIRELESS_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.func_239418_a_(RSItems.WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.func_239418_a_(RSItems.CREATIVE_WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.registerProperty(RSItems.WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
ItemModelsProperties.registerProperty(RSItems.CREATIVE_WIRELESS_FLUID_GRID.get(), CONNECTED, new NetworkItemPropertyGetter());
}
@SubscribeEvent

View File

@@ -22,7 +22,7 @@ public class NetworkTransmitterTile extends NetworkNodeTile<NetworkTransmitterNe
public static final TileDataParameter<Integer, NetworkTransmitterTile> DISTANCE = new TileDataParameter<>(DataSerializers.VARINT, 0, t -> t.getNode().getDistance());
public static final TileDataParameter<Optional<ResourceLocation>, NetworkTransmitterTile> RECEIVER_DIMENSION = new TileDataParameter<>(RSSerializers.OPTIONAL_RESOURCE_LOCATION_SERIALIZER, Optional.empty(), t -> {
if (t.getNode().getReceiverDimension() != null) {
return Optional.of(t.getNode().getReceiverDimension().func_240901_a_());
return Optional.of(t.getNode().getReceiverDimension().getLocation());
}
return Optional.empty();

View File

@@ -62,7 +62,7 @@ public final class RenderUtils {
}
if (displayAmount) {
data = new StringTextComponent(amount + "x ").append(data);
data = new StringTextComponent(amount + "x ").appendSibling(data);
}
tooltip.add(data.setStyle(Styles.GRAY));
@@ -90,7 +90,7 @@ public final class RenderUtils {
}
if (displayMb) {
data = new StringTextComponent(API.instance().getQuantityFormatter().formatInBucketForm(amount) + " ").append(data);
data = new StringTextComponent(API.instance().getQuantityFormatter().formatInBucketForm(amount) + " ").appendSibling(data);
}
tooltip.add(data.setStyle(Styles.GRAY));
@@ -165,7 +165,7 @@ public final class RenderUtils {
List<ITextProperties> wrappedTextLines = new ArrayList<>();
for (int i = 0; i < textLines.size(); i++) {
ITextProperties textLine = textLines.get(i);
List<ITextProperties> wrappedLine = font.func_238420_b_().func_238362_b_(textLine, tooltipTextWidth, Style.EMPTY);
List<ITextProperties> wrappedLine = font.getCharacterManager().func_238362_b_(textLine, tooltipTextWidth, Style.EMPTY);
if (i == 0)
titleLinesCount = wrappedLine.size();
@@ -238,7 +238,7 @@ public final class RenderUtils {
for (int lineNumber = 0; lineNumber < textLines.size(); ++lineNumber) {
ITextProperties line = textLines.get(lineNumber);
if (line != null)
font.func_238416_a_(LanguageMap.getInstance().func_241870_a(line), (float) tooltipX, (float) tooltipY, -1, true, textLocation, renderType, false, 0, 15728880);
font.drawEntityText(LanguageMap.getInstance().func_241870_a(line), (float) tooltipX, (float) tooltipY, -1, true, textLocation, renderType, false, 0, 15728880);
if (lineNumber + 1 == titleLinesCount)
tooltipY += 2;
@@ -259,7 +259,7 @@ public final class RenderUtils {
RenderSystem.enableAlphaTest();
// FontRenderer#drawStringWithShadow - call to func_228078_a_ (private)
// FontRenderer#drawStringWithShadow - call to renderString (private)
MatrixStack smallTextStack = new MatrixStack();
smallTextStack.translate(0.0D, 0.0D, zLevel);
smallTextStack.scale(textScale, textScale, 1);

View File

@@ -1,5 +1,5 @@
modLoader = "javafml"
loaderVersion = "[34,)"
loaderVersion = "[36,)"
issueTrackerURL = "https://github.com/refinedmods/refinedstorage"
license="MIT"
[[mods]]
@@ -13,14 +13,3 @@ authors = "Refined Mods"
description = '''
An elegant solution to your hoarding problem
'''
[[dependencies.refinedstorage]] #optional
# the modid of the dependency
modId = "forge" #mandatory
# Does this dependency have to exist - if not, ordering below must be specified
mandatory = true #mandatory
# The version range of the dependency
versionRange = "[34.1.0,)" #mandatory
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
ordering = "NONE"
# Side this dependency is applied on - BOTH, CLIENT or SERVER
side = "BOTH"