Skip to content
This repository was archived by the owner on Oct 22, 2022. It is now read-only.

Commit ca30b3f

Browse files
committed
new cape
1 parent edd3bb0 commit ca30b3f

39 files changed

+22
-12
lines changed

src/main/java/me/travis/wurstplusthree/manager/CapeManager.java

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ public class CapeManager implements Globals {
1616

1717
private final List<UUID> ogCapes = new ArrayList<>();
1818
private final List<Pair<UUID, BufferedImage>> donatorCapes = new ArrayList<>();
19-
private final List<UUID> poggersCapes = new ArrayList<>();
19+
private final List<UUID> cooldudeCapes = new ArrayList<>();
2020
private final List<UUID> contributorCapes = new ArrayList<>();
2121

22-
private final List<ResourceLocation> capeFrames = new ArrayList<>();
22+
private final List<ResourceLocation> ogCapeFrames = new ArrayList<>();
23+
private final List<ResourceLocation> coolCapeFrames = new ArrayList<>();
2324

2425
public static int capeFrameCount = 0;
2526

@@ -30,16 +31,24 @@ public void run() {
3031
}
3132
}
3233

33-
public ResourceLocation getGifCape() {
34-
return capeFrames.get(capeFrameCount % 35);
34+
public ResourceLocation getOgCape() {
35+
return ogCapeFrames.get(capeFrameCount % 35);
36+
}
37+
38+
public ResourceLocation getCoolCape() {
39+
return coolCapeFrames.get(capeFrameCount % 35);
3540
}
3641

3742
public CapeManager() {
3843
Timer timer = new Timer();
3944
timer.schedule(new gifCapeCounter(), 0, 41);
4045

4146
for (int i = 0; i < 35; i++) {
42-
capeFrames.add(new ResourceLocation("textures/gifcape/cape-" + i + ".png"));
47+
ogCapeFrames.add(new ResourceLocation("textures/gifcape/cape-" + i + ".png"));
48+
}
49+
50+
for (int i = 0; i < 37; i++) {
51+
coolCapeFrames.add(new ResourceLocation("textures/gifcape2/w3templateblackborder-" + i + ".png"));
4352
}
4453

4554
try { // og
@@ -65,7 +74,7 @@ public CapeManager() {
6574
BufferedReader in = new BufferedReader(new InputStreamReader(capesList.openStream()));
6675
String inputLine;
6776
while ((inputLine = in.readLine()) != null) {
68-
poggersCapes.add(UUID.fromString(inputLine));
77+
cooldudeCapes.add(UUID.fromString(inputLine));
6978
}
7079
} catch (Exception ignored) {}
7180
try { // donator
@@ -110,7 +119,7 @@ public void reload(){
110119
BufferedReader in = new BufferedReader(new InputStreamReader(capesList.openStream()));
111120
String inputLine;
112121
while ((inputLine = in.readLine()) != null) {
113-
poggersCapes.add(UUID.fromString(inputLine));
122+
cooldudeCapes.add(UUID.fromString(inputLine));
114123
}
115124
} catch (Exception ignored) {}
116125
try { // donator
@@ -153,8 +162,8 @@ public BufferedImage getCapeFromDonor(UUID uuid) {
153162
} return null;
154163
}
155164

156-
public boolean isPoggers(UUID uuid) {
157-
return this.poggersCapes.contains(uuid);
165+
public boolean isCool(UUID uuid) {
166+
return this.cooldudeCapes.contains(uuid);
158167
}
159168

160169
public boolean isContributor(UUID uuid) {

src/main/java/me/travis/wurstplusthree/mixin/mixins/MixinAbstractClientPlayer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ public void getLocationCape(CallbackInfoReturnable<ResourceLocation> callbackInf
3333

3434
if (WurstplusThree.CAPE_MANAGER.isOg(uuid)) {
3535
// callbackInfoReturnable.setReturnValue(new ResourceLocation("textures/cape-old.png"));
36-
callbackInfoReturnable.setReturnValue(WurstplusThree.CAPE_MANAGER.getGifCape());
36+
callbackInfoReturnable.setReturnValue(WurstplusThree.CAPE_MANAGER.getOgCape());
3737
}
3838

3939
if (WurstplusThree.CAPE_MANAGER.isContributor(uuid)) {
4040
callbackInfoReturnable.setReturnValue(new ResourceLocation("textures/cape-dev.png"));
4141
}
4242

43-
if (WurstplusThree.CAPE_MANAGER.isPoggers(uuid)) {
44-
callbackInfoReturnable.setReturnValue(new ResourceLocation("textures/cape-cool.png"));
43+
if (WurstplusThree.CAPE_MANAGER.isCool(uuid)) {
44+
// callbackInfoReturnable.setReturnValue(new ResourceLocation("textures/cape-cool.png"));
45+
callbackInfoReturnable.setReturnValue(WurstplusThree.CAPE_MANAGER.getCoolCape());
4546
}
4647

4748
if (WurstplusThree.CAPE_MANAGER.isDonator(uuid)) {
3.35 KB
Loading
3.51 KB
Loading
3.37 KB
Loading
3.54 KB
Loading
3.35 KB
Loading
3.35 KB
Loading
3.37 KB
Loading
3.35 KB
Loading

0 commit comments

Comments
 (0)