Compare commits
No commits in common. "d3326e6f18e71027ca1f91ea035b808feb98e8f1" and "7489d030ad2548d7c5c6ca97772b91db7754451f" have entirely different histories.
d3326e6f18
...
7489d030ad
4 changed files with 2 additions and 36 deletions
|
@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx4G
|
||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
version = 2.0.1
|
version = 2.0.0
|
||||||
maven_group = pm.c7.scout
|
maven_group = pm.c7.scout
|
||||||
archives_base_name = Scout
|
archives_base_name = Scout
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class ScoutMixin extends AutoMixin {
|
||||||
var params = decodeAnnotationParams(an);
|
var params = decodeAnnotationParams(an);
|
||||||
Type type = (Type)params.get("value");
|
Type type = (Type)params.get("value");
|
||||||
try {
|
try {
|
||||||
transformers.put(name, (ClassNodeTransformer) Class.forName(type.getClassName()).getDeclaredConstructor().newInstance());
|
transformers.put(name, (ClassNodeTransformer) Class.forName(type.getClassName()).newInstance());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOGGER.error("Transformer class for mixin {} not found", name, e);
|
LOGGER.error("Transformer class for mixin {} not found", name, e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,16 +220,6 @@ public class BaseBagItem extends TrinketItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void tick(ItemStack stack, SlotReference slot, LivingEntity entity) {
|
|
||||||
var inv = getInventory(stack);
|
|
||||||
|
|
||||||
for (int i = 0; i < inv.size(); i++) {
|
|
||||||
var invStack = inv.getStack(i);
|
|
||||||
invStack.inventoryTick(entity.getWorld(), entity, i, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum BagType {
|
public enum BagType {
|
||||||
SATCHEL,
|
SATCHEL,
|
||||||
POUCH
|
POUCH
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
package pm.c7.scout.mixin;
|
|
||||||
|
|
||||||
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 net.minecraft.util.collection.DefaultedList;
|
|
||||||
import pm.c7.scout.ScoutUtil;
|
|
||||||
|
|
||||||
@Mixin(DefaultedList.class)
|
|
||||||
public class DefaultedListMixin {
|
|
||||||
@Inject(method = "get", at = @At("HEAD"), cancellable = true)
|
|
||||||
public void scout$fixIndexingSlots(int index, CallbackInfoReturnable<Object> cir) {
|
|
||||||
var playerScreenHandler = ScoutUtil.getPlayerScreenHandler();
|
|
||||||
if (ScoutUtil.isBagSlot(index)) {
|
|
||||||
if (playerScreenHandler != null) {
|
|
||||||
cir.setReturnValue(ScoutUtil.getBagSlot(index, playerScreenHandler));
|
|
||||||
} else {
|
|
||||||
cir.setReturnValue(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue