Fix Bug Report: 1188074626543255593

This commit is contained in:
kirillsaint 2023-12-31 12:25:25 +06:00
parent f829d0f217
commit 71b4813db9
3 changed files with 12 additions and 7 deletions

View File

@ -4,11 +4,8 @@
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="delegatedBuild" value="true" />
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" /> <option name="gradleJvm" value="zulu-1.8 (4)" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration"> <component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" /> <file type="web" url="file://$PROJECT_DIR$" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="zulu-1.8 (3)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

View File

@ -122,7 +122,7 @@ public class SilentResourcePacksGui extends SilentScreen {
scrollHelper.setStep(5); scrollHelper.setStep(5);
scrollHelper.setElementsHeight(availableResourcePacks.size() * 37 + 19); scrollHelper.setElementsHeight(availableResourcePacks.size() * 37 + 19);
scrollHelper.setMaxScroll(blockHeight - 45); scrollHelper.setMaxScroll(blockHeight - 45);
scrollHelper.setSpeed(100); scrollHelper.setSpeed(150);
if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) { if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) {
scrollHelper.setFlag(true); scrollHelper.setFlag(true);
@ -177,6 +177,9 @@ public class SilentResourcePacksGui extends SilentScreen {
private void availableResourcePacksClick(float x, float y, int mouseX, int mouseY) { private void availableResourcePacksClick(float x, float y, int mouseX, int mouseY) {
float itemY = y + 19 + scrollHelper.getScroll(); float itemY = y + 19 + scrollHelper.getScroll();
if(!GuiUtils.blockInOtherBlock(mouseX, mouseY, 2, 2, x, y, 193, blockHeight - 45)) {
return;
}
for(ResourcePackRepository.Entry entry : availableResourcePacks) { for(ResourcePackRepository.Entry entry : availableResourcePacks) {
if((!this.silentInputs.get(0).getValue().trim().equals("") && !entry.getResourcePackName().toLowerCase().contains(this.silentInputs.get(0).getValue().trim().toLowerCase()))) { if((!this.silentInputs.get(0).getValue().trim().equals("") && !entry.getResourcePackName().toLowerCase().contains(this.silentInputs.get(0).getValue().trim().toLowerCase()))) {
@ -201,7 +204,7 @@ public class SilentResourcePacksGui extends SilentScreen {
scrollHelper2.setStep(5); scrollHelper2.setStep(5);
scrollHelper2.setElementsHeight(selectedResourcePacks.size() * 37 + 19); scrollHelper2.setElementsHeight(selectedResourcePacks.size() * 37 + 19);
scrollHelper2.setMaxScroll(blockHeight - 45); scrollHelper2.setMaxScroll(blockHeight - 45);
scrollHelper2.setSpeed(100); scrollHelper2.setSpeed(150);
if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) { if(MouseUtils.isInside(mouseX, mouseY, x, y, 193, blockHeight - 45)) {
scrollHelper2.setFlag(true); scrollHelper2.setFlag(true);
} else { } else {
@ -262,6 +265,10 @@ public class SilentResourcePacksGui extends SilentScreen {
float itemY = y + 19 + scrollHelper2.getScroll(); float itemY = y + 19 + scrollHelper2.getScroll();
int packIndex = 0; int packIndex = 0;
if(!GuiUtils.blockInOtherBlock(mouseX, mouseY, 2, 2, x, y, 193, blockHeight - 45)) {
return;
}
for(ResourcePackRepository.Entry entry : selectedResourcePacks) { for(ResourcePackRepository.Entry entry : selectedResourcePacks) {
if(GuiUtils.blockInOtherBlock(x + 3, itemY, 187, 35, x, y, 193, blockHeight - 45)) { if(GuiUtils.blockInOtherBlock(x + 3, itemY, 187, 35, x, y, 193, blockHeight - 45)) {
int i = entry.func_183027_f(); int i = entry.func_183027_f();