mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d6b1b5844 | ||
|
|
09c34dac6c | ||
|
|
2ce5306ce8 |
No files matched your search
+2
-2
@@ -3,7 +3,7 @@
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.25-GTNH:dev')
|
||||
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive=false}
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-NH:1.0.2:api')
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-999-GTNH:api')
|
||||
api('com.github.GTNewHorizons:ThaumicBoots:1.5.13:dev') {transitive=false}
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:Botania:1.13.39-GTNH:dev') {transitive=false}
|
||||
@@ -12,7 +12,7 @@ dependencies {
|
||||
compileOnly('com.github.GTNewHorizons:EnderStorage:1.8.9:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:waila:1.19.34:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:TinkersConstruct:1.14.120-GTNH:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:ForgeMultipart:2.0.0:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.7.18:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:CodeChickenCore:1.4.22:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.64-GTNH:api') {transitive=false}
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:api') {transitive=false}
|
||||
|
||||
@@ -6,22 +6,20 @@
|
||||
package thaumic.tinkerer.common.multipart;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import codechicken.lib.data.MCDataInput;
|
||||
import codechicken.lib.vec.BlockCoord;
|
||||
import codechicken.multipart.MultiPartRegistry;
|
||||
import codechicken.multipart.MultiPartRegistry.IPartConverter;
|
||||
import codechicken.multipart.MultiPartRegistry.IPartFactory2;
|
||||
import codechicken.multipart.MultiPartRegistry.IPartFactory;
|
||||
import codechicken.multipart.TMultiPart;
|
||||
|
||||
// This class is used by FMP to recreate a part during loading and to convert already existing non-mutlipart blocks into
|
||||
// multiparts.
|
||||
// this is copied from the version FMP uses for vanilla torches
|
||||
public class RegisterBlockPart implements IPartFactory2, IPartConverter {
|
||||
public class RegisterBlockPart implements IPartFactory, IPartConverter {
|
||||
|
||||
Block block = null;
|
||||
Class<? extends TMultiPart> part = null;
|
||||
@@ -43,22 +41,7 @@ public class RegisterBlockPart implements IPartFactory2, IPartConverter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public TMultiPart createPart(String name, NBTTagCompound nbt) {
|
||||
return newPart(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TMultiPart createPart(String name, MCDataInput packet) {
|
||||
return newPart(name);
|
||||
}
|
||||
|
||||
// Matches the legacy IPartFactory adapter, which answered previews with the client part.
|
||||
@Override
|
||||
public TMultiPart createPartForClientPreview(String name, NBTTagCompound nbt) {
|
||||
return newPart(name);
|
||||
}
|
||||
|
||||
private TMultiPart newPart(String name) {
|
||||
public TMultiPart createPart(String name, boolean client) {
|
||||
if (name.equals(name)) try {
|
||||
return part.getConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
@@ -72,7 +55,7 @@ public class RegisterBlockPart implements IPartFactory2, IPartConverter {
|
||||
public void init() {
|
||||
if (name.isEmpty() || block == null || part == null) return;
|
||||
MultiPartRegistry.registerConverter(this);
|
||||
MultiPartRegistry.registerPartFactory(this, name);
|
||||
MultiPartRegistry.registerParts(this, new String[] { name });
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user