Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit b34bda8

Browse files
committed
Move loot back to com.patchworkmc temporarily until the package snap (checkstyle)
1 parent 8c4015d commit b34bda8

5 files changed

Lines changed: 80 additions & 24 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
20+
package com.patchworkmc.mixin.loot;
21+
22+
import org.spongepowered.asm.mixin.Mixin;
23+
import org.spongepowered.asm.mixin.injection.At;
24+
import org.spongepowered.asm.mixin.injection.Inject;
25+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
26+
27+
import net.minecraft.advancement.AdvancementRewards;
28+
import net.minecraft.server.network.ServerPlayerEntity;
29+
30+
@Mixin(AdvancementRewards.class)
31+
public class MixinAdvancementRewards {
32+
private static final String LOOT_CONTEXT_BUILD_TARGET =
33+
"net/minecraft/world/loot/context/LootContext$Builder.build(Lnet/minecraft/world/loot/context/LootContextType;)Lnet/minecraft/world/loot/context/LootContext;";
34+
35+
@Inject(method = "apply(Lnet/minecraft/server/network/ServerPlayerEntity;)V", at = @At(value = "INVOKE", target = LOOT_CONTEXT_BUILD_TARGET))
36+
private void patchwork_addLuckToLootContext(ServerPlayerEntity player, CallbackInfo callback) {
37+
// TODO: Add luck to the loot context, figure out locals
38+
}
39+
}

patchwork-loot/src/main/java/net/patchworkmc/mixin/loot/MixinFishingBobberEntity.java renamed to patchwork-loot/src/main/java/com/patchworkmc/mixin/loot/MixinFishingBobberEntity.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1-
package net.patchworkmc.mixin.loot;
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
20+
package com.patchworkmc.mixin.loot;
221

322
import org.spongepowered.asm.mixin.Mixin;
423
import org.spongepowered.asm.mixin.Shadow;

patchwork-loot/src/main/java/net/patchworkmc/mixin/loot/MixinLootContextTypes.java renamed to patchwork-loot/src/main/java/com/patchworkmc/mixin/loot/MixinLootContextTypes.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1-
package net.patchworkmc.mixin.loot;
1+
/*
2+
* Minecraft Forge, Patchwork Project
3+
* Copyright (c) 2016-2020, 2019-2020
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU Lesser General Public
7+
* License as published by the Free Software Foundation version 2.1
8+
* of the License.
9+
*
10+
* This library is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* Lesser General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Lesser General Public
16+
* License along with this library; if not, write to the Free Software
17+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
20+
package com.patchworkmc.mixin.loot;
221

322
import org.spongepowered.asm.mixin.Mixin;
423
import org.spongepowered.asm.mixin.injection.At;

patchwork-loot/src/main/java/net/patchworkmc/mixin/loot/MixinAdvancementRewards.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

patchwork-loot/src/main/resources/patchwork-loot.mixins.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"required": true,
3-
"package": "net.patchworkmc.mixin.loot",
3+
"package": "com.patchworkmc.mixin.loot",
44
"compatibilityLevel": "JAVA_8",
55
"mixins": [
66
"MixinAdvancementRewards",

0 commit comments

Comments
 (0)