1.20-pre1
This commit is contained in:
parent
ec10f36839
commit
f1515c5063
|
|
@ -7,7 +7,6 @@ import net.minecraft.world.level.block.state.BlockBehaviour;
|
|||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateHolder;
|
||||
import net.minecraft.world.level.block.state.properties.Property;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
|
@ -19,15 +18,6 @@ public abstract class BlockStateBaseMixin extends StateHolder<Block, BlockState>
|
|||
super(object, immutableMap, mapCodec);
|
||||
}
|
||||
|
||||
@Redirect(method = "*", at = @At(
|
||||
value = "FIELD",
|
||||
opcode = Opcodes.GETFIELD,
|
||||
target = "Lnet/minecraft/world/level/block/state/BlockBehaviour$BlockStateBase;material:Lnet/minecraft/world/level/material/Material;"
|
||||
))
|
||||
private Material getMaterial(BlockBehaviour.BlockStateBase base) {
|
||||
return this.owner.properties.material;
|
||||
}
|
||||
|
||||
@Redirect(method = "*", at = @At(
|
||||
value = "FIELD",
|
||||
opcode = Opcodes.GETFIELD,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package org.embeddedt.modernfix.screen;
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
|
|
@ -28,11 +28,11 @@ public class ModernFixConfigScreen extends Screen {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void render(PoseStack poseStack, int mouseX, int mouseY, float partialTicks) {
|
||||
this.renderBackground(poseStack);
|
||||
this.optionList.render(poseStack, mouseX, mouseY, partialTicks);
|
||||
drawCenteredString(poseStack, this.font, this.title, this.width / 2, 8, 16777215);
|
||||
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
|
||||
this.renderBackground(guiGraphics);
|
||||
this.optionList.render(guiGraphics, mouseX, mouseY, partialTicks);
|
||||
guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 8, 16777215);
|
||||
this.doneButton.setMessage(madeChanges ? Component.translatable("modernfix.config.done_restart") : CommonComponents.GUI_DONE);
|
||||
super.render(poseStack, mouseX, mouseY, partialTicks);
|
||||
super.render(guiGraphics, mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableList;
|
|||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import net.minecraft.client.gui.components.ContainerObjectSelectionList;
|
||||
import net.minecraft.client.gui.components.events.GuiEventListener;
|
||||
|
|
@ -79,14 +80,14 @@ public class OptionList extends ContainerObjectSelectionList<OptionList.Entry> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void render(PoseStack matrixStack, int index, int top, int left, int width, int height, int mouseX, int mouseY, boolean isMouseOver, float partialTicks) {
|
||||
public void render(GuiGraphics guiGraphics, int index, int top, int left, int width, int height, int mouseX, int mouseY, boolean isMouseOver, float partialTicks) {
|
||||
MutableComponent nameComponent = Component.literal(this.name);
|
||||
if(this.option.isUserDefined())
|
||||
nameComponent = nameComponent.withStyle(ChatFormatting.ITALIC).append(Component.translatable("modernfix.config.not_default"));
|
||||
OptionList.this.minecraft.font.draw(matrixStack, nameComponent, (float)(left + 160 - OptionList.this.maxNameWidth), (float)(top + height / 2 - 4), 16777215);
|
||||
guiGraphics.drawString(OptionList.this.minecraft.font, nameComponent, left + 160 - OptionList.this.maxNameWidth, top + height / 2 - 4, 16777215, false);
|
||||
this.toggleButton.setPosition(left + 175, top);
|
||||
this.toggleButton.setMessage(getOptionMessage(this.option));
|
||||
this.toggleButton.render(matrixStack, mouseX, mouseY, partialTicks);
|
||||
this.toggleButton.render(guiGraphics, mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
private Component getOptionMessage(Option option) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import net.minecraft.world.level.levelgen.WorldOptions;
|
|||
import net.minecraft.world.level.storage.WorldData;
|
||||
import net.minecraft.world.level.storage.ServerLevelData;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
public class DummyServerConfiguration implements WorldData {
|
||||
|
|
@ -23,6 +24,11 @@ public class DummyServerConfiguration implements WorldData {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getRemovedFeatureFlags() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean wasModded() {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ accessible field net/minecraft/client/renderer/texture/Stitcher$Holder height I
|
|||
accessible field net/minecraft/network/syncher/EntityDataAccessor id I
|
||||
mutable field net/minecraft/network/syncher/EntityDataAccessor id I
|
||||
accessible field net/minecraft/world/level/block/state/BlockBehaviour$Properties isAir Z
|
||||
accessible field net/minecraft/world/level/block/state/BlockBehaviour$Properties material Lnet/minecraft/world/level/material/Material;
|
||||
accessible field net/minecraft/world/level/block/state/BlockBehaviour$Properties destroyTime F
|
||||
accessible field net/minecraft/world/level/block/state/BlockBehaviour$Properties requiresCorrectToolForDrops Z
|
||||
accessible field net/minecraft/world/level/block/state/BlockBehaviour$Properties canOcclude Z
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
org.gradle.jvmargs=-Xmx2G
|
||||
|
||||
mod_id=modernfix
|
||||
minecraft_version=1.19.4
|
||||
enabled_platforms=fabric,forge
|
||||
minecraft_version=1.20-pre1
|
||||
enabled_platforms=fabric
|
||||
forge_version=1.19.4-45.0.22
|
||||
parchment_version=2023.03.12
|
||||
refined_storage_version=4392788
|
||||
|
|
@ -13,9 +13,9 @@ ctm_version=1.19.2-1.1.7+11
|
|||
kubejs_version=1902.6.0-build.142
|
||||
rhino_version=1902.2.2-build.268
|
||||
|
||||
fabric_loader_version=0.14.18
|
||||
fabric_api_version=0.80.0+1.19.4
|
||||
fabric_loader_version=0.14.19
|
||||
fabric_api_version=0.80.3+1.20
|
||||
|
||||
continuity_version=3.0.0-beta.2+1.19.3
|
||||
|
||||
modmenu_version=6.2.2
|
||||
modmenu_version=7.0.0-beta.2
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ pluginManagement {
|
|||
|
||||
include("common")
|
||||
include("fabric")
|
||||
include("forge")
|
||||
//include("forge")
|
||||
|
||||
rootProject.name = 'modernfix'
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user