Skip to content

Commit c8ed969

Browse files
committed
Some fixes
1 parent 6425698 commit c8ed969

File tree

7 files changed

+122
-49
lines changed

7 files changed

+122
-49
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Bug report
2+
description: Create a report to help us improve (search for duplicates first)
3+
labels: bug
4+
body:
5+
- type: checkboxes
6+
attributes:
7+
label: Issue tracker rule checks (read carefully)
8+
options:
9+
- label: "I have checked that my problem <a href='https://github.com/MCreator/MCreator/issues?q=is%3Aissue' target='_blank'>is not already reported</a>"
10+
required: true
11+
- label: "I have checked that my problem is not covered on <a href='https://mcreator.net/support/knowledgebase' target='_blank'>Knowledge Base</a> or on <a href='https://mcreator.net/wiki' target='_blank'>MCreator's Wiki</a>"
12+
required: true
13+
- label: "I have checked that I am using the latest plugin version"
14+
required: true
15+
- label: "I have checked that my written content does not violate the <a href='https://mcreator.net/wiki/general-publishing-guidelines' target='_blank'>publishing guidelines</a>"
16+
required: true
17+
- type: textarea
18+
attributes:
19+
label: Issue description
20+
description: Explain clearly and unambiguously what went wrong
21+
placeholder: Tell us here about the bug/problem
22+
validations:
23+
required: true
24+
- type: textarea
25+
attributes:
26+
label: How to reproduce this issue?
27+
description: Try to explain what you did for the bug to occur. A good explanation of steps to reproduce helps us locate the bug faster. If applicable, add screenshots to help explain your problem.
28+
placeholder: |
29+
Step 1: ...
30+
Step 2: ...
31+
...
32+
validations:
33+
required: true
34+
- type: dropdown
35+
attributes:
36+
label: Operating system
37+
description: Which operating system do you use with MCreator?
38+
options:
39+
- Windows
40+
- macOS
41+
- Linux
42+
- Other (Tell us at the Specifications part)
43+
validations:
44+
required: true
45+
- type: textarea
46+
attributes:
47+
label: Details
48+
description: To understand the issue, we need some details of your setup & system
49+
placeholder: |
50+
MCreator version: [2021.1 / branch:master / ...]
51+
Generator type: [forge-1.15.2 / forge-1.16.5 / ...]
52+
validations:
53+
required: true
54+
- type: textarea
55+
attributes:
56+
label: Example workspace
57+
description: |
58+
If the bug is related to the workspace, always provide a minimal reproducible example workspace, export it to a shareable ZIP file, and attach it to the ticket.
59+
60+
Keep in mind your workspace of the project is not minimal reproducible example. Make a workspace only with elements crucial for the bug.
61+
62+
Drag the file into this area.
63+
placeholder: Insert here
64+
validations:
65+
required: false
66+
- type: textarea
67+
attributes:
68+
label: Logs
69+
description: |
70+
If applicable, include game or build logs (full logs, do not crop them, in text format, screenshots of logs are not acceptable) from the Console tab or terminal and steps to reproduce the bug in your workspace.
71+
72+
Longer logs should be posted on [GitHub Gists](https://gist.github.com/) (or other paste service) and linked here.
73+
placeholder: https://gist.github.com/...
74+
validations:
75+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: "[Read before opening a new issue] Issue tracker rules and tips"
4+
url: https://mcreator.net/wiki/tips-reporting-bugs-and-issues
5+
about: Some issue tracker rules and general tips
6+
- name: "Knowledge base"
7+
url: https://mcreator.net/support/knowledgebase
8+
about: Collection of commonly asked questions and problems

.github/workflows/test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ permissions:
66
on:
77
push:
88
branches:
9-
- 2025.2
10-
- "feature/*"
11-
- "dev/*"
9+
- "**"
1210
pull_request:
1311
branches:
14-
- 2025.2
15-
- "feature/*"
16-
- "dev/*"
12+
- "**"
1713

1814
jobs:
1915
build:

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ tasks.named('processResources') {
88
filesMatching('plugin.json') {
99
expand(
1010
version: project.version,
11-
pluginSupportedVersion: project.pluginSupportedVersion,
1211
mcreatorVersionShort: project.mcreatorVersionShort,
1312
pluginVersion: project.pluginVersion
1413
)

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
pluginSupportedVersion=2025002
21
mcreatorVersionShort=2025.2
32
pluginVersion=2.1
43
version=1.17.1

settings.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
rootProject.name = 'generator-' + version
22

3-
include ":MCreator"
4-
project(":MCreator").projectDir = file(mcreator_path)
3+
if(mcreator_path != "unassigned") {
4+
include ":MCreator"
5+
project(":MCreator").projectDir = file(mcreator_path)
6+
}

src/main/resources/forge-1.17.1/templates/elementinits/items.java.ftl

Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -44,35 +44,46 @@ package ${package}.init;
4444
<#assign orderedCustomItems = []>
4545
<#assign orderedVanillaItems = []>
4646
<#assign orderedNullItems = []>
47-
<#assign itemList = items>
4847

49-
<#list itemList as item>
48+
<#assign itemsWithTabs = []>
49+
<#list items as item>
5050
<#if item.creativeTabs == "[]">
5151
<#assign orderedNullItems = orderedNullItems + [item]>
52+
<#else>
53+
<#assign itemsWithTabs = itemsWithTabs + [item]>
5254
</#if>
5355
</#list>
5456

55-
<#assign itemList = itemList?filter(item -> !orderedNullItems?seq_contains(item))>
57+
<#assign itemsByName = {}>
58+
<#list itemsWithTabs as item>
59+
<#assign itemsByName = itemsByName + {item.getModElement().getName(): item}>
60+
</#list>
5661

62+
<#assign processedItems = {}>
5763
<#list tabMap.keySet() as tabType>
58-
<#assign tab = tabType>
59-
<#assign isCustom = tabType?starts_with('CUSTOM:')>
60-
61-
<#if isCustom>
62-
<#assign tab = "CUSTOM:" + w.getWorkspace().getModElementByName(tabType.replace("CUSTOM:", "")).getGeneratableElement().getModElement().getName()>
63-
</#if>
64-
65-
<#list tabMap.get(tab) as tabElement>
66-
<#assign tabEName = tabElement?replace("CUSTOM:", "")?keep_before(".")>
67-
68-
<#if prevElement?? && prevElement == tabEName>
69-
<#continue>
70-
</#if>
71-
72-
<@setItem isCustom tabType tabEName/>
73-
74-
<#assign prevElement = tabEName>
75-
</#list>
64+
<#assign isCustom = tabType?starts_with('CUSTOM:')>
65+
<#assign tab = isCustom?then("CUSTOM:" + w.getWorkspace().getModElementByName(tabType.replace("CUSTOM:", "")).getGeneratableElement().getModElement().getName(), tabType)>
66+
<#assign currentTabItems = tabMap.get(tab)>
67+
<#assign prevElement = "">
68+
69+
<#list currentTabItems as tabElement>
70+
<#assign tabEName = tabElement?replace("CUSTOM:", "")?keep_before(".")>
71+
72+
<#if tabEName != prevElement && itemsByName[tabEName]??>
73+
<#assign item = itemsByName[tabEName]>
74+
<#assign currentTabs><@CreativeTabs item.creativeTabs/></#assign>
75+
76+
<#if currentTabs?trim == generator.map(tabType, "tabs")?trim>
77+
<#if isCustom>
78+
<#assign orderedCustomItems = orderedCustomItems + [item]>
79+
<#else>
80+
<#assign orderedVanillaItems = orderedVanillaItems + [item]>
81+
</#if>
82+
<#assign processedItems = processedItems + {tabEName: true}>
83+
</#if>
84+
</#if>
85+
<#assign prevElement = tabEName>
86+
</#list>
7687
</#list>
7788

7889
<#assign orderedItems = orderedCustomItems + orderedVanillaItems + orderedNullItems>
@@ -200,21 +211,4 @@ new Item.Properties()
200211
</#if>
201212
.tab(<@CreativeTabs block.creativeTabs/>)
202213
</#macro>
203-
<#-- @formatter:on -->
204-
<#macro setItem isCustom tabType itemName>
205-
<#list itemList as item>
206-
<#assign currentTabs><@CreativeTabs item.creativeTabs/></#assign>
207-
208-
<#if currentTabs?trim == generator.map(tabType, "tabs")?trim>
209-
<#if item.getModElement().getName() == itemName>
210-
<#if isCustom>
211-
<#assign orderedCustomItems = orderedCustomItems + [item]>
212-
<#else>
213-
<#assign orderedVanillaItems = orderedVanillaItems + [item]>
214-
</#if>
215-
<#assign itemList = itemList?filter(n -> n != item)>
216-
<#break>
217-
</#if>
218-
</#if>
219-
</#list>
220-
</#macro>
214+
<#-- @formatter:on -->

0 commit comments

Comments
 (0)