Skip to content

Commit

Permalink
Merge pull request #16 from Hendrix-Shen/patch-1
Browse files Browse the repository at this point in the history
Fix a bug and add issue templates
  • Loading branch information
plusls authored Jan 30, 2022
2 parents 66a9dba + dd06c79 commit 103733e
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 1 deletion.
75 changes: 75 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Bug Report
description: Create a report to help us improve.
title: "[Bug] "
labels: ["bug"]
body:
- type: markdown
attributes:
value: "**Note: Please search for existing issues before reporting where possible to avoid duplicate reporting.**"
- type: input
id: version_version
attributes:
label: Minecraft Version
description: |
The version of Minecraft you are running?
validations:
required: true
- type: input
id: pca_version
attributes:
label: Plusls Carpet Addition Version
description: |
The version of Plusls Carpet Addition you are running?
validations:
required: true
- type: input
id: carpet_version
attributes:
label: Carpet Version
description: |
The version of Carpet you are running?
validations:
required: true
- type: input
id: fabric_api_version
attributes:
label: Fabric API Version
description: |
The version of Fabric API you are running?
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: |
Please tell us what the bug is with a clear and detailed description, put your screenshots if possible.
validations:
required: true
- type: textarea
id: to_reproduce
attributes:
label: To Reproduce
description: |
How do you trigger this bug? Please walk us through it step by step.
validations:
required: true
- type: textarea
id: expected_behavior
attributes:
label: Expected behavior
description: |
A clear and concise description of what you expected to happen.
- type: textarea
id: log
attributes:
label: Log
description: |
Please provide your log here if you can.
- type: checkboxes
id: latest_build_tested
attributes:
label: Latest CI build tested
options:
- label: I confirm that this problem still exists with the latest CI build.
required: true
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Feature Request
description: Suggest an idea for this project.
title: "[Feature Request] "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: "**Note: Please search for existing feature requests before reporting where possible to avoid duplicate requests**"
- type: textarea
id: description
attributes:
label: What new features do you want?
description: |
What new feature or change you want? How it improves? Please tell us the requirements is with a clear and detailed description, put your screenshots if possible.
validations:
required: true
- type: checkboxes
id: latest_build_tested
attributes:
label: Latest CI build tested
options:
- label: I confirm that the feature I requested is not in the latest CI build.
required: true
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Question
description: Anything you don't understand.
title: "[Question] "
labels: ["question"]
body:
- type: markdown
attributes:
value: "**Note: Please search for existing issues before reporting where possible to avoid duplicate reporting.**"
- type: dropdown
id: question_yype
attributes:
label: Question Type
options:
- "Codes"
- "Usages"
- "Others"
validations:
required: true
- type: textarea
id: descript
attributes:
label: Description
description: |
Please tell us the question is with a clear and detailed description, put your screenshots if possible.
validations:
required: true
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public MixinLeavesBlock(Settings settings) {
super(settings);
}

@SuppressWarnings("deprecation")
@Inject(method = "scheduledTick", at = @At("RETURN"))
private void postScheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random, CallbackInfo ci) {
if (PcaSettings.quickLeafDecay) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ protected MixinServerWorld(MutableWorldProperties properties, RegistryKey<World>
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/world/ServerWorld;setTimeOfDay(J)V", ordinal = 0))
void redirectSetTimeOfDay(ServerWorld world, long timeOfDay) {
if (this.isDay() && PcaSettings.sleepingDuringTheDay) {
world.setTimeOfDay(13000);
long currentTime = this.properties.getTimeOfDay();
long currentDayTime = this.properties.getTimeOfDay() % 24000L;
world.setTimeOfDay(currentTime + 13000L - currentDayTime);
} else {
world.setTimeOfDay(timeOfDay);
}
Expand Down

0 comments on commit 103733e

Please sign in to comment.