-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/1.4.1'
- Loading branch information
Showing
2,000 changed files
with
64,920 additions
and
14,964 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!-- 1. START HERE: (Before filling all this out, please quickly go to the list of all issues: (https://gitlab.com/cable-mc/cobblemon/-/issues/?sort=created_date&state=all) and do a quick search to see if your issue has already been reported. If it has, please add a comment to the existing issue instead of creating a new one.)--> | ||
<!-- 2. If the issue was not already reported, please fill out the following template. --> | ||
<!-- 3. If you do not know something, don't worry! Just fill out as much as you can to make sure the issue can get fixed asap. --> | ||
|
||
## Summary | ||
(Please summarize the bug encountered concisely) | ||
|
||
## Steps to reproduce | ||
(How one can reproduce the issue - this is very important) | ||
|
||
## What is the current bug behavior? | ||
(What actually happens) | ||
|
||
## What is the expected correct behavior? | ||
(What you should see instead) | ||
|
||
## Cobblemon Version and Mod Loader | ||
(Are you using Forge or Fabric? And what version of Cobblemon are you using?) | ||
|
||
## Mods used besides Cobblemon | ||
(Did you have any other mods installed besides Cobblemon? If so, please list them here) | ||
|
||
## Relevant logs, screenshots and/or videos | ||
(Paste any relevant logs - use code blocks (```) at the start and end to format console output, logs, and code, as | ||
it's very hard to read otherwise. Or just put a link here) | ||
|
||
## Additional Information | ||
(If you can, link to the line of code that might be responsible for the problem, or any other info that might be useful) | ||
|
||
/label ~bug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!-- 1. START HERE: (Before filling all this out, please quickly go to the list of all issues: (https://gitlab.com/cable-mc/cobblemon/-/issues/?sort=created_date&state=all) and do a quick search to see if your feature was already requested. If it is, please add a comment to the existing issue instead of creating a new one.)--> | ||
<!-- 2. If the feature request was not already reported, please fill out the following template. --> | ||
<!-- 3. If you do not know something, don't worry! Just fill out as much as you can. --> | ||
<!-- 4. The more info you provide here, the greater the chance of it being considered by the Design team. --> | ||
|
||
## Summary | ||
(Please summarize your feature request concisely) | ||
|
||
## What are the projected benefits of this feature? | ||
- (List) | ||
- (benefits) | ||
- (here) | ||
|
||
## What could speak against this feature? | ||
- (List) | ||
- (possible) | ||
- (cons) | ||
|
||
## Why do you think the benefits outweigh the cons? | ||
(Explain why you think the benefits outweigh the cons) | ||
|
||
## Mods involved besides Cobblemon | ||
(Does your suggestion require any other mods besides Cobblemon? If so, please list them here) | ||
|
||
## Sketches, screenshots and/or videos | ||
(Feel free to add any sketches, screenshots or videos that might help the Design team understand your suggestion) | ||
|
||
## Additional Information | ||
(Is there anything else you would like to add?) | ||
|
||
/label ~feature ~suggestion ~needs-design |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
common/src/main/java/com/cobblemon/mod/common/duck/SoundSystemDuck.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright (C) 2023 Cobblemon Contributors | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package com.cobblemon.mod.common.duck; | ||
|
||
import net.minecraft.client.sound.SoundInstance; | ||
import net.minecraft.sound.SoundCategory; | ||
import net.minecraft.util.Identifier; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.Collection; | ||
|
||
public interface SoundSystemDuck { | ||
|
||
void pauseSounds(@Nullable Identifier id, @Nullable SoundCategory category); | ||
|
||
void resumeSounds(@Nullable Identifier id, @Nullable SoundCategory category); | ||
|
||
Collection<SoundInstance> getSounds(@Nullable SoundCategory category); | ||
} |
33 changes: 33 additions & 0 deletions
33
common/src/main/java/com/cobblemon/mod/common/mixin/EntityVillagerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (C) 2023 Cobblemon Contributors | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package com.cobblemon.mod.common.mixin; | ||
|
||
import net.minecraft.entity.passive.VillagerEntity; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.village.VillagerProfession; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
import com.cobblemon.mod.common.villager.VillagerGatherableItems; | ||
|
||
import java.util.Objects; | ||
|
||
@Mixin(VillagerEntity.class) | ||
public abstract class EntityVillagerMixin { | ||
|
||
@Inject(method = "canGather", at = @At(value = "RETURN"), cancellable = true) | ||
private void cobblemon$canGather(ItemStack stack, CallbackInfoReturnable<Boolean> ci) { | ||
final VillagerEntity villager = (VillagerEntity) (Object) this; | ||
if(ci.getReturnValue() == false && Objects.equals(villager.getVillagerData().getProfession(), VillagerProfession.FARMER) && villager.getInventory().canInsert(stack)) { | ||
if(VillagerGatherableItems.INSTANCE.getVillagerGatherableItems().contains(stack.getItem())) | ||
ci.setReturnValue(true); | ||
} | ||
} | ||
} |
47 changes: 0 additions & 47 deletions
47
common/src/main/java/com/cobblemon/mod/common/mixin/FenceBlockMixin.java
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
common/src/main/java/com/cobblemon/mod/common/mixin/MusicTrackerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (C) 2023 Cobblemon Contributors | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
package com.cobblemon.mod.common.mixin; | ||
|
||
import com.cobblemon.mod.common.client.sound.battle.BattleMusicController; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.sound.MusicTracker; | ||
import net.minecraft.client.sound.SoundInstance; | ||
import org.jetbrains.annotations.Nullable; | ||
import org.spongepowered.asm.mixin.Final; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(MusicTracker.class) | ||
public class MusicTrackerMixin { | ||
|
||
@Shadow @Final | ||
private MinecraftClient client; | ||
|
||
@Shadow @Nullable | ||
private SoundInstance current; | ||
|
||
/** Freezes the tracker while a BattleMusicInstance is in progress. Current SoundInstance being tracked will be paused by BattleMusicHandler. */ | ||
@Inject(method = "tick()V", at = @At("HEAD"), cancellable = true) | ||
public void tick(CallbackInfo cb) { | ||
if (this.client.getSoundManager().isPlaying(BattleMusicController.INSTANCE.getMusic())) cb.cancel(); | ||
} | ||
} |
44 changes: 0 additions & 44 deletions
44
common/src/main/java/com/cobblemon/mod/common/mixin/ServerChunkManagerMixin.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.