This commit is contained in:
DarkBum committed 2023-03-18 02:46:28 +01:00
commit 5d5bcab976
8 files changed
+109 -46

No files matched your search

+8 -7
View File
@@ -1,4 +1,4 @@
//version: 1677142954
//version: 1678003329
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -73,7 +73,7 @@ plugins {
id 'com.diffplug.spotless' version '6.7.2' apply false
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
id 'com.gtnewhorizons.retrofuturagradle' version '1.2.2'
id 'com.gtnewhorizons.retrofuturagradle' version '1.2.3'
}
boolean settingsupdated = verifySettingsGradle()
settingsupdated = verifyGitAttributes() || settingsupdated
@@ -153,7 +153,7 @@ java {
} else {
languageVersion.set(projectJavaVersion)
}
vendor.set(JvmVendorSpec.ADOPTIUM)
vendor.set(JvmVendorSpec.AZUL)
}
if (!noPublishedSources) {
withSourcesJar()
@@ -222,7 +222,7 @@ if (enableModernJavaSyntax.toBoolean()) {
javaCompiler.set(javaToolchains.compilerFor {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.ADOPTIUM)
vendor.set(JvmVendorSpec.AZUL)
})
}
}
@@ -695,13 +695,13 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
}
dependencies {
def lwjgl3ifyVersion = '1.1.28'
def lwjgl3ifyVersion = '1.1.35'
def asmVersion = '9.4'
if (modId != 'lwjgl3ify') {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.0.35')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.0.40')
}
java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false}
@@ -718,8 +718,8 @@ dependencies {
ext.java17JvmArgs = [
// Java 9+ support
"--illegal-access=warn",
"-Dfile.encoding=UTF-8",
"-Djava.security.manager=allow",
"-Dfile.encoding=UTF-8",
"--add-opens", "java.base/jdk.internal.loader=ALL-UNNAMED",
"--add-opens", "java.base/java.net=ALL-UNNAMED",
"--add-opens", "java.base/java.nio=ALL-UNNAMED",
@@ -730,6 +730,7 @@ ext.java17JvmArgs = [
"--add-opens", "java.base/java.util=ALL-UNNAMED",
"--add-opens", "java.base/jdk.internal.reflect=ALL-UNNAMED",
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
"--add-opens", "jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED,java.naming",
"--add-opens", "java.desktop/sun.awt.image=ALL-UNNAMED",
"--add-modules", "jdk.dynalink",
"--add-opens", "jdk.dynalink/jdk.dynalink.beans=ALL-UNNAMED",
+2 -2
View File
@@ -3,7 +3,7 @@ modName = Baubles Expanded
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
modId = BaublesExpanded
modGroup = baubles
modGroup =
# WHY is there no version field?
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
@@ -71,7 +71,7 @@ mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatibility only
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
coreModClass =
coreModClass = thaumcraft.codechicken.core.launch.DepLoader
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false
+2 -3
View File
@@ -21,11 +21,10 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
@Mod(modid = Baubles.MODID, name = Baubles.MODNAME, version = Baubles.VERSION)
public class Baubles {
public static final String MODID = "Baubles";
public static final String MODNAME = "Baubles Backwards Compat";
public static final String MODNAME = "Baubles";
public static final String VERSION = "GRADLETOKEN_VERSION";
@SidedProxy(clientSide = "baubles.client.ClientProxy", serverSide = "baubles.common.CommonProxy")
@@ -59,7 +58,7 @@ public class Baubles {
@Mod.EventHandler
public void init(FMLInitializationEvent event) {
//This config is intentionally loaded later than normal.
BaublesConfig.loadConfig(new Configuration(new File(Launch.minecraftHome, "config" + File.separator + "baubles.cfg")));
BaublesConfig.loadConfig(new Configuration(new File(Launch.minecraftHome, "config" + File.separator + "Baubles.cfg")));
NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
proxy.registerKeyBindings();
@@ -44,7 +44,7 @@ public class ContainerPlayerExpanded extends Container {
if (itemStack == null) return false;
return itemStack.getItem().isValidArmor(itemStack, k, thePlayer);
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getBackgroundIconIndex() {
@@ -56,7 +56,7 @@ public class ContainerPlayerExpanded extends Container {
final int slotOffset = 18;
final int slotStartX = 80;
final int slotStartY = 8;
//bauble slots
for(i = 0; i < BaubleExpandedSlots.slotLimit; i++) {
String slotType = BaubleExpandedSlots.getSlotType(i);
@@ -76,7 +76,7 @@ public class ContainerPlayerExpanded extends Container {
for (i = 0; i < 9; ++i) {
addSlotToContainer(new Slot(playerInv, i, slotStartY + i * slotOffset, 142));
}
}
@Override
@@ -89,64 +89,67 @@ public class ContainerPlayerExpanded extends Container {
*/
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex) {
ItemStack itemstack = null;
ItemStack returnStack = null;
Slot slot = (Slot)inventorySlots.get(slotIndex);
final int visibleBaubleSlots = BaublesConfig.showUnusedSlots ? BaubleExpandedSlots.slotLimit : BaubleExpandedSlots.slotsCurrentlyUsed();
if (slot != null && slot.getHasStack()) {
ItemStack itemstack1 = slot.getStack();
itemstack = itemstack1.copy();
Item item = itemstack.getItem();
if (item instanceof ItemArmor && !((Slot)inventorySlots.get(((ItemArmor)item).armorType)).getHasStack()) {
int j = ((ItemArmor)item).armorType;
if (!mergeItemStack(itemstack1, j, j + 1, false)) {
return null;
if(slot != null && slot.getHasStack()) {
ItemStack originalStack = slot.getStack();
returnStack = originalStack.copy();
Item item = returnStack.getItem();
if(item instanceof ItemArmor && !((Slot)inventorySlots.get(((ItemArmor)item).armorType)).getHasStack()) {
int armorSlot = ((ItemArmor)item).armorType;
if(!mergeItemStack(originalStack, armorSlot, armorSlot + 1, false)) {
returnStack = null;
}
} else if (slotIndex >= 4 + visibleBaubleSlots && item instanceof IBauble && ((IBauble)item).canEquip(itemstack, thePlayer)) {
} else if(returnStack != null && slotIndex >= 4 + visibleBaubleSlots && item instanceof IBauble && ((IBauble)item).canEquip(returnStack, thePlayer)) {
for(int baubleSlot = 4; baubleSlot < 4 + visibleBaubleSlots; baubleSlot++) {
if(returnStack == null) {
break;
}
if(!((Slot)inventorySlots.get(baubleSlot)).getHasStack()) {
String[] types;
if(item instanceof IBaubleExpanded) {
types = ((IBaubleExpanded)item).getBaubleTypes(itemstack);
types = ((IBaubleExpanded)item).getBaubleTypes(returnStack);
} else {
types = new String[] {BaubleExpandedSlots.getTypeFromBaubleType(((IBauble)item).getBaubleType(itemstack))};
types = new String[] {BaubleExpandedSlots.getTypeFromBaubleType(((IBauble)item).getBaubleType(returnStack))};
}
for(String type : types) {
if(type.equals(BaubleExpandedSlots.getSlotType(baubleSlot - 4)) && !mergeItemStack(itemstack1, baubleSlot, baubleSlot + 1, false)) {
return null;
if(type.equals(BaubleExpandedSlots.getSlotType(baubleSlot - 4)) && !mergeItemStack(originalStack, baubleSlot, baubleSlot + 1, false)) {
returnStack = null;
}
}
}
}
} else if (slotIndex >= 4 + visibleBaubleSlots && slotIndex < 31 + visibleBaubleSlots) {
if (!mergeItemStack(itemstack1, 31 + visibleBaubleSlots, 40 + visibleBaubleSlots, false)) {
return null;
} else if(returnStack != null && slotIndex >= 4 + visibleBaubleSlots && slotIndex < 31 + visibleBaubleSlots) {
if(!mergeItemStack(originalStack, 31 + visibleBaubleSlots, 40 + visibleBaubleSlots, false)) {
returnStack = null;
}
} else if (slotIndex >= 31 + visibleBaubleSlots && slotIndex < 40 + visibleBaubleSlots) {
if (!mergeItemStack(itemstack1, 4 + visibleBaubleSlots, 31 + visibleBaubleSlots, false)) {
return null;
} else if(returnStack != null && slotIndex >= 31 + visibleBaubleSlots && slotIndex < 40 + visibleBaubleSlots) {
if(!mergeItemStack(originalStack, 4 + visibleBaubleSlots, 31 + visibleBaubleSlots, false)) {
returnStack = null;
}
} else if (!mergeItemStack(itemstack1, 4 + visibleBaubleSlots, 40 + visibleBaubleSlots, false, slot)) {
return null;
} else if(returnStack != null && !mergeItemStack(originalStack, 4 + visibleBaubleSlots, 40 + visibleBaubleSlots, false, slot)) {
returnStack = null;
}
if (itemstack1.stackSize == 0) {
slot.putStack((ItemStack)null);
if(originalStack.stackSize <= 0) {
slot.putStack(null);
} else {
slot.onSlotChanged();
}
if (itemstack1.stackSize == itemstack.stackSize) {
return null;
if(returnStack != null && originalStack.stackSize == returnStack.stackSize) {
returnStack = null;
}
slot.onPickupFromSlot(player, itemstack1);
slot.onPickupFromSlot(player, originalStack);
}
return itemstack;
return returnStack;
}
private void unequipBauble(ItemStack stack) {
// if (stack.getItem() instanceof IBauble) {
// ((IBauble)stack.getItem()).onUnequipped(stack, thePlayer);
@@ -4,6 +4,8 @@ import cpw.mods.fml.relauncher.IFMLCallHook;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import java.util.Map;
@IFMLLoadingPlugin.SortingIndex(-100)
@IFMLLoadingPlugin.MCVersion("1.7.10")
public class DepLoader implements IFMLLoadingPlugin, IFMLCallHook {
@Override
@@ -1,4 +1,33 @@
#
# Items
item.baubleSlotDebugTool.name=饰品插槽调试工具
#
# GUI
button.baubles=饰品
button.normal=普通
#
# Keybinding
keybind.baublesinventory=饰品栏
#
# Tooltips
tooltip.compatibleslots=装备在这些插槽:
tooltip.shiftprompt=按住 §bSHIFT§7 以显示更多信息
#
# Slots
slot.amulet=§a护身符§7
slot.belt=§a腰带§7
slot.body=§a宝石§7
slot.boots=§a靴子§7
slot.cape=§a披肩§7
slot.charm=§a符咒§7
slot.chestplate=§a胸甲§7
slot.earring=§a耳环§7
slot.gauntlet=§a护手§7
slot.head=§a头§7
slot.helmet=§a头盔§7
slot.leggings=§a护腿§7
slot.quiver=§a箭筒§7
slot.ring=§a戒指§7
slot.shield=§a盾牌§7
slot.unknown=§a未知§7
slot.wings=§a翅膀§7
@@ -1,4 +1,33 @@
#
# Items
item.baubleSlotDebugTool.name=飾品插槽調試工具
#
# GUI
button.baubles=飾品裝備欄
button.normal=一般裝備欄
button.normal=普通裝備欄
#
# Keybinding
keybind.baublesinventory=飾品道具欄
#
# Tooltips
tooltip.compatibleslots=裝備在這些插槽:
tooltip.shiftprompt=安上 §bSHIFT§7 為更多信息.
#
# Slots
slot.amulet=§a護身符§7
slot.belt=§a皮帶§7
slot.body=§a身體§7
slot.boots=§a靴子§7
slot.cape=§a披肩§7
slot.charm=§a符咒§7
slot.chestplate=§a胸甲§7
slot.earring=§a耳環§7
slot.gauntlet=§a護手§7
slot.head=§a頭§7
slot.helmet=§a頭盔§7
slot.leggings=§a護腿§7
slot.quiver=§a箭筒§7
slot.ring=§a戒指§7
slot.shield=§a盾牌§7
slot.unknown=§a无名§7
slot.wings=§a翅膀§7
Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 121 B