├── src └── main │ ├── java │ └── com │ │ └── nekokittygames │ │ └── thaumictinkerer │ │ ├── common │ │ ├── research │ │ │ ├── tmp │ │ │ └── theorycraft │ │ │ │ ├── AidBlackQuartz.java │ │ │ │ └── CardExperience.java │ │ ├── helper │ │ │ ├── EnumMobAspects.java │ │ │ ├── IItemVariants.java │ │ │ ├── Tuple4Int.java │ │ │ ├── Mat2f.java │ │ │ ├── OreDictHelper.java │ │ │ └── TTVec2f.java │ │ ├── libs │ │ │ ├── LibOreDict.java │ │ │ ├── LibMisc.java │ │ │ ├── LibItemNames.java │ │ │ ├── LibResearch.java │ │ │ ├── LibBlockNames.java │ │ │ └── LibRecipes.java │ │ ├── tileentity │ │ │ ├── TileEntityDissimulation.java │ │ │ ├── TileEntityEnchantmentPillar.java │ │ │ ├── TileEntityItemMagnet.java │ │ │ ├── TileEntityCamoflage.java │ │ │ ├── TileEntityThaumicTinkerer.java │ │ │ ├── TileEntityMobMagnet.java │ │ │ └── transvector │ │ │ │ └── TileEntityTransvector.java │ │ ├── items │ │ │ ├── ItemBlackQuartz.java │ │ │ ├── ItemEnergeticNitor.java │ │ │ ├── ItemSpellbindingCloth.java │ │ │ ├── TTItem.java │ │ │ ├── ItemFormRevealer.java │ │ │ ├── ModItems.java │ │ │ └── ItemMobAspect.java │ │ ├── recipes │ │ │ ├── ing │ │ │ │ ├── TTIngredientNBT.java │ │ │ │ └── TTFocusIngredient.java │ │ │ ├── TTMatrix.java │ │ │ └── SpellClothRecipe.java │ │ ├── utils │ │ │ ├── IVariant.java │ │ │ ├── MiscUtils.java │ │ │ └── ItemNBTHelper.java │ │ ├── blocks │ │ │ ├── BlockInfusionSpark.java │ │ │ ├── BlockBlackQuartz.java │ │ │ ├── BlockDummyNitor.java │ │ │ ├── BlockItemMagnet.java │ │ │ ├── BlockMobMagnet.java │ │ │ ├── BlockDissimulation.java │ │ │ ├── TTBlock.java │ │ │ └── BlockNitorVapor.java │ │ ├── proxy │ │ │ ├── ITTProxy.java │ │ │ └── CommonProxy.java │ │ ├── compat │ │ │ ├── jei │ │ │ │ ├── JEICompat.java │ │ │ │ └── JEIEnchanterHandler.java │ │ │ ├── botania │ │ │ │ ├── AidBotaniaQuartz.java │ │ │ │ └── BotaniaCompat.java │ │ │ └── TiConCompat.java │ │ ├── misc │ │ │ ├── Registers.java │ │ │ ├── ThaumicTInkererCreativeTab.java │ │ │ ├── SingleItemStackHandler.java │ │ │ ├── MiscHelper.java │ │ │ ├── APIHelpers.java │ │ │ └── ThaumicFakePlayer.java │ │ ├── intl │ │ │ └── MultiBlockPreviewRendering.java │ │ ├── crafting │ │ │ └── VisCrystalFactory.java │ │ ├── multiblocks │ │ │ ├── MultiblockBlock.java │ │ │ ├── MultiblockLayer.java │ │ │ └── MultiblockBlockType.java │ │ ├── containers │ │ │ ├── MagnetContainer.java │ │ │ ├── AnimationTabletContainer.java │ │ │ ├── EnchanterContainer.java │ │ │ └── TTGhostSlot.java │ │ ├── packets │ │ │ ├── PacketHandler.java │ │ │ ├── PacketMobMagnet.java │ │ │ ├── PacketMagnetMode.java │ │ │ ├── PacketAddEnchant.java │ │ │ └── PacketTabletButton.java │ │ ├── commands │ │ │ ├── CommandRefreshMultiblocks.java │ │ │ ├── CommandDumpEnchants.java │ │ │ └── CommandThaumicTinkererClient.java │ │ └── foci │ │ │ └── FocusEffectTelekenesis.java │ │ ├── api │ │ ├── IDummyBlock.java │ │ ├── INoRemoveEnchant.java │ │ ├── IFillableJar.java │ │ ├── Materials.java │ │ ├── rendering │ │ │ └── IMultiBlockPreviewRenderer.java │ │ ├── ThaumicTinkererAPI.java │ │ ├── MobAspect.java │ │ └── MobAspects.java │ │ └── client │ │ ├── libs │ │ ├── LibClientMisc.java │ │ └── LibClientResources.java │ │ ├── gui │ │ └── button │ │ │ ├── IRadioButton.java │ │ │ ├── GuiEnchantmentStartButton.java │ │ │ ├── GuiEnchantmentLevelButton.java │ │ │ ├── GuiFramedEnchantmentButton.java │ │ │ └── GuiTexturedButton.java │ │ ├── misc │ │ ├── TTKeys.java │ │ ├── RenderEvents.java │ │ └── EnchantmentGui.java │ │ └── rendering │ │ └── special │ │ └── multi │ │ └── NitorRenderer.java │ └── resources │ ├── assets │ ├── thaumictinkerer │ │ ├── recipes │ │ │ ├── _factories.json │ │ │ ├── share_book.json │ │ │ ├── black_quartz.json │ │ │ ├── connector.json │ │ │ └── black_quartz_block.json │ │ ├── research │ │ │ ├── baubles.json │ │ │ └── foci.json │ │ ├── textures │ │ │ ├── blocks │ │ │ │ ├── repairer │ │ │ │ │ ├── repair_on.png.mcmeta │ │ │ │ │ ├── repair_off.png.mcmeta │ │ │ │ │ ├── base.png │ │ │ │ │ ├── glass.png │ │ │ │ │ ├── glasshole.png │ │ │ │ │ ├── repair_on.png │ │ │ │ │ └── repair_off.png │ │ │ │ ├── example.png │ │ │ │ ├── pillar.png │ │ │ │ ├── repairer.png │ │ │ │ ├── interface.png │ │ │ │ ├── black_quartz.png │ │ │ │ ├── dislocator │ │ │ │ │ ├── on.png │ │ │ │ │ ├── off.png │ │ │ │ │ └── on.png.mcmeta │ │ │ │ ├── dark_quartz_block.png │ │ │ │ ├── funnel │ │ │ │ │ ├── funnel_side.png │ │ │ │ │ └── funnel_top.png │ │ │ │ ├── animation_tablet │ │ │ │ │ ├── top.png │ │ │ │ │ ├── bottom.png │ │ │ │ │ └── side.png │ │ │ │ ├── magnet │ │ │ │ │ ├── mob │ │ │ │ │ │ ├── back_back.png │ │ │ │ │ │ ├── inner_end.png │ │ │ │ │ │ ├── outer_end.png │ │ │ │ │ │ ├── back_sides.png │ │ │ │ │ │ ├── inner_side.png │ │ │ │ │ │ ├── outer_side.png │ │ │ │ │ │ ├── back_front_pull.png │ │ │ │ │ │ ├── back_front_push.png │ │ │ │ │ │ └── outer_side_edge.png │ │ │ │ │ └── item │ │ │ │ │ │ ├── back_back.png │ │ │ │ │ │ ├── back_sides.png │ │ │ │ │ │ ├── inner_end.png │ │ │ │ │ │ ├── inner_side.png │ │ │ │ │ │ ├── outer_end.png │ │ │ │ │ │ ├── outer_side.png │ │ │ │ │ │ ├── back_front_pull.png │ │ │ │ │ │ ├── back_front_push.png │ │ │ │ │ │ └── outer_side_edge.png │ │ │ │ ├── transvector_overlay.png │ │ │ │ ├── enchanter │ │ │ │ │ ├── enchanter_top.png │ │ │ │ │ ├── enchanter_side.png │ │ │ │ │ └── enchanter_bottom.png │ │ │ │ ├── dissimulation │ │ │ │ │ ├── dissimulation.png │ │ │ │ │ └── dissimulation.png.mcmeta │ │ │ │ └── interface.png.mcmeta │ │ │ ├── items │ │ │ │ ├── form_revealer.png.mcmeta │ │ │ │ ├── connector.png │ │ │ │ ├── aspects │ │ │ │ │ ├── aer.png │ │ │ │ │ ├── terra.png │ │ │ │ │ └── aversio.png │ │ │ │ ├── share_book.png │ │ │ │ ├── black_quartz.png │ │ │ │ ├── form_revealer.png │ │ │ │ ├── energetic_nitor.png │ │ │ │ ├── soul_mould │ │ │ │ │ ├── empty.png │ │ │ │ │ └── full.png │ │ │ │ ├── spellbinding_cloth.png │ │ │ │ ├── blood_sword_inactive.png │ │ │ │ └── cleaning_talisman │ │ │ │ │ ├── off.png │ │ │ │ │ └── on.png │ │ │ ├── logo.png │ │ │ ├── misc │ │ │ │ ├── mark.png │ │ │ │ ├── mark.png.mcmeta │ │ │ │ ├── sky1.png │ │ │ │ └── animation_tablet │ │ │ │ │ ├── left.png │ │ │ │ │ ├── right.png │ │ │ │ │ ├── center.png │ │ │ │ │ └── facing_indent.png │ │ │ ├── gui │ │ │ │ ├── enchanter.png │ │ │ │ ├── mob_magnet.png │ │ │ │ └── animation_tablet.png │ │ │ ├── enchant_icons │ │ │ │ └── unknown.png │ │ │ └── foci_icons │ │ │ │ ├── dislocation.png │ │ │ │ └── telekenesis.png │ │ ├── models │ │ │ ├── block │ │ │ │ ├── magnet │ │ │ │ │ └── magnet_pull.json │ │ │ │ ├── item │ │ │ │ │ └── generated.json │ │ │ │ ├── pillar_diag.mtl │ │ │ │ ├── pillar_side.mtl │ │ │ │ ├── osmotic_enchanter.json │ │ │ │ └── animation_tablet.json │ │ │ └── item │ │ │ │ ├── mob_aspect.json │ │ │ │ ├── connector.json │ │ │ │ ├── mob_aspect │ │ │ │ ├── aer.json │ │ │ │ └── aversio.json │ │ │ │ ├── share_book.json │ │ │ │ ├── black_quartz.json │ │ │ │ ├── blood_sword.json │ │ │ │ ├── form_revealer.json │ │ │ │ ├── energetic_nitor.json │ │ │ │ ├── soul_mould_full.json │ │ │ │ ├── spellbinding_cloth.json │ │ │ │ ├── cleaning_talisman_on.json │ │ │ │ ├── soul_mould.json │ │ │ │ ├── cleaning_talisman.json │ │ │ │ └── funnel.json │ │ ├── shaders │ │ │ ├── change_alpha.vert │ │ │ └── change_alpha.frag │ │ └── blockstates │ │ │ ├── animation_tablet.json │ │ │ ├── funnel.json │ │ │ ├── dummy_nitor.json │ │ │ ├── transvector_interface.json │ │ │ ├── dissimulation.json │ │ │ ├── example.json │ │ │ ├── black_quartz_block.json │ │ │ ├── osmotic_enchanter.json │ │ │ ├── transvector_dislocator.json │ │ │ ├── magnet.json │ │ │ ├── mob_magnet.json │ │ │ ├── enchantment_pillar.json │ │ │ └── repairer.json │ └── minecraft │ │ └── textures │ │ └── enchant_icons │ │ ├── lure.png │ │ ├── flame.png │ │ ├── fortune.png │ │ ├── looting.png │ │ ├── mending.png │ │ ├── power.png │ │ ├── punch.png │ │ ├── smite.png │ │ ├── thorns.png │ │ ├── infinity.png │ │ ├── knockback.png │ │ ├── sharpness.png │ │ ├── sweeping.png │ │ ├── efficiency.png │ │ ├── fire_aspect.png │ │ ├── frost_walker.png │ │ ├── protection.png │ │ ├── respiration.png │ │ ├── silk_touch.png │ │ ├── unbreaking.png │ │ ├── aqua_affinity.png │ │ ├── depth_strider.png │ │ ├── blast_protection.png │ │ ├── feather_falling.png │ │ ├── fire_protection.png │ │ ├── luck_of_the_sea.png │ │ ├── bane_of_arthropods.png │ │ └── projectile_protection.png │ ├── pack.mcmeta │ └── mcmod.info ├── models └── Magnet.model ├── textures └── gui │ ├── enchanter.png │ ├── enchanterTest.png │ ├── enchanterExample.png │ └── enchanterTestbad.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .travis.yml ├── .gitignore ├── gradle.properties └── README.md /src/main/java/com/nekokittygames/thaumictinkerer/common/research/tmp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/recipes/_factories.json: -------------------------------------------------------------------------------- 1 | { 2 | "recipes": { 3 | } 4 | } -------------------------------------------------------------------------------- /models/Magnet.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/models/Magnet.model -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/research/baubles.json: -------------------------------------------------------------------------------- 1 | { 2 | "entries": [ 3 | ] 4 | } 5 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/repair_on.png.mcmeta: -------------------------------------------------------------------------------- 1 | {"animation":{"frametime":6} } 2 | -------------------------------------------------------------------------------- /textures/gui/enchanter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/textures/gui/enchanter.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/repair_off.png.mcmeta: -------------------------------------------------------------------------------- 1 | {"animation":{"frametime":4} } 2 | -------------------------------------------------------------------------------- /textures/gui/enchanterTest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/textures/gui/enchanterTest.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /textures/gui/enchanterExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/textures/gui/enchanterExample.png -------------------------------------------------------------------------------- /textures/gui/enchanterTestbad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/textures/gui/enchanterTestbad.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/form_revealer.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "animation": { 4 | 5 | "frametime": 7 6 | 7 | } 8 | 9 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/block/magnet/magnet_pull.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "thaumictinkerer:magnet/magnet_base", 3 | "textures": { 4 | } 5 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/logo.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/misc/mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/misc/mark.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/misc/mark.png.mcmeta: -------------------------------------------------------------------------------- 1 | { "texture": { "blur": true },"animation":{"frametime":5,"frames":[0,1,2,3,4,5,6,7,8,9,10,11,10,9,8,7,6,5,4,3,2,1,0]}} -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/misc/sky1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/misc/sky1.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/lure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/lure.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/block/item/generated.json: -------------------------------------------------------------------------------- 1 | { 2 | "__comment": "Allows blockstates files to use basic item models", 3 | "parent": "minecraft:item/generated" 4 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/mob_aspect.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/aspects/aer" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/flame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/flame.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/fortune.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/fortune.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/looting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/looting.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/mending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/mending.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/power.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/power.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/punch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/punch.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/smite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/smite.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/thorns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/thorns.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/connector.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/connector" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/mob_aspect/aer.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/aspects/aer" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/share_book.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/share_book" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/example.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/pillar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/pillar.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/repairer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/repairer.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/gui/enchanter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/gui/enchanter.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/gui/mob_magnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/gui/mob_magnet.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/connector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/connector.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/infinity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/infinity.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/knockback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/knockback.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/sharpness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/sharpness.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/sweeping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/sweeping.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/black_quartz.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/black_quartz" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/blood_sword.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/blood_sword_inactive" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/form_revealer.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/form_revealer" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/interface.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/aspects/aer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/aspects/aer.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/share_book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/share_book.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/efficiency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/efficiency.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/fire_aspect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/fire_aspect.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/frost_walker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/frost_walker.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/protection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/protection.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/respiration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/respiration.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/silk_touch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/silk_touch.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/unbreaking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/unbreaking.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/energetic_nitor.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/energetic_nitor" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/mob_aspect/aversio.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/aspects/aversio" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/soul_mould_full.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/soul_mould/full" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/spellbinding_cloth.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/spellbinding_cloth" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/black_quartz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/black_quartz.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/dislocator/on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/dislocator/on.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/base.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/gui/animation_tablet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/gui/animation_tablet.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/aspects/terra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/aspects/terra.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/black_quartz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/black_quartz.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/form_revealer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/form_revealer.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/aqua_affinity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/aqua_affinity.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/depth_strider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/depth_strider.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/dislocator/off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/dislocator/off.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/glass.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/enchant_icons/unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/enchant_icons/unknown.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/foci_icons/dislocation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/foci_icons/dislocation.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/foci_icons/telekenesis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/foci_icons/telekenesis.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/aspects/aversio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/aspects/aversio.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/energetic_nitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/energetic_nitor.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/soul_mould/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/soul_mould/empty.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/soul_mould/full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/soul_mould/full.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/blast_protection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/blast_protection.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/feather_falling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/feather_falling.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/fire_protection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/fire_protection.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/luck_of_the_sea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/luck_of_the_sea.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/cleaning_talisman_on.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/cleaning_talisman/on" 5 | } 6 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/dark_quartz_block.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/dark_quartz_block.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/funnel/funnel_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/funnel/funnel_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/funnel/funnel_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/funnel/funnel_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/glasshole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/glasshole.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/repair_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/repair_on.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/spellbinding_cloth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/spellbinding_cloth.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/bane_of_arthropods.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/bane_of_arthropods.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/animation_tablet/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/animation_tablet/top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/back_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/back_back.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/inner_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/inner_end.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/outer_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/outer_end.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/repair_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/repairer/repair_off.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/transvector_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/transvector_overlay.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/blood_sword_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/blood_sword_inactive.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/cleaning_talisman/off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/cleaning_talisman/off.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/items/cleaning_talisman/on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/items/cleaning_talisman/on.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/misc/animation_tablet/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/misc/animation_tablet/left.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/misc/animation_tablet/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/misc/animation_tablet/right.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/enchant_icons/projectile_protection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/minecraft/textures/enchant_icons/projectile_protection.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/animation_tablet/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/animation_tablet/bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/animation_tablet/side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/animation_tablet/side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/enchanter/enchanter_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/enchanter/enchanter_top.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/back_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/back_back.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/back_sides.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/back_sides.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/inner_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/inner_end.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/inner_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/inner_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/outer_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/outer_end.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/outer_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/outer_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/back_sides.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/back_sides.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/inner_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/inner_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/outer_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/outer_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/misc/animation_tablet/center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/misc/animation_tablet/center.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/enchanter/enchanter_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/enchanter/enchanter_side.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/dissimulation/dissimulation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/dissimulation/dissimulation.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/enchanter/enchanter_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/enchanter/enchanter_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/back_front_pull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/back_front_pull.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/back_front_push.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/back_front_push.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/outer_side_edge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/item/outer_side_edge.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/back_front_pull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/back_front_pull.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/back_front_push.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/back_front_push.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/outer_side_edge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/blocks/magnet/mob/outer_side_edge.png -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/misc/animation_tablet/facing_indent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thaumic-Tinkerer/ThaumicTinkerer/HEAD/src/main/resources/assets/thaumictinkerer/textures/misc/animation_tablet/facing_indent.png -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/helper/EnumMobAspects.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.common.helper; 6 | 7 | public class EnumMobAspects { 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/shaders/change_alpha.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | 4 | void main() { 5 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 6 | gl_TexCoord[0] = gl_MultiTexCoord0; 7 | gl_FrontColor = gl_Color; 8 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/shaders/change_alpha.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | uniform float alpha; 4 | uniform sampler2D tex; 5 | 6 | void main() { 7 | gl_FragColor = texture2D(tex, vec2(gl_TexCoord[0])) * gl_Color * vec4(1.0, 1.0, 1.0, alpha); 8 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/interface.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | animation: { 3 | frames: [ 4 | 0, 5 | 1, 6 | 2, 7 | 3, 8 | 4, 9 | 5, 10 | 6, 11 | 7, 12 | 8, 13 | 9, 14 | 10, 15 | { 16 | index: 11, 17 | time: 25 18 | } 19 | ] 20 | } 21 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Sep 14 12:28:28 PDT 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/block/pillar_diag.mtl: -------------------------------------------------------------------------------- 1 | # Rhino 2 | newmtl All 3 | Ka 0.0000 0.0000 0.0000 4 | Kd 1.0000 1.0000 1.0000 5 | Ks 1.0000 1.0000 1.0000 6 | Tf 0.0000 0.0000 0.0000 7 | d 1.0000 8 | Ns 0 9 | map_Kd thaumictinkerer:blocks/pillar 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/block/pillar_side.mtl: -------------------------------------------------------------------------------- 1 | # Rhino 2 | newmtl All 3 | Ka 0.0000 0.0000 0.0000 4 | Kd 1.0000 1.0000 1.0000 5 | Ks 1.0000 1.0000 1.0000 6 | Tf 0.0000 0.0000 0.0000 7 | d 1.0000 8 | Ns 0 9 | map_Kd thaumictinkerer:blocks/pillar 10 | 11 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/api/IDummyBlock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.api; 6 | 7 | public interface IDummyBlock { 8 | 9 | String getReplacementBlock(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/libs/LibOreDict.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.libs; 2 | 3 | public class LibOreDict { 4 | public static final String BLACK_QUARTZ = "quartzDark"; 5 | 6 | 7 | public static final String BLACK_QUARTZ_BLOCK = "blockQuartzDark"; 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/api/INoRemoveEnchant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.api; 6 | 7 | /** 8 | * If an item implements this interface, enchants will not be removed from it 9 | */ 10 | public interface INoRemoveEnchant { 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/tileentity/TileEntityDissimulation.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.tileentity; 2 | 3 | public class TileEntityDissimulation extends TileEntityCamoflage { 4 | @Override 5 | public boolean respondsToPulses() { 6 | return false; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/helper/IItemVariants.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.helper; 2 | 3 | import net.minecraft.item.ItemStack; 4 | 5 | import java.util.Set; 6 | 7 | public interface IItemVariants { 8 | String GetVariant(ItemStack stack); 9 | Set GetVariants(); 10 | } 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | install: true 3 | before_cache: 4 | - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock 5 | - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ 6 | cache: 7 | directories: 8 | - $HOME/.gradle/caches/ 9 | - $HOME/.gradle/wrapper/ 10 | script: 11 | - ./gradlew setupDecompWorkspace 12 | - ./gradlew build -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/items/ItemBlackQuartz.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.items; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.libs.LibItemNames; 4 | 5 | public class ItemBlackQuartz extends TTItem { 6 | public ItemBlackQuartz() { 7 | super(LibItemNames.BLACK_QUARTZ); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/soul_mould.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/soul_mould/empty" 5 | }, 6 | "overrides": [ 7 | { 8 | "predicate": { 9 | "thaumictinkerer:full": 1 10 | }, 11 | "model": "thaumictinkerer:item/soul_mould_full" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/helper/Tuple4Int.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.helper; 2 | 3 | public class Tuple4Int { 4 | 5 | public int i1, i2, i3, i4; 6 | 7 | public Tuple4Int(int i1, int i2, int i3, int i4) { 8 | this.i1 = i1; 9 | this.i2 = i2; 10 | this.i3 = i3; 11 | this.i4 = i4; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/recipes/ing/TTIngredientNBT.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.recipes.ing; 2 | 3 | import net.minecraft.item.ItemStack; 4 | import net.minecraftforge.common.crafting.IngredientNBT; 5 | 6 | public class TTIngredientNBT extends IngredientNBT { 7 | public TTIngredientNBT(ItemStack stack) { 8 | super(stack); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/utils/IVariant.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.utils; 2 | 3 | import net.minecraft.util.IStringSerializable; 4 | 5 | public interface IVariant extends IStringSerializable { 6 | 7 | /** 8 | * Get the metadata value of this variant. 9 | * 10 | * @return The metadata value 11 | */ 12 | int getMeta(); 13 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/cleaning_talisman.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "thaumictinkerer:items/cleaning_talisman/off" 5 | }, 6 | "overrides": [ 7 | { 8 | "predicate": { 9 | "thaumictinkerer:status": 1 10 | }, 11 | "model": "thaumictinkerer:item/cleaning_talisman_on" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/animation_tablet.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "model": "thaumictinkerer:animation_tablet" 5 | }, 6 | "variants": { 7 | "normal": { 8 | "model": "thaumictinkerer:animation_tablet" 9 | }, 10 | "inventory": { 11 | "model": "thaumictinkerer:animation_tablet", 12 | "transform": "forge:default-block" 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/blocks/BlockInfusionSpark.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.blocks; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.libs.LibBlockNames; 4 | import net.minecraft.block.material.Material; 5 | 6 | public class BlockInfusionSpark extends TTBlock { 7 | public BlockInfusionSpark() { 8 | super(LibBlockNames.INFUSION_SPARK, Material.WOOD); 9 | } 10 | 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "ThaumicTinkerer resources", 4 | "pack_format": 3, 5 | "_comment": "A pack_format of 3 should be used starting with Minecraft 1.11. All resources, including language files, should be lowercase (eg: en_us.lang). A pack_format of 2 will load your mod resources with LegacyV2Adapter, which requires language files to have uppercase letters (eg: en_US.lang)." 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/blocks/BlockBlackQuartz.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.blocks; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.libs.LibBlockNames; 4 | import net.minecraft.block.material.Material; 5 | 6 | public class BlockBlackQuartz extends TTBlock { 7 | public BlockBlackQuartz() { 8 | super(LibBlockNames.BLACK_QUARTZ_BLOCK, Material.ROCK); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/dislocator/on.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "animation": { 3 | "frames": [ 4 | 0, 5 | 1, 6 | 2, 7 | 3, 8 | 4, 9 | 5, 10 | 6, 11 | 7, 12 | 8, 13 | 9, 14 | 10, 15 | { 16 | "index": 11, 17 | "time": 25 18 | } 19 | ] 20 | } 21 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/helper/Mat2f.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.helper; 2 | 3 | public class Mat2f { 4 | public float m00 = 0.0f; 5 | public float m01 = 0.0f; 6 | public float m10 = 0.0f; 7 | public float m11 = 0.0f; 8 | 9 | public Mat2f setIdentity() { 10 | this.m00 = 1.0f; 11 | this.m01 = 0.0f; 12 | this.m10 = 0.0f; 13 | this.m11 = 1.0f; 14 | return this; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/textures/blocks/dissimulation/dissimulation.png.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "animation": { 3 | "frametime": 200, 4 | "interpolate": true, 5 | "frames": [ 6 | 0, 7 | 1, 8 | 0, 9 | 2, 10 | 0, 11 | 3, 12 | 0, 13 | 1, 14 | 2, 15 | 1, 16 | 3, 17 | 1, 18 | 0, 19 | 2, 20 | 1, 21 | 2, 22 | 3, 23 | 2, 24 | 0, 25 | 3, 26 | 1, 27 | 3 28 | ] 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/tileentity/TileEntityEnchantmentPillar.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.tileentity; 2 | 3 | import net.minecraft.nbt.NBTTagCompound; 4 | import net.minecraft.nbt.NBTUtil; 5 | import net.minecraft.util.math.BlockPos; 6 | 7 | public class TileEntityEnchantmentPillar extends TileEntityThaumicTinkerer { 8 | @Override 9 | public boolean respondsToPulses() { 10 | return false; 11 | } 12 | 13 | 14 | 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/client/libs/LibClientMisc.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.client.libs; 6 | 7 | import com.nekokittygames.thaumictinkerer.common.libs.LibMisc; 8 | 9 | /** 10 | * The Miscallaneous Client Library. 11 | */ 12 | public class LibClientMisc { 13 | /** 14 | * Standard resource prefix for this mod 15 | */ 16 | public static final String RESOURCE_PREFIX = LibMisc.MOD_ID + ":"; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/recipes/share_book.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "pattern": [ 4 | " S ", 5 | "PTP", 6 | " P " 7 | ], 8 | "key": { 9 | "S": { 10 | "item": "thaumcraft:scribing_tools" 11 | }, 12 | "P": { 13 | "item": "minecraft:paper", 14 | "data": 0 15 | }, 16 | "T": { 17 | "item": "thaumcraft:thaumonomicon", 18 | "data": 0 19 | } 20 | }, 21 | "result": { 22 | "item": "thaumictinkerer:share_book" 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/api/IFillableJar.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.api; 6 | 7 | import thaumcraft.api.aspects.Aspect; 8 | 9 | /** 10 | * Fillable jar interface 11 | */ 12 | public interface IFillableJar { 13 | /** 14 | * Gets the max capacity of the jar 15 | * 16 | * @param aspect Aspect querying 17 | * @return amount of aspect jar is able to handle 18 | */ 19 | int getMaxCapacity(Aspect aspect); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/proxy/ITTProxy.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.proxy; 2 | 3 | import net.minecraftforge.fml.common.event.FMLInitializationEvent; 4 | import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; 5 | 6 | public interface ITTProxy { 7 | 8 | 9 | void registerRenderers(); 10 | 11 | String localize(String translationKey, Object... args); 12 | 13 | void init(FMLInitializationEvent event); 14 | 15 | void preInit(FMLPreInitializationEvent event); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/funnel.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "model": "thaumictinkerer:funnel" 5 | }, 6 | "variants": { 7 | "default": { 8 | "model": "thaumictinkerer:funnel" 9 | }, 10 | "jar=false": { 11 | "model": "thaumictinkerer:funnel" 12 | }, 13 | "jar=true": { 14 | "model": "thaumictinkerer:funnel_jar" 15 | }, 16 | "inventory": { 17 | "model": "thaumictinkerer:funnel", 18 | "transform": "forge:default-block" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/recipes/black_quartz.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "pattern": [ 4 | " Q ", 5 | "QCQ", 6 | " Q " 7 | ], 8 | "key": { 9 | "Q": { 10 | "item": "minecraft:quartz" 11 | }, 12 | "C": [ 13 | { 14 | "item": "minecraft:coal", 15 | "data": 0 16 | }, 17 | { 18 | "item": "minecraft:coal", 19 | "data": 1 20 | } 21 | ] 22 | }, 23 | "result": { 24 | "item": "thaumictinkerer:black_quartz" 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/recipes/connector.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shaped", 3 | "pattern": [ 4 | " I ", 5 | " WI", 6 | "S " 7 | ], 8 | "key": { 9 | "I": { 10 | "type": "forge:ore_dict", 11 | "ore": "ingotIron" 12 | }, 13 | "W": { 14 | "type": "forge:ore_dict", 15 | "ore": "stickWood" 16 | }, 17 | "S": { 18 | "item": "thaumcraft:crystal_essence", 19 | "data": 32767 20 | } 21 | }, 22 | "result": { 23 | "item": "thaumictinkerer:connector" 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/compat/jei/JEICompat.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.compat.jei; 2 | 3 | import mezz.jei.api.IModPlugin; 4 | import mezz.jei.api.IModRegistry; 5 | import mezz.jei.api.JEIPlugin; 6 | 7 | @JEIPlugin 8 | public class JEICompat implements IModPlugin { 9 | 10 | public static void initJEI() { 11 | // Empty 12 | 13 | } 14 | 15 | @Override 16 | public void register(IModRegistry registry) { 17 | registry.addAdvancedGuiHandlers(new JEIEnchanterHandler()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/api/Materials.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.api; 6 | 7 | import net.minecraft.item.Item; 8 | import net.minecraft.item.ItemStack; 9 | import net.minecraftforge.common.util.EnumHelper; 10 | import thaumcraft.api.items.ItemsTC; 11 | 12 | public class Materials { 13 | public static Item.ToolMaterial BLOOD_MATERIAL; 14 | 15 | static { 16 | BLOOD_MATERIAL=EnumHelper.addToolMaterial("BLOOD", 3, 500, 7.0F, 10F, 22).setRepairItem(new ItemStack(ItemsTC.ingots)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/recipes/black_quartz_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "ingredients": [ 4 | { 5 | "type": "forge:ore_dict", 6 | "ore": "quartzDark" 7 | }, 8 | { 9 | "type": "forge:ore_dict", 10 | "ore": "quartzDark" 11 | }, 12 | { 13 | "type": "forge:ore_dict", 14 | "ore": "quartzDark" 15 | }, 16 | { 17 | "type": "forge:ore_dict", 18 | "ore": "quartzDark" 19 | } 20 | ], 21 | "result": 22 | { 23 | "item": "thaumictinkerer:black_quartz_block", 24 | "count": 1 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/libs/LibMisc.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.libs; 2 | 3 | import java.util.UUID; 4 | 5 | public class LibMisc { 6 | 7 | public static final String MOD_ID = "thaumictinkerer"; 8 | public static final String MOD_NAME = "Thaumic Tinkerer"; 9 | public static final String MOD_VERSION = "@VERSION@"; 10 | public static final String MOD_DEPENDENCIES = "required-after:thaumcraft"; 11 | public static final UUID MOD_UUID = UUID.fromString("1075e113-b93f-464d-96e0-f57c78f080ea"); 12 | public static final String MOD_F_NAME = "[ThaumicTinkerer]"; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/dummy_nitor.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "textures": { 5 | "side": "thaumcraft:blocks/nitor", 6 | "north": "thaumcraft:blocks/nitor", 7 | "south": "#side", 8 | "east": "#side", 9 | "west": "#side", 10 | "up": "#side", 11 | "down": "#side", 12 | "particle": "#side" 13 | }, 14 | "model": "cube", 15 | "uvlock": true 16 | }, 17 | "variants": { 18 | "normal": [ 19 | {} 20 | ], 21 | "inventory": { 22 | "model": "cube", 23 | "transform": "forge:default-block" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/transvector_interface.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "textures": { 5 | "side": "thaumictinkerer:blocks/interface", 6 | "north": "#side", 7 | "south": "#side", 8 | "east": "#side", 9 | "west": "#side", 10 | "up": "#side", 11 | "down": "#side", 12 | "particle": "#side" 13 | }, 14 | "model": "cube", 15 | "uvlock": true 16 | }, 17 | "variants": { 18 | "normal": [ 19 | {} 20 | ], 21 | "inventory": { 22 | "model": "cube", 23 | "transform": "forge:default-block" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/misc/Registers.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.misc; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.recipes.ModRecipes; 4 | import net.minecraft.item.crafting.IRecipe; 5 | import net.minecraftforge.event.RegistryEvent; 6 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 7 | 8 | @net.minecraftforge.fml.common.Mod.EventBusSubscriber 9 | public class Registers { 10 | 11 | @SubscribeEvent 12 | public static void registerVanillaRecipes(RegistryEvent.Register event) { 13 | ModRecipes.initializeRecipes(event.getRegistry()); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/dissimulation.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "textures": { 5 | "side": "thaumictinkerer:blocks/dissimulation/dissimulation", 6 | "north": "#side", 7 | "south": "#side", 8 | "east": "#side", 9 | "west": "#side", 10 | "up": "#side", 11 | "down": "#side", 12 | "particle": "#side" 13 | }, 14 | "model": "cube", 15 | "uvlock": true 16 | }, 17 | "variants": { 18 | "normal": [ 19 | {} 20 | ], 21 | "inventory": { 22 | "model": "cube", 23 | "transform": "forge:default-block" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "textures": { 5 | "side": "thaumictinkerer:blocks/example", 6 | "north": "thaumictinkerer:blocks/example", 7 | "south": "#side", 8 | "east": "#side", 9 | "west": "#side", 10 | "up": "#side", 11 | "down": "#side", 12 | "particle": "#side" 13 | }, 14 | "model": "cube", 15 | "uvlock": true 16 | }, 17 | "variants": { 18 | "normal": [ 19 | {} 20 | ], 21 | "inventory": { 22 | "model": "cube", 23 | "transform": "forge:default-block" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | dist 3 | download 4 | push.sh 5 | remotebuild.py 6 | local.properties 7 | ## gradle 8 | /.gradle 9 | /build 10 | /eclipse 11 | /gradlew.bat 12 | /libs 13 | 14 | 15 | ## ForgeGradle 16 | /run 17 | /out 18 | /ForgeModule 19 | /libs/download 20 | 21 | ## idea 22 | *.iml 23 | *.ipr 24 | *.iws 25 | 26 | ## eclipse 27 | /.settings 28 | /.metadata 29 | /.classpath 30 | /.project 31 | /bin 32 | /.idea 33 | /client/ 34 | /Server/ 35 | /classes/ 36 | ## misc 37 | /libs/Thaumcraft-deobf*.jar* 38 | /libs/*1.7.10* 39 | TCDEOBF* 40 | ## Ignore OS cache files 41 | *.DS_Store 42 | _MACOSX 43 | Thumbs.db 44 | /forgelibs 45 | 46 | ## Ignore unnecessary files 47 | *.log 48 | *.lck 49 | /target/ -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/black_quartz_block.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "textures": { 5 | "side": "thaumictinkerer:blocks/black_quartz", 6 | "north": "thaumictinkerer:blocks/black_quartz", 7 | "south": "#side", 8 | "east": "#side", 9 | "west": "#side", 10 | "up": "#side", 11 | "down": "#side", 12 | "particle": "#side" 13 | }, 14 | "model": "cube", 15 | "uvlock": true 16 | }, 17 | "variants": { 18 | "normal": [ 19 | {} 20 | ], 21 | "inventory": { 22 | "model": "cube", 23 | "transform": "forge:default-block" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/misc/ThaumicTInkererCreativeTab.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.misc; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.blocks.ModBlocks; 4 | import net.minecraft.creativetab.CreativeTabs; 5 | import net.minecraft.item.ItemStack; 6 | 7 | import javax.annotation.Nonnull; 8 | import java.util.Objects; 9 | 10 | public class ThaumicTInkererCreativeTab extends CreativeTabs { 11 | public ThaumicTInkererCreativeTab() { 12 | super("thaumictinkerer"); 13 | } 14 | 15 | @Nonnull 16 | @Override 17 | public ItemStack createIcon() { 18 | return new ItemStack(Objects.requireNonNull(ModBlocks.repairer)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/misc/SingleItemStackHandler.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.misc; 2 | 3 | import net.minecraft.item.ItemStack; 4 | import net.minecraft.util.NonNullList; 5 | import net.minecraftforge.items.ItemStackHandler; 6 | 7 | public class SingleItemStackHandler extends ItemStackHandler { 8 | 9 | 10 | public SingleItemStackHandler() { 11 | } 12 | 13 | public SingleItemStackHandler(int size) { 14 | super(size); 15 | } 16 | 17 | public SingleItemStackHandler(NonNullList stacks) { 18 | super(stacks); 19 | } 20 | 21 | @Override 22 | public int getSlotLimit(int slot) { 23 | return 1; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/blocks/BlockDummyNitor.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.blocks; 2 | 3 | import com.nekokittygames.thaumictinkerer.api.IDummyBlock; 4 | import com.nekokittygames.thaumictinkerer.common.libs.LibBlockNames; 5 | import net.minecraft.block.material.Material; 6 | 7 | public class BlockDummyNitor extends TTBlock implements IDummyBlock { 8 | public BlockDummyNitor() { 9 | super(LibBlockNames.DUMMY_NITOR,Material.CIRCUITS); 10 | } 11 | 12 | @Override 13 | protected boolean isInCreativeTab() { 14 | return false; 15 | } 16 | 17 | @Override 18 | public String getReplacementBlock() { 19 | return "thaumcraft:nitor_yellow"; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/blocks/BlockItemMagnet.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.blocks; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.libs.LibBlockNames; 4 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityItemMagnet; 5 | import net.minecraft.block.state.IBlockState; 6 | import net.minecraft.tileentity.TileEntity; 7 | import net.minecraft.world.World; 8 | 9 | public class BlockItemMagnet extends BlockMagnet { 10 | public BlockItemMagnet() { 11 | super(LibBlockNames.MAGNET); 12 | 13 | } 14 | 15 | @Override 16 | public TileEntity createTileEntity(World world, IBlockState state) { 17 | return new TileEntityItemMagnet(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/osmotic_enchanter.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "textures": { 5 | "side": "thaumictinkerer:blocks/enchanter/enchanter_side", 6 | "north": "#side", 7 | "south": "#side", 8 | "east": "#side", 9 | "west": "#side", 10 | "up": "thaumictinkerer:blocks/enchanter/enchanter_top", 11 | "down": "thaumictinkerer:blocks/enchanter/enchanter_bottom", 12 | "particle": "#side" 13 | }, 14 | "model": "thaumictinkerer:osmotic_enchanter", 15 | "uvlock": true 16 | }, 17 | "variants": { 18 | "normal": [ 19 | {} 20 | ], 21 | "inventory": { 22 | "model": "thaumictinkerer:osmotic_enchanter", 23 | "transform": "forge:default-block" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Sets default memory used for gradle commands. Can be overridden by user or command line properties. 2 | # This is required to provide enough memory for the Minecraft decompilation process. 3 | org.gradle.jvmargs=-Xmx3G 4 | mod_name=thaumictinkerer 5 | package_group=com.nekokittygames.thaumictinkerer 6 | 7 | mc_version=1.12.2 8 | forge_version=14.23.5.2838 9 | mappings_version=snapshot_20171003 10 | 11 | jei_version=4.13.0.219 12 | hwyla_version=1.8.25-B40 13 | baubles_version=5df3d46 14 | redstone_flux_version=2.+ 15 | mantle_version=1.3.+ 16 | tconstruct_version=2.7.+ 17 | probe_version=1.+ 18 | actually_additions_version=r134 19 | open_computers_version=1.7.2.67 20 | 21 | # Minecraft uses Apache HTTP Client 4.3.3, so we have to use the same version of the Fluent API 22 | httpclient_version=4.3.3 23 | 24 | mod_version=5.0 25 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/misc/MiscHelper.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.misc; 2 | 3 | import net.minecraft.entity.Entity; 4 | import thaumcraft.codechicken.lib.vec.Vector3; 5 | 6 | 7 | public class MiscHelper { 8 | 9 | 10 | public static void setEntityMotionFromVector(Entity entity, Vector3 originalPosVector, float modifier) { 11 | Vector3 entityVector = Vector3.fromEntityCenter(entity); 12 | Vector3 finalVector = originalPosVector.copy().subtract(entityVector); 13 | 14 | if (finalVector.mag() > 1) 15 | finalVector.normalize(); 16 | 17 | entity.motionX = finalVector.x * modifier; 18 | entity.motionY = finalVector.y * modifier; 19 | entity.motionZ = finalVector.z * modifier; 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/intl/MultiBlockPreviewRendering.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.intl; 2 | 3 | import com.nekokittygames.thaumictinkerer.api.rendering.IMultiBlockPreviewRenderer; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | public class MultiBlockPreviewRendering { 9 | private static Map renderers = new HashMap<>(); 10 | 11 | public static void registerRenderer(Class clazz, IMultiBlockPreviewRenderer renderer) { 12 | if (!renderers.containsKey(clazz)) 13 | renderers.put(clazz, renderer); 14 | } 15 | 16 | public static IMultiBlockPreviewRenderer getRenderer(Class clazz) { 17 | if (renderers.containsKey(clazz)) 18 | return renderers.get(clazz); 19 | return null; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/research/theorycraft/AidBlackQuartz.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.common.research.theorycraft; 6 | 7 | import net.minecraft.block.Block; 8 | import thaumcraft.api.research.theorycraft.ITheorycraftAid; 9 | import thaumcraft.api.research.theorycraft.TheorycraftCard; 10 | 11 | public class AidBlackQuartz implements ITheorycraftAid { 12 | private Block curBlock; 13 | public AidBlackQuartz(Block researchBlock) { 14 | curBlock=researchBlock; 15 | } 16 | 17 | @Override 18 | public Object getAidObject() { 19 | return curBlock; 20 | } 21 | 22 | @SuppressWarnings("unchecked") 23 | @Override 24 | public Class[] getCards() { 25 | return new Class[]{ CardExperience.class}; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/resources/mcmod.info: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "modid": "thaumictinkerer", 4 | "name": "Thaumic Tinkerer", 5 | "description": "An addon to Thaumcraft 6, implementing new content. This mod is a spiritual successor to Elemental Tinkerer. Researches that come from this mod are prefixed by [TT]..", 6 | "version": "${version}", 7 | "mcversion": "${mcversion}", 8 | "url": "https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/2552088-thaumic-tinkerer-5-0-thaumcraft-addon-evolve", 9 | "updateUrl": "", 10 | "authorList": ["KatrinaAS"], 11 | "credits": "Azanor, TheAtlanticCraft, MartysGames, TheWhiteWolves, mDiyo, theFlaxbeard, Languages: Hesperusrus & Artleksandr - Russian, DYColdWind - Simplified Chinese, aimeesunflower - British English, Irish Gaeilge, Scottish Gaelic.", 12 | "logoFile": "/assets/thaumictinkerer/textures/logo.png", 13 | "screenshots": [], 14 | "dependencies": ["thaumcraft"] 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/helper/OreDictHelper.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.helper; 2 | 3 | import net.minecraft.block.state.IBlockState; 4 | import net.minecraft.item.ItemStack; 5 | import net.minecraftforge.oredict.OreDictionary; 6 | 7 | public class OreDictHelper { 8 | public static boolean oreDictCheck(IBlockState state, int oreDictNum) 9 | { 10 | ItemStack stack=new ItemStack(state.getBlock(),1,state.getBlock().getMetaFromState(state)); 11 | if(stack.isEmpty()) 12 | return false; 13 | int[] nums= OreDictionary.getOreIDs(stack); 14 | for(int i:nums) { 15 | if (i == oreDictNum) 16 | return true; 17 | } 18 | return false; 19 | 20 | } 21 | 22 | public static boolean oreDictCheck(IBlockState state, String oreDict) { 23 | return oreDictCheck(state,OreDictionary.getOreID(oreDict)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/helper/TTVec2f.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.helper; 2 | 3 | 4 | public class TTVec2f { 5 | 6 | public static final TTVec2f ZERO = new TTVec2f(0.0F, 0.0F); 7 | public static final TTVec2f ONE = new TTVec2f(1.0F, 1.0F); 8 | public static final TTVec2f UNIT_X = new TTVec2f(1.0F, 0.0F); 9 | public static final TTVec2f NEGATIVE_UNIT_X = new TTVec2f(-1.0F, 0.0F); 10 | public static final TTVec2f UNIT_Y = new TTVec2f(0.0F, 1.0F); 11 | public static final TTVec2f NEGATIVE_UNIT_Y = new TTVec2f(0.0F, -1.0F); 12 | public static final TTVec2f MAX = new TTVec2f(3.4028235E38F, 3.4028235E38F); 13 | public static final TTVec2f MIN = new TTVec2f(1.4E-45F, 1.4E-45F); 14 | public final float x; 15 | public final float y; 16 | 17 | public TTVec2f(float xIn, float yIn) { 18 | this.x = xIn; 19 | this.y = yIn; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/compat/botania/AidBotaniaQuartz.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.common.compat.botania; 6 | 7 | import com.nekokittygames.thaumictinkerer.common.research.theorycraft.CardExperience; 8 | import net.minecraft.block.Block; 9 | import thaumcraft.api.research.theorycraft.ITheorycraftAid; 10 | import thaumcraft.api.research.theorycraft.TheorycraftCard; 11 | 12 | public class AidBotaniaQuartz implements ITheorycraftAid { 13 | private Block curBlock; 14 | public AidBotaniaQuartz(Block researchBlock) { 15 | curBlock=researchBlock; 16 | } 17 | 18 | @Override 19 | public Object getAidObject() { 20 | return curBlock; 21 | } 22 | 23 | @SuppressWarnings("unchecked") 24 | @Override 25 | public Class[] getCards() { 26 | return new Class[]{ CardExperience.class}; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/libs/LibItemNames.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.libs; 2 | 3 | public class LibItemNames { 4 | 5 | public static final String SHARE_BOOK = "share_book"; 6 | public static final String CLEANING_TALISMAN = "cleaning_talisman"; 7 | public static final String BLACK_QUARTZ = "black_quartz"; 8 | public static final String CONNECTOR = "connector"; 9 | public static final String SOUL_MOULD = "soul_mould"; 10 | public static final String ENERGETIC_NITOR = "energetic_nitor"; 11 | public static final String FORM_REVEALER = "form_revealer"; 12 | public static final String SPELLBINDING_CLOTH="spellbinding_cloth"; 13 | 14 | public static final String BLOOD_SWORD="blood_sword"; 15 | public static final String MOB_ASPECT="mob_aspect"; 16 | public static final String ICHOR = "ichor"; 17 | public static final String ICHORIUM = "ichorium"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/utils/MiscUtils.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.utils; 2 | 3 | public class MiscUtils { 4 | /** 5 | * Returns null. 6 | *

7 | * This is used in the initialisers of static final fields instead of using null directly 8 | * to suppress the "Argument might be null" warnings from IntelliJ IDEA's "Constant conditions & exceptions" inspection. 9 | *

10 | * Based on diesieben07's solution here. 11 | * 12 | * @param The field's type. 13 | * @return null 14 | */ 15 | @SuppressWarnings({"ConstantConditions", "SameReturnValue"}) 16 | public static T nullz() { 17 | return null; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/blocks/BlockMobMagnet.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.blocks; 2 | 3 | import com.nekokittygames.thaumictinkerer.ThaumicTinkerer; 4 | import com.nekokittygames.thaumictinkerer.common.libs.LibBlockNames; 5 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityMobMagnet; 6 | import net.minecraft.block.state.IBlockState; 7 | import net.minecraft.entity.player.EntityPlayer; 8 | import net.minecraft.tileentity.TileEntity; 9 | import net.minecraft.util.EnumFacing; 10 | import net.minecraft.util.EnumHand; 11 | import net.minecraft.util.math.BlockPos; 12 | import net.minecraft.world.World; 13 | 14 | public class BlockMobMagnet extends BlockMagnet { 15 | 16 | public BlockMobMagnet() { 17 | super(LibBlockNames.MOB_MAGNET); 18 | } 19 | 20 | @Override 21 | public TileEntity createTileEntity(World world, IBlockState state) { 22 | return new TileEntityMobMagnet(); 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/api/rendering/IMultiBlockPreviewRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.api.rendering; 6 | 7 | import net.minecraft.block.state.IBlockState; 8 | import net.minecraft.util.math.BlockPos; 9 | import net.minecraft.world.World; 10 | 11 | /** 12 | * Provides a callback to render a block in the multiblock preview 13 | */ 14 | public interface IMultiBlockPreviewRenderer { 15 | 16 | /** 17 | * Called by the multiblock preview renderer to render the block 18 | * 19 | * @param pos position of the block in world 20 | * @param x xPos of block 21 | * @param y yPos of block 22 | * @param z zPos of block 23 | * @param world current World object 24 | * @param blockState current state of the block 25 | */ 26 | void render(BlockPos pos, double x, double y, double z, World world, IBlockState blockState); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/block/osmotic_enchanter.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "particle": "thaumictinkerer:blocks/funnel/funnel_side" 4 | }, 5 | "elements": [ 6 | { 7 | "from": [ 8 | 0, 9 | 0, 10 | 0 11 | ], 12 | "to": [ 13 | 16, 14 | 12, 15 | 16 16 | ], 17 | "faces": { 18 | "down": { 19 | "texture": "#down", 20 | "cullface": "down" 21 | }, 22 | "up": { 23 | "texture": "#up" 24 | }, 25 | "north": { 26 | "texture": "#north", 27 | "cullface": "north" 28 | }, 29 | "south": { 30 | "texture": "#south", 31 | "cullface": "south" 32 | }, 33 | "west": { 34 | "texture": "#west", 35 | "cullface": "west" 36 | }, 37 | "east": { 38 | "texture": "#east", 39 | "cullface": "east" 40 | } 41 | } 42 | } 43 | ] 44 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/client/gui/button/IRadioButton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.client.gui.button; 6 | 7 | /** 8 | * Radio button interface 9 | */ 10 | public interface IRadioButton { 11 | 12 | /** 13 | * enable a single button from a button click 14 | */ 15 | void enableFromClick(); 16 | 17 | /** 18 | * Updates the button based on another's changed status 19 | * 20 | * @param otherButton button who's status changed 21 | */ 22 | void updateStatus(IRadioButton otherButton); 23 | 24 | /** 25 | * @return is this button enabled? 26 | */ 27 | boolean isEnabled(); 28 | 29 | /** 30 | * @param enabled Is the button enabled? 31 | */ 32 | void setEnabled(boolean enabled); 33 | 34 | /** 35 | * @return what group is this button attached to? 36 | */ 37 | default String getGroup() 38 | { 39 | return "default"; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/crafting/VisCrystalFactory.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.crafting; 2 | import com.google.gson.JsonObject; 3 | import net.minecraft.item.ItemStack; 4 | import net.minecraft.item.crafting.IRecipe; 5 | import net.minecraft.item.crafting.ShapedRecipes; 6 | import net.minecraft.util.JsonUtils; 7 | import net.minecraft.util.ResourceLocation; 8 | import net.minecraftforge.common.crafting.CraftingHelper; 9 | import net.minecraftforge.common.crafting.IRecipeFactory; 10 | import net.minecraftforge.common.crafting.JsonContext; 11 | 12 | public class VisCrystalFactory implements IRecipeFactory 13 | { 14 | 15 | @Override 16 | public IRecipe parse(JsonContext jsonContext, JsonObject jsonObject) { 17 | 18 | // Get Primer 19 | final CraftingHelper.ShapedPrimer primer = new CraftingHelper.ShapedPrimer(); 20 | final ItemStack result = CraftingHelper.getItemStack(JsonUtils.getJsonObject(jsonObject, "result"), jsonContext); 21 | return null; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/libs/LibResearch.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.libs; 2 | 3 | public class LibResearch { 4 | 5 | public static final String SHARE_BOOK = "TT_SHARE_TOME"; 6 | public static final String ESSENTIA_FUNNEL = "TT_ESSENTIA_FUNNEL"; 7 | public static final String SPELLBINDING_CLOTH = "TT_SPELLBINDING_CLOTH"; 8 | public static final String ENCHANTER="TT_ENCHANTER"; 9 | public static final String PRISMARINE="TT_PRISMARINE"; 10 | public static final String CORPOREAL_MAGNET ="TT_THAUMIC_MAGNETS"; 11 | public static final String KINETIC_MAGNET = CORPOREAL_MAGNET +"@1"; 12 | 13 | public static final String DISSIMULATION = "TT_DISSIMULATION"; 14 | 15 | public static final String REPAIRER = "TT_REPAIRER"; 16 | public static final String TRANSVECTOR_DISLOCATOR = "TT_TRANSVECTOR_INTERFACE"; 17 | public static final String TRANSVECTOR_INTERFACE = TRANSVECTOR_DISLOCATOR+"@2"; 18 | 19 | public static final String TABLET = "TT_TABLET"; 20 | public static final String ENERGETIC_NITOR = "TT_ENERGETIC_NITOR"; 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/compat/TiConCompat.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.compat; 2 | 3 | import net.minecraft.item.ItemStack; 4 | import slimeknights.tconstruct.library.tools.ToolCore; 5 | import slimeknights.tconstruct.library.utils.ToolHelper; 6 | 7 | 8 | public class TiConCompat { 9 | 10 | 11 | public static boolean isTiConTool(ItemStack stack) { 12 | return stack.getItem() instanceof ToolCore; 13 | } 14 | 15 | public static boolean isRepairableTiCon(ItemStack stack) { 16 | if (!isTiConTool(stack)) 17 | return false; 18 | return ToolHelper.getCurrentDurability(stack) != ToolHelper.getMaxDurability(stack); 19 | } 20 | 21 | 22 | public static int getDamage(ItemStack stack) { 23 | if (!isTiConTool(stack)) 24 | return stack.getItemDamage(); 25 | return ToolHelper.getMaxDurability(stack) - ToolHelper.getCurrentDurability(stack); 26 | } 27 | 28 | public static void fixDamage(ItemStack stack, int damage) { 29 | ToolHelper.repairTool(stack, damage); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/transvector_dislocator.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "textures": { 5 | "side": "thaumictinkerer:blocks/dislocator/off", 6 | "north": "thaumictinkerer:blocks/dislocator/on", 7 | "south": "#side", 8 | "east": "#side", 9 | "west": "#side", 10 | "up": "#side", 11 | "down": "#side", 12 | "particle": "#side" 13 | }, 14 | "model": "cube", 15 | "uvlock": true 16 | }, 17 | "variants": { 18 | "normal": [ 19 | {} 20 | ], 21 | "powered": { 22 | "false": { 23 | }, 24 | "true": { 25 | } 26 | }, 27 | "facing": { 28 | "up": { 29 | "x": 90 30 | }, 31 | "down": { 32 | "x": 270 33 | }, 34 | "north": {}, 35 | "south": { 36 | "y": 180 37 | }, 38 | "west": { 39 | "y": 270 40 | }, 41 | "east": { 42 | "y": 90 43 | } 44 | }, 45 | "inventory": { 46 | "model": "cube", 47 | "transform": "forge:default-block" 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/items/ItemEnergeticNitor.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.items; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.blocks.ModBlocks; 4 | import com.nekokittygames.thaumictinkerer.common.libs.LibItemNames; 5 | import net.minecraft.entity.Entity; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.World; 9 | 10 | public class ItemEnergeticNitor extends TTItem { 11 | public ItemEnergeticNitor() { 12 | super(LibItemNames.ENERGETIC_NITOR); 13 | } 14 | 15 | public static void setBlock(BlockPos pos, World world) { 16 | if ((world.isAirBlock(pos) || world.getBlockState(pos).equals(ModBlocks.nitor_vapor)) && !world.isRemote) { 17 | world.setBlockState(pos, ModBlocks.nitor_vapor.getDefaultState()); 18 | } 19 | } 20 | 21 | @Override 22 | public void onUpdate(ItemStack par1ItemStack, World world, Entity entity, int par4, boolean par5) { 23 | BlockPos pos = new BlockPos(entity.posX, entity.posY, entity.posZ).up(); 24 | setBlock(pos, world); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/libs/LibBlockNames.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.libs; 2 | 3 | public class LibBlockNames { 4 | 5 | public static final String FUNNEL = "funnel"; 6 | public static final String DISSIMULATION = "dissimulation"; 7 | public static final String TRANSVECTOR_INTERFACE = "transvector_interface"; 8 | public static final String TRANSVECTOR_DISLOCATOR = "transvector_dislocator"; 9 | public static final String REPAIRER = "repairer"; 10 | public static final String MAGNET = "magnet"; 11 | public static final String MOB_MAGNET = "mob_magnet"; 12 | public static final String ENERGETIC_NITOR_VAPOR = "nitor_vapor"; 13 | public static final String EXAMPLE = "example"; 14 | public static final String OSMOTIC_ENCHANTER = "osmotic_enchanter"; 15 | public static final String ENCHANTMENT_PILLAR = "enchantment_pillar"; 16 | public static final String BLACK_QUARTZ_BLOCK = "black_quartz_block"; 17 | public static final String ANIMATION_TABLET = "animation_tablet"; 18 | public static final String DUMMY_NITOR="dummy_nitor"; 19 | public static final String INFUSION_SPARK= "infusion_spark"; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/client/misc/TTKeys.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.client.misc; 6 | 7 | import net.minecraftforge.fml.common.Mod; 8 | 9 | @Mod.EventBusSubscriber 10 | public class TTKeys { 11 | // private static KeyBinding[] keyBindings; 12 | // 13 | // public static boolean isStructureRadialActive() { 14 | // return structureRadialActive; 15 | // } 16 | // 17 | // private static boolean structureRadialActive=false; 18 | // public static void initKeys() 19 | // { 20 | // keyBindings=new KeyBinding[1]; 21 | // keyBindings[0]=new KeyBinding("key.structure.desc", Keyboard.KEY_J,"key.thaumictinkerer.category"); 22 | // for (KeyBinding keyBinding : keyBindings) { 23 | // ClientRegistry.registerKeyBinding(keyBinding); 24 | // } 25 | // } 26 | // 27 | // @SubscribeEvent 28 | // public static void onClientTick(TickEvent.ClientTickEvent event) 29 | // { 30 | // structureRadialActive=keyBindings[0].isPressed(); 31 | // } 32 | // public static KeyBinding getStructureKey() 33 | // { 34 | // return keyBindings[0]; 35 | // } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/block/animation_tablet.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "particle": "thaumictinkerer:blocks/animation_tablet/top", 4 | "tablet_top": "thaumictinkerer:blocks/animation_tablet/top", 5 | "tablet_bottom": "thaumictinkerer:blocks/animation_tablet/bottom", 6 | "tablet_side": "thaumictinkerer:blocks/animation_tablet/side" 7 | }, 8 | "elements": [ 9 | { 10 | "from": [ 11 | 0, 12 | 0, 13 | 0 14 | ], 15 | "to": [ 16 | 16, 17 | 2, 18 | 16 19 | ], 20 | "faces": { 21 | "down": { 22 | "texture": "#tablet_bottom", 23 | "cullface": "down" 24 | }, 25 | "up": { 26 | "texture": "#tablet_top" 27 | }, 28 | "north": { 29 | "texture": "#tablet_side", 30 | "cullface": "north" 31 | }, 32 | "south": { 33 | "texture": "#tablet_side", 34 | "cullface": "south" 35 | }, 36 | "west": { 37 | "texture": "#tablet_side", 38 | "cullface": "west" 39 | }, 40 | "east": { 41 | "texture": "#tablet_side", 42 | "cullface": "east" 43 | } 44 | } 45 | } 46 | ] 47 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/recipes/ing/TTFocusIngredient.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.recipes.ing; 2 | 3 | import net.minecraft.item.ItemStack; 4 | import net.minecraft.item.crafting.Ingredient; 5 | import thaumcraft.api.casters.FocusEffect; 6 | import thaumcraft.api.items.ItemsTC; 7 | import thaumcraft.common.items.casters.ItemFocus; 8 | 9 | import javax.annotation.Nullable; 10 | import java.util.Objects; 11 | 12 | public class TTFocusIngredient extends Ingredient { 13 | private Class effect; 14 | public TTFocusIngredient(Class effect,ItemStack... ingredient) { 15 | super(ingredient); 16 | this.effect=effect; 17 | } 18 | 19 | @Override 20 | public boolean apply(@Nullable ItemStack ingredient) { 21 | if(!(Objects.requireNonNull(ingredient).getItem() instanceof ItemFocus)) 22 | return false; 23 | if(ItemFocus.getPackage(ingredient)==null) 24 | return false; 25 | for (FocusEffect eff:ItemFocus.getPackage(ingredient).getFocusEffects()) { 26 | if(eff.getClass().equals(effect)) 27 | { 28 | return true; 29 | } 30 | } 31 | return false; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/proxy/CommonProxy.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.proxy; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.items.ModItems; 4 | import net.minecraft.util.text.translation.I18n; 5 | import net.minecraftforge.common.MinecraftForge; 6 | import net.minecraftforge.fml.common.event.FMLInitializationEvent; 7 | import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; 8 | import net.minecraftforge.fml.common.network.NetworkRegistry; 9 | 10 | import static com.nekokittygames.thaumictinkerer.ThaumicTinkerer.instance; 11 | 12 | public class CommonProxy implements ITTProxy { 13 | 14 | 15 | @Override 16 | public void registerRenderers() { 17 | // Empty 18 | } 19 | 20 | @SuppressWarnings("deprecation") 21 | @Override 22 | public String localize(String translationKey, Object... args) { 23 | return I18n.translateToLocalFormatted(translationKey, args); 24 | } 25 | 26 | @Override 27 | public void init(FMLInitializationEvent event) { 28 | NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiProxy()); 29 | 30 | } 31 | 32 | @Override 33 | public void preInit(FMLPreInitializationEvent event) { 34 | 35 | // Empty 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/misc/APIHelpers.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.misc; 2 | 3 | import com.mojang.authlib.GameProfile; 4 | import com.nekokittygames.thaumictinkerer.api.ThaumicTinkererAPI; 5 | import com.nekokittygames.thaumictinkerer.common.libs.LibMisc; 6 | import net.minecraft.block.Block; 7 | import net.minecraft.entity.player.EntityPlayer; 8 | import net.minecraft.server.MinecraftServer; 9 | import net.minecraft.util.math.BlockPos; 10 | import net.minecraft.world.World; 11 | import net.minecraftforge.fml.common.FMLCommonHandler; 12 | 13 | import java.lang.ref.WeakReference; 14 | 15 | public class APIHelpers { 16 | 17 | public static boolean canDislocateBlock(World world, Block block, BlockPos pos) 18 | { 19 | // 20 | if(world.getBlockState(pos).getBlockHardness(world,pos) != -1 && ThaumicTinkererAPI.getDislocationBlacklist().stream().noneMatch(s -> s.equalsIgnoreCase(block.getClass().getName()))) 21 | { 22 | MinecraftServer worldServer = FMLCommonHandler.instance().getMinecraftServerInstance(); 23 | return world.isBlockModifiable(FakePlayerUtils.get(worldServer.getWorld(world.provider.getDimension()), new GameProfile(LibMisc.MOD_UUID, LibMisc.MOD_F_NAME)),pos); 24 | } 25 | return false; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Thuamic Tinkerer](https://i.imgur.com/ay34bGO.png) 2 | 3 | ![Compatible with Minecraft 1.12.2](https://img.shields.io/badge/minecraft-1.12.2-green) [![Nearly 8.5M downloads on CurseForge!](https://img.shields.io/badge/downloads-8,409,734-blue)](https://www.curseforge.com/minecraft/mc-mods/thaumic-tinkerer) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/f3247c4929144ef28c9afc4d6298135c)](https://www.codacy.com/gh/Thaumic-Tinkerer/ThaumicTinkerer/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Thaumic-Tinkerer/ThaumicTinkerer&utm_campaign=Badge_Grade) [![Support Kat on Patreon](https://img.shields.io/badge/patreon-Support%20the%20Developer-orange)](https://www.patreon.com/bePatron?u=82040) [![Join us on Discord!](https://img.shields.io/badge/discord-Join%20the%20Conversation-4e5d94)](https://discord.gg/wdK3GfN37m) 4 | 5 | **Thaumic Tinkerer** is an addon for [Thaumcraft 3, 4, 5 and 6](https://ftb.fandom.com/wiki/Thaumcraft "Thaumcraft") originally made by [Vazkii](https://github.com/Vazkii), but is now maintained by [KatrinaAS](https://github.com/KatrinaAS). It is the continuation of Vazkii's **Elemental Tinkerer** mod, and adds new and useful items to the Thaumcraft experience. Researches that come from this mod are prefixed by [TT]. 6 | 7 | [**Install with CurseForge**](https://www.curseforge.com/minecraft/mc-mods/thaumic-tinkerer) 8 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/tileentity/TileEntityItemMagnet.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.tileentity; 2 | 3 | import net.minecraft.entity.Entity; 4 | import net.minecraft.entity.item.EntityItem; 5 | import net.minecraft.item.ItemStack; 6 | 7 | import java.util.function.Predicate; 8 | 9 | public class TileEntityItemMagnet extends TileEntityMagnet { 10 | 11 | 12 | @Override 13 | public Predicate selectedEntities() { 14 | return o -> o instanceof EntityItem && filterEntity((Entity) o) && filterItem(((EntityItem)o).getItem()); 15 | } 16 | 17 | private boolean filterItem(ItemStack itemStack) { 18 | if(getInventory().getStackInSlot(0)==ItemStack.EMPTY) 19 | return true; 20 | return getInventory().getStackInSlot(0).isItemEqual(itemStack); 21 | } 22 | 23 | protected boolean filterEntity(Entity entity) { 24 | if (entity.getEntityData().hasKey("PreventRemoteMovement")) 25 | return !entity.getEntityData().getBoolean("PreventRemoteMovement"); 26 | return true; 27 | } 28 | 29 | @Override 30 | protected boolean isItemValidForSlot(int index, ItemStack itemstack) { 31 | return true; 32 | } 33 | 34 | @Override 35 | public boolean respondsToPulses() { 36 | return false; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/api/ThaumicTinkererAPI.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.api; 2 | 3 | import net.minecraft.block.BlockChest; 4 | import net.minecraft.block.BlockPistonExtension; 5 | import net.minecraft.block.BlockPistonMoving; 6 | import thaumcraft.common.blocks.basic.BlockPillar; 7 | 8 | import java.util.ArrayList; 9 | 10 | /** 11 | * API for Thaumic Tinkerer 12 | */ 13 | public class ThaumicTinkererAPI { 14 | private static final ArrayList AnimationTabletBlacklist = new ArrayList<>(); 15 | private static final ArrayList DislocationBlacklist = new ArrayList<>(); 16 | 17 | /** 18 | * Gets the blacklist for the Animation tablet 19 | * 20 | * @return the array of blacklisted item names 21 | */ 22 | public static ArrayList getAnimationTabletBlacklist() { 23 | return AnimationTabletBlacklist; 24 | } 25 | 26 | public static ArrayList getDislocationBlacklist() { return DislocationBlacklist;} 27 | static { 28 | AnimationTabletBlacklist.add(BlockChest.class.getName()); 29 | 30 | DislocationBlacklist.add(BlockPistonMoving.class.getName()); 31 | DislocationBlacklist.add(BlockPistonExtension.class.getName()); 32 | DislocationBlacklist.add(BlockPillar.class.getName()); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/recipes/TTMatrix.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.recipes; 2 | 3 | import thaumcraft.api.crafting.Part; 4 | 5 | public class TTMatrix { 6 | int rows; 7 | int cols; 8 | Part[][] matrix; 9 | 10 | public TTMatrix(Part[][] matrix) { 11 | this.rows = matrix.length; 12 | this.cols = matrix[0].length; 13 | this.matrix = new Part[this.rows][this.cols]; 14 | 15 | for(int i = 0; i < this.rows; ++i) { 16 | for(int j = 0; j < this.cols; ++j) { 17 | this.matrix[i][j] = matrix[i][j]; 18 | } 19 | } 20 | 21 | } 22 | 23 | public void Rotate90DegRight(int times) { 24 | for(int a = 0; a < times; ++a) { 25 | Part[][] newMatrix = new Part[this.cols][this.rows]; 26 | 27 | int i; 28 | for(i = 0; i < this.rows; ++i) { 29 | for(int j = 0; j < this.cols; ++j) { 30 | newMatrix[j][this.rows - i - 1] = this.matrix[i][j]; 31 | } 32 | } 33 | 34 | this.matrix = newMatrix; 35 | i = this.rows; 36 | this.rows = this.cols; 37 | this.cols = i; 38 | } 39 | 40 | } 41 | 42 | public Part[][] getMatrix() { 43 | return this.matrix; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/blocks/BlockDissimulation.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.blocks; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.libs.LibBlockNames; 4 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityDissimulation; 5 | import net.minecraft.block.material.Material; 6 | import net.minecraft.block.state.IBlockState; 7 | import net.minecraft.entity.player.EntityPlayer; 8 | import net.minecraft.tileentity.TileEntity; 9 | import net.minecraft.util.EnumFacing; 10 | import net.minecraft.util.EnumHand; 11 | import net.minecraft.util.math.BlockPos; 12 | import net.minecraft.world.World; 13 | 14 | public class BlockDissimulation extends TTCamoBlock { 15 | public BlockDissimulation() { 16 | super(LibBlockNames.DISSIMULATION, Material.WOOD, true); 17 | } 18 | 19 | @Override 20 | public TileEntity createTileEntity(World world, IBlockState state) { 21 | return new TileEntityDissimulation(); 22 | } 23 | 24 | @Override 25 | public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { 26 | TileEntity te = worldIn.getTileEntity(pos); 27 | return TTCamoBlock.camoflageFromHand(playerIn, hand, te); 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/magnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "textures": { 5 | }, 6 | "model": "thaumictinkerer:magnet/magnet_base", 7 | "uvlock": true 8 | }, 9 | "variants": { 10 | "pole": { 11 | "pull": { 12 | "textures": { 13 | "1": "thaumictinkerer:blocks/magnet/item/back_front_pull" 14 | } 15 | }, 16 | "push": { 17 | "textures": { 18 | "1": "thaumictinkerer:blocks/magnet/item/back_front_push" 19 | } 20 | } 21 | }, 22 | "facing": { 23 | "up": {}, 24 | "down": { 25 | "x": 270, 26 | "uvlock": false 27 | }, 28 | "north": { 29 | "x": 90, 30 | "uvlock": false 31 | }, 32 | "south": { 33 | "x": 90, 34 | "y": 180, 35 | "uvlock": false 36 | }, 37 | "west": { 38 | "x": 90, 39 | "y": 270, 40 | "uvlock": false 41 | }, 42 | "east": { 43 | "x": 90, 44 | "y": 90, 45 | "uvlock": false 46 | } 47 | }, 48 | "inventory": { 49 | "model": "thaumictinkerer:magnet/magnet_base", 50 | "transform": "forge:default-block", 51 | "textures": { 52 | "1": "thaumictinkerer:blocks/magnet/item/back_front_pull" 53 | } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/mob_magnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "textures": { 5 | }, 6 | "model": "thaumictinkerer:magnet/mobmagnet_base", 7 | "uvlock": true 8 | }, 9 | "variants": { 10 | "pole": { 11 | "pull": { 12 | "textures": { 13 | "1": "thaumictinkerer:blocks/magnet/mob/back_front_pull" 14 | } 15 | }, 16 | "push": { 17 | "textures": { 18 | "1": "thaumictinkerer:blocks/magnet/mob/back_front_push" 19 | } 20 | } 21 | }, 22 | "facing": { 23 | "up": {}, 24 | "down": { 25 | "x": 270, 26 | "uvlock": false 27 | }, 28 | "north": { 29 | "x": 90, 30 | "uvlock": false 31 | }, 32 | "south": { 33 | "x": 90, 34 | "y": 180, 35 | "uvlock": false 36 | }, 37 | "west": { 38 | "x": 90, 39 | "y": 270, 40 | "uvlock": false 41 | }, 42 | "east": { 43 | "x": 90, 44 | "y": 90, 45 | "uvlock": false 46 | } 47 | }, 48 | "inventory": { 49 | "model": "thaumictinkerer:magnet/mobmagnet_base", 50 | "transform": "forge:default-block", 51 | "textures": { 52 | "1": "thaumictinkerer:blocks/magnet/mob/back_front_pull" 53 | } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/compat/botania/BotaniaCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.common.compat.botania; 6 | 7 | import com.nekokittygames.thaumictinkerer.ThaumicTinkerer; 8 | import com.nekokittygames.thaumictinkerer.common.libs.LibOreDict; 9 | import net.minecraft.block.Block; 10 | import net.minecraft.item.ItemStack; 11 | import net.minecraftforge.fml.common.registry.GameRegistry; 12 | import net.minecraftforge.oredict.OreDictionary; 13 | import thaumcraft.api.research.theorycraft.TheorycraftManager; 14 | 15 | import javax.annotation.Nullable; 16 | 17 | public class BotaniaCompat { 18 | @GameRegistry.ObjectHolder("botania:quartzTypeDark") 19 | private static @Nullable 20 | Block botaniaQuartz; 21 | 22 | public static void addOreDict() { 23 | if(botaniaQuartz!=null) { 24 | OreDictionary.registerOre(LibOreDict.BLACK_QUARTZ_BLOCK, new ItemStack(botaniaQuartz, 1, 0)); 25 | ThaumicTinkerer.logger.info("Hi Botania, we have unfinished business you and I"); 26 | 27 | } 28 | else 29 | ThaumicTinkerer.logger.info("Botania not found, Sad now."); 30 | } 31 | 32 | public static void addTheorycraft() { 33 | if(botaniaQuartz!=null) { 34 | TheorycraftManager.registerAid(new AidBotaniaQuartz(botaniaQuartz)); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/research/theorycraft/CardExperience.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.common.research.theorycraft; 6 | 7 | import com.nekokittygames.thaumictinkerer.ThaumicTinkerer; 8 | import net.minecraft.entity.player.EntityPlayer; 9 | import thaumcraft.api.research.theorycraft.ResearchTableData; 10 | import thaumcraft.api.research.theorycraft.TheorycraftCard; 11 | 12 | public class CardExperience extends TheorycraftCard { 13 | @Override 14 | public int getInspirationCost() { 15 | return 1; 16 | } 17 | 18 | @Override 19 | public String getLocalizedName() { 20 | return ThaumicTinkerer.proxy.localize("thaumictinkerer.card.experience.name"); 21 | } 22 | 23 | @Override 24 | public String getResearchCategory() { 25 | return "THAUMIC_TINKERER"; 26 | } 27 | 28 | @Override 29 | public String getLocalizedText() { 30 | return ThaumicTinkerer.proxy.localize("thaumictinkerer.card.experience.text"); 31 | } 32 | 33 | @Override 34 | public boolean activate(EntityPlayer entityPlayer, ResearchTableData data) { 35 | if (data.table != null && entityPlayer.experienceLevel>=4) { 36 | entityPlayer.addExperienceLevel(-4); 37 | data.addTotal(this.getResearchCategory(), 25); 38 | return true; 39 | } else { 40 | return false; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/enchantment_pillar.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "textures": {}, 5 | "model": "builtin/generated", 6 | "transform": "forge:default-block", 7 | "uvlock": true 8 | }, 9 | "variants": { 10 | "direction": { 11 | "0": { 12 | "y": 270, 13 | "model": "thaumictinkerer:pillar_diag.obj" 14 | }, 15 | "1": { 16 | "model": "thaumictinkerer:pillar_side.obj", 17 | "y": 180 18 | }, 19 | "2": { 20 | "y": 180, 21 | "model": "thaumictinkerer:pillar_diag.obj" 22 | }, 23 | "3": { 24 | "model": "thaumictinkerer:pillar_side.obj", 25 | "y": 90 26 | }, 27 | "4": { 28 | "model": "thaumictinkerer:pillar_diag.obj", 29 | "y": 90 30 | }, 31 | "5": { 32 | "model": "thaumictinkerer:pillar_side.obj" 33 | }, 34 | "6": { 35 | "model": "thaumictinkerer:pillar_diag.obj" 36 | }, 37 | "7": { 38 | "model": "thaumictinkerer:pillar_side.obj", 39 | "y": 270 40 | } 41 | }, 42 | "top": { 43 | "true": {}, 44 | "false": {} 45 | }, 46 | "inventory": { 47 | "model": "thaumictinkerer:pillar_side.obj", 48 | "transform": "forge:default-block", 49 | "textures": { 50 | "1": "thaumictinkerer:blocks/magnet/item/back_front_pull" 51 | } 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/multiblocks/MultiblockBlock.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.multiblocks; 2 | 3 | import com.google.gson.JsonObject; 4 | import net.minecraft.util.JsonUtils; 5 | 6 | import java.io.IOException; 7 | 8 | public class MultiblockBlock { 9 | private String blockName; 10 | private int xOffset; 11 | private int zOffset; 12 | private int extraMeta; 13 | 14 | MultiblockBlock(JsonObject object) throws Exception { 15 | if (!object.has("x")) 16 | throw new IOException("Layer object has no x offset"); 17 | xOffset = JsonUtils.getInt(object, "x"); 18 | if (!object.has("z")) 19 | throw new IOException("Layer object has no z offset"); 20 | zOffset = JsonUtils.getInt(object, "z"); 21 | if (!object.has("block")) 22 | throw new IOException("Layer object has no blockType"); 23 | blockName = JsonUtils.getString(object, "block"); 24 | if (object.has("meta")) { 25 | extraMeta = JsonUtils.getInt(object, "meta"); 26 | } else 27 | extraMeta = -1; 28 | 29 | } 30 | 31 | protected int getExtraMeta() { 32 | return extraMeta; 33 | } 34 | 35 | public String getBlockName() { 36 | return blockName; 37 | 38 | } 39 | 40 | public int getxOffset() { 41 | return xOffset; 42 | } 43 | 44 | public int getzOffset() { 45 | return zOffset; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/items/ItemSpellbindingCloth.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.items; 2 | 3 | import com.nekokittygames.thaumictinkerer.client.misc.ClientHelper; 4 | import com.nekokittygames.thaumictinkerer.common.config.TTConfig; 5 | import com.nekokittygames.thaumictinkerer.common.libs.LibItemNames; 6 | import net.minecraft.item.EnumRarity; 7 | import net.minecraft.item.Item; 8 | import net.minecraft.item.ItemStack; 9 | import net.minecraftforge.common.IRarity; 10 | import net.minecraftforge.fml.relauncher.Side; 11 | import net.minecraftforge.fml.relauncher.SideOnly; 12 | 13 | import javax.annotation.Nullable; 14 | 15 | public class ItemSpellbindingCloth extends TTItem { 16 | public ItemSpellbindingCloth() { 17 | super(LibItemNames.SPELLBINDING_CLOTH); 18 | setMaxDamage(TTConfig.spellbindingClothUses); 19 | setMaxStackSize(1); 20 | setNoRepair(); 21 | } 22 | 23 | @Override 24 | public ItemStack getContainerItem(ItemStack itemStack) { 25 | itemStack.setItemDamage(itemStack.getItemDamage()+1); 26 | return itemStack; 27 | } 28 | 29 | @Override 30 | public boolean hasContainerItem() { 31 | return true; 32 | } 33 | 34 | @Override 35 | @SideOnly(Side.CLIENT) 36 | public EnumRarity getRarity(ItemStack stack) { 37 | return EnumRarity.UNCOMMON; 38 | } 39 | 40 | @Override 41 | @SideOnly(Side.CLIENT) 42 | public boolean hasEffect(ItemStack stack) { 43 | return false; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/research/foci.json: -------------------------------------------------------------------------------- 1 | { 2 | "entries": [ 3 | { 4 | "key": "TT_TELEKENESIS", 5 | "name": "thaumictinkerer.research.TT_TELEKENESIS.title", 6 | "icons": [ 7 | "thaumictinkerer:textures/foci_icons/telekenesis.png" 8 | ], 9 | "category": "THAUMIC_TINKERER", 10 | "location": [ 11 | -5, 12 | 0 13 | ], 14 | "parents": [ 15 | "BASEAUROMANCY" 16 | ], 17 | "stages": [ 18 | { 19 | "text": "thaumictinkerer.research.TT_TELEKENESIS.0", 20 | "required_knowledge": [ 21 | "THEORY;AUROMANCY;1" 22 | ] 23 | }, 24 | { 25 | "text": "thaumictinkerer.research.TT_TELEKENESIS.1" 26 | } 27 | ] 28 | }, 29 | { 30 | "key": "TT_DISLOCATE", 31 | "name": "thaumictinkerer.research.TT_DISLOCATE.title", 32 | "icons": [ 33 | "thaumictinkerer:textures/foci_icons/dislocation.png" 34 | ], 35 | "category": "THAUMIC_TINKERER", 36 | "location": [ 37 | -5, 38 | 3 39 | ], 40 | "parents": [ 41 | "BASEAUROMANCY", 42 | "FOCUSEXCHANGE" 43 | ], 44 | "stages": [ 45 | { 46 | "text": "thaumictinkerer.research.DISLOCATE.0", 47 | "required_knowledge": [ 48 | "THEORY;AUROMANCY;1" 49 | ] 50 | }, 51 | { 52 | "text": "thaumictinkerer.research.DISLOCATE.1" 53 | } 54 | ] 55 | } 56 | ] 57 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/client/gui/button/GuiEnchantmentStartButton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.client.gui.button; 6 | 7 | import com.nekokittygames.thaumictinkerer.client.libs.LibClientResources; 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.client.gui.GuiButton; 10 | 11 | /** 12 | * The type Gui enchantment start button. 13 | */ 14 | public class GuiEnchantmentStartButton extends GuiButton { 15 | 16 | /** 17 | * Instantiates a new Gui enchantment start button. 18 | * 19 | * @param buttonId the button id 20 | * @param x the x 21 | * @param y the y 22 | */ 23 | public GuiEnchantmentStartButton(int buttonId, int x, int y) { 24 | super(buttonId, x, y, ""); 25 | this.width=15; 26 | } 27 | 28 | /** 29 | * Is enabled boolean. 30 | * 31 | * @return the boolean 32 | */ 33 | public boolean isEnabled() { 34 | return enabled; 35 | } 36 | 37 | /** 38 | * Sets enabled. 39 | * 40 | * @param enabled the enabled 41 | */ 42 | public void setEnabled(boolean enabled) { 43 | this.enabled = enabled; 44 | } 45 | 46 | @Override 47 | public void drawButton(Minecraft mc, int mouseX, int mouseY, float partialTicks) { 48 | mc.getTextureManager().bindTexture(LibClientResources.GUI_ENCHANTER); 49 | drawTexturedModalRect(x, y, 176, enabled ? 39 : 24, 15, 15); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/containers/MagnetContainer.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.containers; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityMagnet; 4 | import net.minecraft.inventory.IInventory; 5 | import net.minecraft.item.ItemStack; 6 | import net.minecraftforge.items.CapabilityItemHandler; 7 | import net.minecraftforge.items.IItemHandler; 8 | import net.minecraftforge.items.SlotItemHandler; 9 | 10 | import javax.annotation.Nonnull; 11 | 12 | /** 13 | * Magnet container 14 | */ 15 | public class MagnetContainer extends ThaumicTContainer { 16 | 17 | /** 18 | * Constructor for MagnetContainer 19 | * @param playerInventory Inventory for the player accessing the inventory 20 | * @param tileEntity Tile entity being opened 21 | */ 22 | public MagnetContainer(IInventory playerInventory, TileEntityMagnet tileEntity) { 23 | super(playerInventory, tileEntity); 24 | } 25 | 26 | /** 27 | * Adds the Magnet's own slots 28 | */ 29 | @Override 30 | protected void addOwnSlots() { 31 | IItemHandler itemHandler = this.tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); 32 | int x = 54; 33 | int y = 38; 34 | this.addSlotToContainer(new SlotItemHandler(itemHandler, 0, x, y) { 35 | @Override 36 | public void onSlotChange(@Nonnull ItemStack p_75220_1_, @Nonnull ItemStack p_75220_2_) { 37 | tileEntity.sendUpdates(); 38 | super.onSlotChange(p_75220_1_, p_75220_2_); 39 | } 40 | }); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/blockstates/repairer.json: -------------------------------------------------------------------------------- 1 | { 2 | "forge_marker": 1, 3 | "defaults": { 4 | "textures": { 5 | "down": "thaumictinkerer:blocks/repairer", 6 | "up": "thaumictinkerer:blocks/repairer", 7 | "east": "thaumictinkerer:blocks/repairer", 8 | "west": "thaumictinkerer:blocks/repairer", 9 | "north": "thaumictinkerer:blocks/dark_quartz_block", 10 | "south": "thaumictinkerer:blocks/repairer", 11 | "particle": "thaumictinkerer:blocks/repairer", 12 | "base": "thaumictinkerer:blocks/repairer/base", 13 | "glass": "thaumictinkerer:blocks/repairer/glass", 14 | "glasshole": "thaumictinkerer:blocks/repairer/glasshole", 15 | "swirlytop": "thaumictinkerer:blocks/repairer/repair_off" 16 | }, 17 | "model": "thaumictinkerer:repairer", 18 | "uvlock": true 19 | }, 20 | "variants": { 21 | "active": { 22 | "false": { 23 | "textures": { 24 | "swirlytop": "thaumictinkerer:blocks/repairer/repair_off" 25 | } 26 | }, 27 | "true": { 28 | "textures": { 29 | "swirlytop": "thaumictinkerer:blocks/repairer/repair_on" 30 | } 31 | } 32 | }, 33 | "facing": { 34 | "up": { 35 | "x": 90 36 | }, 37 | "down": { 38 | "x": 270 39 | }, 40 | "north": {}, 41 | "south": { 42 | "y": 180 43 | }, 44 | "west": { 45 | "y": 270 46 | }, 47 | "east": { 48 | "y": 90 49 | } 50 | }, 51 | "inventory": { 52 | "model": "thaumictinkerer:repairer", 53 | "transform": "forge:default-block" 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/main/resources/assets/thaumictinkerer/models/item/funnel.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "thaumictinkerer:block/funnel", 3 | "display": { 4 | "thirdperson_righthand": { 5 | "rotation": [ 6 | 90, 7 | -45, 8 | 0 9 | ], 10 | "translation": [ 11 | 0, 12 | 1.5, 13 | 5.75 14 | ], 15 | "scale": [ 16 | 1.1, 17 | 1.1, 18 | 1.1 19 | ] 20 | }, 21 | "thirdperson_lefthand": { 22 | "rotation": [ 23 | 90, 24 | -45, 25 | 0 26 | ], 27 | "translation": [ 28 | 0, 29 | 1.5, 30 | 5.75 31 | ], 32 | "scale": [ 33 | 1.1, 34 | 1.1, 35 | 1.1 36 | ] 37 | }, 38 | "firstperson_righthand": { 39 | "rotation": [ 40 | 90, 41 | -45, 42 | 0 43 | ], 44 | "translation": [ 45 | 0, 46 | 1.5, 47 | 5.75 48 | ], 49 | "scale": [ 50 | 1.1, 51 | 1.1, 52 | 1.1 53 | ] 54 | }, 55 | "firstperson_lefthand": { 56 | "rotation": [ 57 | 90, 58 | -45, 59 | 0 60 | ], 61 | "translation": [ 62 | 0, 63 | 1.5, 64 | 5.75 65 | ], 66 | "scale": [ 67 | 1.1, 68 | 1.1, 69 | 1.1 70 | ] 71 | }, 72 | "gui": { 73 | "rotation": [ 74 | 90, 75 | -45, 76 | 0 77 | ], 78 | "translation": [ 79 | 0, 80 | 1.5, 81 | 5.75 82 | ], 83 | "scale": [ 84 | 0.8, 85 | 0.8, 86 | 0.8 87 | ] 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/multiblocks/MultiblockLayer.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.multiblocks; 2 | 3 | import com.google.gson.JsonArray; 4 | import com.google.gson.JsonElement; 5 | import com.google.gson.JsonObject; 6 | import net.minecraft.util.JsonUtils; 7 | import org.apache.commons.lang3.builder.ToStringBuilder; 8 | 9 | import javax.annotation.Nonnull; 10 | import java.io.IOException; 11 | import java.util.ArrayList; 12 | import java.util.Iterator; 13 | import java.util.List; 14 | 15 | public class MultiblockLayer implements Iterable { 16 | 17 | public List blocks = new ArrayList<>(); 18 | private int yLevel; 19 | 20 | public MultiblockLayer(JsonObject object) throws Exception { 21 | if (!object.has("y")) 22 | throw new IOException("Layer object has no y level"); 23 | yLevel = JsonUtils.getInt(object, "y"); 24 | if (!object.has("blocks")) 25 | throw new IOException("Layer object has no blocks"); 26 | JsonArray blockArray = JsonUtils.getJsonArray(object, "blocks"); 27 | for (JsonElement blockElement : blockArray) { 28 | blocks.add(new MultiblockBlock(blockElement.getAsJsonObject())); 29 | } 30 | } 31 | 32 | public int getyLevel() { 33 | return yLevel; 34 | } 35 | 36 | public void setyLevel(int yLevel) { 37 | this.yLevel = yLevel; 38 | } 39 | 40 | @Override 41 | public String toString() { 42 | return ToStringBuilder.reflectionToString(this); 43 | } 44 | 45 | @Nonnull 46 | @Override 47 | public Iterator iterator() { 48 | return blocks.iterator(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/containers/AnimationTabletContainer.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.containers; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityAnimationTablet; 4 | import net.minecraft.inventory.IInventory; 5 | import net.minecraft.item.ItemStack; 6 | import net.minecraftforge.items.CapabilityItemHandler; 7 | import net.minecraftforge.items.IItemHandler; 8 | import net.minecraftforge.items.SlotItemHandler; 9 | 10 | import javax.annotation.Nonnull; 11 | 12 | /** 13 | * Animation tablet container 14 | */ 15 | public class AnimationTabletContainer extends ThaumicTContainer { 16 | 17 | 18 | /** 19 | * Constructor for AnimationTabletContainer 20 | * @param playerInventory Inventory for the player accessing the inventory 21 | * @param tileEntity Tile entity being opened 22 | */ 23 | public AnimationTabletContainer(IInventory playerInventory, TileEntityAnimationTablet tileEntity) { 24 | super(playerInventory, tileEntity); 25 | } 26 | 27 | /** 28 | * Adds the Animation Tablet's slots 29 | */ 30 | @Override 31 | protected void addOwnSlots() { 32 | IItemHandler itemHandler = this.tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); 33 | int x = 80; 34 | int y = 15; 35 | this.addSlotToContainer(new SlotItemHandler(itemHandler, 0, x, y) { 36 | @Override 37 | public void onSlotChange(@Nonnull ItemStack p_75220_1_, @Nonnull ItemStack p_75220_2_) { 38 | tileEntity.sendUpdates(); 39 | super.onSlotChange(p_75220_1_, p_75220_2_); 40 | } 41 | }); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/libs/LibRecipes.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.libs; 2 | 3 | import net.minecraft.util.ResourceLocation; 4 | 5 | import static com.nekokittygames.thaumictinkerer.common.libs.LibMisc.MOD_ID; 6 | 7 | public class LibRecipes { 8 | public static final ResourceLocation OSMOTIC_ENCHANTER_MB=new ResourceLocation(MOD_ID,"osmotic_enchanter_mb"); 9 | public static final ResourceLocation PRISMARINE=new ResourceLocation(MOD_ID,"prismarine"); 10 | public static final ResourceLocation SOUL_MOLD=new ResourceLocation(MOD_ID,"soul_mould"); 11 | public static final ResourceLocation SPELLBINDING_CLOTH=new ResourceLocation(MOD_ID,"spellbinding_cloth"); 12 | public static final ResourceLocation FUNNEL=new ResourceLocation(MOD_ID,"funnel"); 13 | public static final ResourceLocation DISSIMULATION = new ResourceLocation(MOD_ID, "dissimulation"); 14 | public static final ResourceLocation TRANSVECTOR_INTERFACE = new ResourceLocation(MOD_ID, "transvector_interface"); 15 | public static final ResourceLocation TRANSVECTOR_DISLOCATOR = new ResourceLocation(MOD_ID, "transvector_disslocator"); 16 | public static final ResourceLocation MOB_MAGNET = new ResourceLocation(MOD_ID, "corporeal_attactor"); 17 | public static final ResourceLocation ITEM_MAGNET = new ResourceLocation(MOD_ID, "kinetic_attactor"); 18 | public static final ResourceLocation ENCHANTER = new ResourceLocation(MOD_ID, "osmotic_enchanter"); 19 | public static final ResourceLocation REPAIRER = new ResourceLocation(MOD_ID, "repairer"); 20 | public static final ResourceLocation TABLET = new ResourceLocation(MOD_ID, "tablet"); 21 | public static final ResourceLocation ENERGETIC_NITOR = new ResourceLocation(MOD_ID, "energetic_nitor"); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/client/rendering/special/multi/NitorRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.client.rendering.special.multi; 6 | 7 | import com.nekokittygames.thaumictinkerer.api.rendering.IMultiBlockPreviewRenderer; 8 | import net.minecraft.block.state.IBlockState; 9 | import net.minecraft.util.math.BlockPos; 10 | import net.minecraft.world.World; 11 | import thaumcraft.client.fx.FXDispatcher; 12 | import thaumcraft.common.blocks.misc.BlockNitor; 13 | 14 | /** 15 | * Multiblock preview renderer for nitor. Proxies the Thaumcraft nitor renderer 16 | */ 17 | public class NitorRenderer implements IMultiBlockPreviewRenderer { 18 | 19 | /** 20 | * Renders the nitor, in the correct colour 21 | * 22 | * @param pos position of the block in world 23 | * @param x xPos of block 24 | * @param y yPos of block 25 | * @param z zPos of block 26 | * @param world current World object 27 | * @param blockState current state of the block 28 | */ 29 | @Override 30 | public void render(BlockPos pos, double x, double y, double z, World world, IBlockState blockState) { 31 | BlockNitor nitor = (BlockNitor) blockState.getBlock(); 32 | FXDispatcher.INSTANCE.drawNitorFlames((double) ((float) pos.getX() + 0.5F) + world.rand.nextGaussian() * 0.025D, (double) ((float) pos.getY() + 0.45F) + world.rand.nextGaussian() * 0.025D, (double) ((float) pos.getZ() + 0.5F) + world.rand.nextGaussian() * 0.025D, world.rand.nextGaussian() * 0.0025D, (double) world.rand.nextFloat() * 0.06D, world.rand.nextGaussian() * 0.0025D, nitor.getMapColor(blockState, world, pos).colorValue, 0); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/client/misc/RenderEvents.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.client.misc; 6 | 7 | import com.nekokittygames.thaumictinkerer.client.libs.LibClientResources; 8 | import com.nekokittygames.thaumictinkerer.common.libs.LibMisc; 9 | import net.minecraft.client.renderer.texture.TextureAtlasSprite; 10 | import net.minecraftforge.client.event.TextureStitchEvent; 11 | import net.minecraftforge.fml.common.Mod; 12 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 13 | import net.minecraftforge.fml.relauncher.Side; 14 | 15 | /** 16 | * Clientside Rendering events 17 | */ 18 | @Mod.EventBusSubscriber(modid = LibMisc.MOD_ID,value = Side.CLIENT) 19 | public class RenderEvents { 20 | 21 | public static TextureAtlasSprite MARK_SPRITE; 22 | 23 | /** 24 | * registers the textures for the mark 25 | * @param event {@link TextureStitchEvent.Pre} containing event arguments 26 | */ 27 | @SubscribeEvent 28 | public static void AddTextures(final TextureStitchEvent.Pre event) { 29 | MARK_SPRITE=event.getMap().registerSprite(LibClientResources.MARK_TEXTURE); 30 | } 31 | /* private static StructureRendererHandler structureHandler = new StructureRendererHandler(); 32 | 33 | @SideOnly(Side.CLIENT) 34 | @SubscribeEvent 35 | public static void renderOverlay(RenderGameOverlayEvent event) { 36 | Minecraft mc = Minecraft.getMinecraft(); 37 | long time = System.nanoTime() / 1000000L; 38 | if (event.getType() == RenderGameOverlayEvent.ElementType.TEXT) { 39 | structureHandler.handleStructureRadial(mc, time, event); 40 | } 41 | 42 | } 43 | 44 | */ 45 | 46 | 47 | } -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/packets/PacketHandler.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.packets; 2 | 3 | import net.minecraftforge.fml.common.network.NetworkRegistry; 4 | import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; 5 | import net.minecraftforge.fml.relauncher.Side; 6 | 7 | public class PacketHandler { 8 | 9 | public static SimpleNetworkWrapper INSTANCE = null; 10 | private static int packetId = 0; 11 | 12 | public PacketHandler() { 13 | } 14 | 15 | public static int nextID() { 16 | return packetId++; 17 | } 18 | 19 | public static void registerMessages(String channelName) { 20 | INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(channelName); 21 | registerMessages(); 22 | } 23 | 24 | public static void registerMessages() { 25 | // Register messages which are sent from the client to the server here: 26 | INSTANCE.registerMessage(PacketMobMagnet.Handler.class, PacketMobMagnet.class, nextID(), Side.SERVER); 27 | INSTANCE.registerMessage(PacketMagnetMode.Handler.class, PacketMagnetMode.class, nextID(), Side.SERVER); 28 | INSTANCE.registerMessage(PacketAddEnchant.Handler.class, PacketAddEnchant.class, nextID(), Side.SERVER); 29 | INSTANCE.registerMessage(PacketRemoveEnchant.Handler.class, PacketRemoveEnchant.class, nextID(), Side.SERVER); 30 | INSTANCE.registerMessage(PacketIncrementEnchantLevel.Handler.class, PacketIncrementEnchantLevel.class, nextID(), Side.SERVER); 31 | INSTANCE.registerMessage(PacketStartEnchant.Handler.class, PacketStartEnchant.class, nextID(), Side.SERVER); 32 | INSTANCE.registerMessage(PacketTabletButton.Handler.class, PacketTabletButton.class, nextID(), Side.SERVER); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/compat/jei/JEIEnchanterHandler.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.compat.jei; 2 | 3 | import com.nekokittygames.thaumictinkerer.client.gui.GuiEnchanter; 4 | import mezz.jei.api.gui.IAdvancedGuiHandler; 5 | import org.jetbrains.annotations.NotNull; 6 | 7 | import javax.annotation.Nullable; 8 | import java.awt.*; 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | 12 | public class JEIEnchanterHandler implements IAdvancedGuiHandler { 13 | @Override 14 | public @NotNull Class getGuiContainerClass() { 15 | return GuiEnchanter.class; 16 | } 17 | 18 | @Nullable 19 | @Override 20 | public List getGuiExtraAreas(GuiEnchanter guiContainer) { 21 | List exclusions = new ArrayList<>(); 22 | exclusions.add(new Rectangle(guiContainer.getX() + 176, guiContainer.getY() + 6, guiContainer.getVisRequireWidth(), guiContainer.getVisRequireHeight() + (guiContainer.getEnchanter().getEnchantmentCost().size() > 0 ? 18 : 0))); 23 | int xOffset=0; 24 | int y=0; 25 | for (int i = 0; i < guiContainer.getEnchanter().getEnchantments().size(); i++) { 26 | 27 | if((guiContainer.getY() + (y * 26) + 30 + 15) +24 >guiContainer.height) 28 | { 29 | xOffset+=26+14+1; 30 | y=0; 31 | } 32 | exclusions.add(new Rectangle(guiContainer.getX() + 176+xOffset, guiContainer.getY() + (y * 26) + 30 + 15, 34, 25)); 33 | y++; 34 | } 35 | return exclusions; 36 | } 37 | 38 | @Nullable 39 | @Override 40 | public Object getIngredientUnderMouse(@NotNull GuiEnchanter guiContainer, int mouseX, int mouseY) { 41 | return null; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/client/gui/button/GuiEnchantmentLevelButton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight (nekosune). 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.client.gui.button; 6 | 7 | import com.nekokittygames.thaumictinkerer.client.libs.LibClientResources; 8 | import net.minecraft.client.Minecraft; 9 | import net.minecraft.client.gui.GuiButton; 10 | import org.jetbrains.annotations.NotNull; 11 | 12 | /** 13 | * The Gui enchantment level button. 14 | */ 15 | public class GuiEnchantmentLevelButton extends GuiButton { 16 | 17 | 18 | /** 19 | * Is this a plus or minus button. 20 | */ 21 | public boolean plus; 22 | 23 | /** 24 | * Instantiates a new enchantment level button. 25 | * 26 | * @param buttonId the button id 27 | * @param x the X position of the button 28 | * @param y the Y position of the button 29 | * @param plus is this button a plus or minus 30 | */ 31 | public GuiEnchantmentLevelButton(int buttonId, int x, int y, boolean plus) { 32 | super(buttonId, x, y, 7, 7, ""); 33 | this.plus = plus; 34 | } 35 | 36 | 37 | /** 38 | * 39 | * Draws the button to screen 40 | * 41 | * @param mc {@link Minecraft} instance 42 | * @param mouseX X Position of the mouse 43 | * @param mouseY Y Position of the mouse 44 | * @param partialTicks number of ticks since last draw 45 | */ 46 | @Override 47 | public void drawButton(@NotNull Minecraft mc, int mouseX, int mouseY, float partialTicks) { 48 | if (!enabled) 49 | return; 50 | 51 | int xPos = 200 + (plus ? 7 : 0); 52 | 53 | mc.getTextureManager().bindTexture(LibClientResources.GUI_ENCHANTER); 54 | drawTexturedModalRect(this.x, this.y, xPos, 0, 7, 7); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/client/misc/EnchantmentGui.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.client.misc; 6 | 7 | import net.minecraft.client.Minecraft; 8 | import net.minecraft.client.resources.IResource; 9 | import net.minecraft.enchantment.Enchantment; 10 | import net.minecraft.util.ResourceLocation; 11 | import net.minecraftforge.fml.relauncher.Side; 12 | import net.minecraftforge.fml.relauncher.SideOnly; 13 | 14 | import java.io.IOException; 15 | import java.util.Objects; 16 | 17 | /** 18 | * Helper class to load enchanter icons 19 | */ 20 | @SideOnly(Side.CLIENT) 21 | public class EnchantmentGui { 22 | 23 | /** 24 | * Gets the appropriate ResourceLocation for an enchantment, or the default unknown location if none 25 | * 26 | * @param enchantment {@link Enchantment} to get icon for 27 | * @return {@link ResourceLocation} containing the appropriate icon 28 | */ 29 | public static ResourceLocation getEnchantmentIcon(Enchantment enchantment) { 30 | if(enchantment==null) 31 | return new ResourceLocation("thaumictinkerer", "textures/enchant_icons/unknown.png"); 32 | ResourceLocation object = Enchantment.REGISTRY.getNameForObject(enchantment); 33 | ResourceLocation iconLoc = new ResourceLocation(Objects.requireNonNull(object).getNamespace(), "textures/enchant_icons/" + object.getPath() + ".png"); 34 | 35 | try { 36 | IResource res = Minecraft.getMinecraft().getResourceManager().getResource(iconLoc); 37 | if (res == null) 38 | iconLoc = new ResourceLocation("thaumictinkerer", "textures/enchant_icons/unknown.png"); 39 | } catch (IOException e) { 40 | iconLoc = new ResourceLocation("thaumictinkerer", "textures/enchant_icons/unknown.png"); 41 | } 42 | 43 | return iconLoc; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/containers/EnchanterContainer.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.containers; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityEnchanter; 4 | import net.minecraft.inventory.IInventory; 5 | import net.minecraft.item.ItemStack; 6 | import net.minecraftforge.items.CapabilityItemHandler; 7 | import net.minecraftforge.items.IItemHandler; 8 | import net.minecraftforge.items.SlotItemHandler; 9 | 10 | import javax.annotation.Nonnull; 11 | 12 | /** 13 | * Enchanter container 14 | */ 15 | public class EnchanterContainer extends ThaumicTContainer { 16 | 17 | /** 18 | * Constructor for EnchanterContainer 19 | * @param playerInventory Inventory for the player accessing the inventory 20 | * @param tileEntity Tile entity being opened 21 | */ 22 | public EnchanterContainer(IInventory playerInventory, TileEntityEnchanter tileEntity) { 23 | super(playerInventory, tileEntity); 24 | } 25 | 26 | /** 27 | * Adds the Enchanter's slots 28 | */ 29 | @Override 30 | protected void addOwnSlots() { 31 | IItemHandler itemHandler = this.tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); 32 | int x = 8; 33 | int y = 32; 34 | this.addSlotToContainer(new SlotItemHandler(itemHandler, 0, x, y) { 35 | @Override 36 | public void onSlotChange(@Nonnull ItemStack p_75220_1_, @Nonnull ItemStack p_75220_2_) { 37 | tileEntity.sendUpdates(); 38 | super.onSlotChange(p_75220_1_, p_75220_2_); 39 | } 40 | }); 41 | 42 | TTGhostSlot[] slots = new TTGhostSlot[6]; 43 | for (int i = 0; i < slots.length; i++) { 44 | slots[i] = new TTGhostSlot(ItemStack.EMPTY, i + 1, 177 + (i * 17), 17); 45 | this.addSlotToContainer(slots[i]); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/client/gui/button/GuiFramedEnchantmentButton.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.client.gui.button; 2 | 3 | import com.nekokittygames.thaumictinkerer.ThaumicTinkerer; 4 | import com.nekokittygames.thaumictinkerer.client.gui.GuiEnchanter; 5 | import com.nekokittygames.thaumictinkerer.client.libs.LibClientResources; 6 | import net.minecraft.client.Minecraft; 7 | import net.minecraft.enchantment.Enchantment; 8 | import org.jetbrains.annotations.NotNull; 9 | 10 | public class GuiFramedEnchantmentButton extends GuiEnchantmentButton { 11 | 12 | 13 | public GuiFramedEnchantmentButton(GuiEnchanter parent, int par1, int par2, int par3) { 14 | super(parent, par1, par2, par3); 15 | } 16 | 17 | @Override 18 | protected int getLevel() { 19 | int index = parent.getEnchanter().getEnchantments().indexOf(Enchantment.getEnchantmentID(enchant)); 20 | if (index != -1) { 21 | return parent.getEnchanter().getLevels().get(index); 22 | } 23 | return 1; 24 | } 25 | 26 | @Override 27 | public void drawButton(@NotNull Minecraft mc, int mouseX, int mouseY, float partialTicks) { 28 | if (dontRender() || parent.getEnchanter().getEnchantments().isEmpty() || parent.getEnchanter().getLevels().isEmpty()) 29 | return; 30 | 31 | mc.getTextureManager().bindTexture(LibClientResources.GUI_ENCHANTER); 32 | drawTexturedModalRect(x - 4, y - 4, 176, 0, 24, 24); 33 | 34 | int index = parent.getEnchanter().getEnchantments().indexOf(Enchantment.getEnchantmentID(enchant)); 35 | if (index != -1) { 36 | int level = parent.getEnchanter().getLevels().get(index); 37 | Minecraft.getMinecraft().fontRenderer.drawString(ThaumicTinkerer.proxy.localize("enchantment.level." + level), x + 26, y + 8, 0xFFFFFF, true); 38 | } 39 | super.drawButton(mc, mouseX, mouseY, partialTicks); 40 | } 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/utils/ItemNBTHelper.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.utils; 2 | 3 | import net.minecraft.item.ItemStack; 4 | import net.minecraft.nbt.NBTTagCompound; 5 | 6 | import javax.annotation.Nonnull; 7 | 8 | 9 | public class ItemNBTHelper { 10 | 11 | 12 | @Nonnull 13 | public static NBTTagCompound getItemTag(ItemStack item) { 14 | if (item.getTagCompound() == null) { 15 | item.setTagCompound(new NBTTagCompound()); 16 | } 17 | return item.getTagCompound(); 18 | } 19 | 20 | public static String getString(ItemStack item, String keyName, String defaultValue) { 21 | if (getItemTag(item).hasKey(keyName)) 22 | return getItemTag(item).getString(keyName); 23 | else { 24 | getItemTag(item).setString(keyName, defaultValue); 25 | return defaultValue; 26 | } 27 | } 28 | 29 | public static void setString(ItemStack item, String keyName, String value) { 30 | getItemTag(item).setString(keyName, value); 31 | } 32 | 33 | public static boolean getBool(ItemStack item, String keyName, boolean defaultValue) { 34 | if (getItemTag(item).hasKey(keyName)) 35 | return getItemTag(item).getBoolean(keyName); 36 | else { 37 | getItemTag(item).setBoolean(keyName, defaultValue); 38 | return defaultValue; 39 | } 40 | } 41 | 42 | public static void setBool(ItemStack item, String keyName, boolean value) { 43 | getItemTag(item).setBoolean(keyName, value); 44 | } 45 | 46 | public static void setInteger(ItemStack item, String keyName, int value) { 47 | getItemTag(item).setInteger(keyName, value); 48 | } 49 | 50 | public static int getInteger(ItemStack item, String keyName, int defaultValue) { 51 | if (getItemTag(item).hasKey(keyName)) 52 | return getItemTag(item).getInteger(keyName); 53 | else { 54 | getItemTag(item).setInteger(keyName, defaultValue); 55 | return defaultValue; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/items/TTItem.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.items; 2 | 3 | 4 | import com.nekokittygames.thaumictinkerer.ThaumicTinkerer; 5 | import com.nekokittygames.thaumictinkerer.client.libs.LibClientMisc; 6 | import com.nekokittygames.thaumictinkerer.common.libs.LibMisc; 7 | import net.minecraft.client.resources.I18n; 8 | import net.minecraft.client.util.ITooltipFlag; 9 | import net.minecraft.item.Item; 10 | import net.minecraft.item.ItemStack; 11 | import net.minecraft.util.ResourceLocation; 12 | import net.minecraft.world.World; 13 | import net.minecraftforge.fml.relauncher.Side; 14 | import net.minecraftforge.fml.relauncher.SideOnly; 15 | 16 | import javax.annotation.Nonnull; 17 | import javax.annotation.Nullable; 18 | import java.util.List; 19 | import java.util.Objects; 20 | 21 | public abstract class TTItem extends Item { 22 | private String baseName; 23 | 24 | public TTItem(final String itemName) { 25 | baseName = itemName; 26 | setItemName(this, itemName); 27 | if (isInCreativeTab()) 28 | setCreativeTab(ThaumicTinkerer.getTab()); 29 | } 30 | 31 | public static void setItemName(@Nonnull Item item, String itemName) { 32 | item.setRegistryName(LibMisc.MOD_ID, itemName); 33 | final ResourceLocation regName = Objects.requireNonNull(item.getRegistryName()); 34 | item.setTranslationKey(regName.toString()); 35 | } 36 | 37 | private boolean isInCreativeTab() { 38 | return true; 39 | } 40 | 41 | 42 | @Override 43 | @SideOnly(Side.CLIENT) 44 | public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { 45 | super.addInformation(stack, worldIn, tooltip, flagIn); 46 | int i = 0; 47 | String name = "item." + LibClientMisc.RESOURCE_PREFIX + baseName + "." + i; 48 | while (I18n.hasKey(name)) { 49 | tooltip.add(I18n.format(name)); 50 | i++; 51 | name = "item." + LibClientMisc.RESOURCE_PREFIX + baseName + "." + i; 52 | } 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/commands/CommandRefreshMultiblocks.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.commands; 2 | 3 | import com.google.common.collect.Lists; 4 | import com.nekokittygames.thaumictinkerer.common.libs.LibMisc; 5 | import com.nekokittygames.thaumictinkerer.common.multiblocks.MultiblockManager; 6 | import net.minecraft.command.CommandBase; 7 | import net.minecraft.command.CommandException; 8 | import net.minecraft.command.ICommandSender; 9 | import net.minecraft.server.MinecraftServer; 10 | import net.minecraft.util.math.BlockPos; 11 | 12 | import javax.annotation.Nullable; 13 | import java.io.IOException; 14 | import java.net.URISyntaxException; 15 | import java.util.Collections; 16 | import java.util.List; 17 | 18 | public class CommandRefreshMultiblocks extends CommandBase { 19 | private final List aliases; 20 | 21 | public CommandRefreshMultiblocks() { 22 | aliases = Lists.newArrayList(LibMisc.MOD_ID, "REFRESHMULTI", "refreshmulti"); 23 | } 24 | 25 | @Override 26 | public String getName() { 27 | return "refreshmulti"; 28 | } 29 | 30 | @Override 31 | public List getAliases() { 32 | return aliases; 33 | } 34 | 35 | @Override 36 | public String getUsage(ICommandSender iCommandSender) { 37 | return "refreshmulti"; 38 | } 39 | 40 | @Override 41 | public void execute(MinecraftServer minecraftServer, ICommandSender iCommandSender, String[] strings) throws CommandException { 42 | MultiblockManager.clearMultiblocks(); 43 | try { 44 | MultiblockManager.initMultiblocks(); 45 | } catch (URISyntaxException e) { 46 | e.printStackTrace(); 47 | } catch (IOException e) { 48 | e.printStackTrace(); 49 | } 50 | 51 | } 52 | 53 | @Override 54 | public boolean checkPermission(MinecraftServer server, ICommandSender sender) { 55 | return true; 56 | } 57 | 58 | @Override 59 | public List getTabCompletions(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos targetPos) { 60 | return Collections.emptyList(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/commands/CommandDumpEnchants.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.commands; 2 | 3 | import com.google.common.collect.Lists; 4 | import com.nekokittygames.thaumictinkerer.common.libs.LibMisc; 5 | import net.minecraft.command.CommandBase; 6 | import net.minecraft.command.CommandException; 7 | import net.minecraft.command.ICommandSender; 8 | import net.minecraft.enchantment.Enchantment; 9 | import net.minecraft.server.MinecraftServer; 10 | import net.minecraft.util.math.BlockPos; 11 | import net.minecraft.util.text.TextComponentString; 12 | 13 | import javax.annotation.Nullable; 14 | import java.util.Collections; 15 | import java.util.List; 16 | 17 | public class CommandDumpEnchants extends CommandBase { 18 | private final List aliases; 19 | 20 | public CommandDumpEnchants() { 21 | aliases = Lists.newArrayList(LibMisc.MOD_ID, "DUMPENCHANTS", "dumpenchants"); 22 | } 23 | 24 | @Override 25 | public String getName() { 26 | return "dumpenchants"; 27 | } 28 | 29 | @Override 30 | public List getAliases() { 31 | return aliases; 32 | } 33 | 34 | @Override 35 | public String getUsage(ICommandSender iCommandSender) { 36 | return "dumpenchants"; 37 | } 38 | 39 | @Override 40 | public void execute(MinecraftServer minecraftServer, ICommandSender iCommandSender, String[] strings) throws CommandException { 41 | for (Enchantment enchantment : Enchantment.REGISTRY) { 42 | iCommandSender.sendMessage(new TextComponentString("Enchantment ID: " + Enchantment.REGISTRY.getIDForObject(enchantment))); 43 | iCommandSender.sendMessage(new TextComponentString("Enchantment location: " + Enchantment.REGISTRY.getNameForObject(enchantment))); 44 | iCommandSender.sendMessage(new TextComponentString("Enchantment name: " + enchantment.getName())); 45 | } 46 | 47 | } 48 | 49 | @Override 50 | public boolean checkPermission(MinecraftServer server, ICommandSender sender) { 51 | return true; 52 | } 53 | 54 | @Override 55 | public List getTabCompletions(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos targetPos) { 56 | return Collections.emptyList(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/tileentity/TileEntityCamoflage.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.tileentity; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.state.IBlockState; 5 | import net.minecraft.nbt.NBTTagCompound; 6 | import net.minecraft.network.NetworkManager; 7 | import net.minecraft.network.play.server.SPacketUpdateTileEntity; 8 | import net.minecraft.util.ResourceLocation; 9 | import net.minecraftforge.fml.common.registry.ForgeRegistries; 10 | 11 | import java.util.Objects; 12 | 13 | public abstract class TileEntityCamoflage extends TileEntityThaumicTinkerer { 14 | 15 | public static final String TAG_BLOCK_NAME = "blockName"; 16 | public static final String TAG_BLOCK_META = "blockMeta"; 17 | private IBlockState blockCopy; 18 | 19 | public IBlockState getBlockCopy() { 20 | return blockCopy; 21 | } 22 | 23 | public void setBlockCopy(IBlockState blockCopy) { 24 | this.blockCopy = blockCopy; 25 | } 26 | 27 | 28 | @Override 29 | public void readExtraNBT(NBTTagCompound compound) { 30 | if (compound.hasKey(TAG_BLOCK_NAME) && !compound.getString(TAG_BLOCK_NAME).equalsIgnoreCase("NULL")) { 31 | Block blk = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(compound.getString(TAG_BLOCK_NAME))); 32 | blockCopy = Objects.requireNonNull(blk).getStateFromMeta(compound.getInteger(TAG_BLOCK_META)); 33 | } 34 | else 35 | blockCopy=null; 36 | } 37 | 38 | @Override 39 | public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) { 40 | super.onDataPacket(net, pkt); 41 | sendUpdates(); 42 | } 43 | 44 | @Override 45 | public void writeExtraNBT(NBTTagCompound compound) { 46 | if (blockCopy != null) { 47 | compound.setString(TAG_BLOCK_NAME, Objects.requireNonNull(blockCopy.getBlock().getRegistryName()).toString()); 48 | compound.setInteger(TAG_BLOCK_META, blockCopy.getBlock().getMetaFromState(blockCopy)); 49 | } 50 | else 51 | { 52 | compound.setString(TAG_BLOCK_NAME, "NULL"); 53 | compound.setInteger(TAG_BLOCK_META, -1); 54 | } 55 | 56 | } 57 | 58 | public void clearBlockCopy() 59 | { 60 | this.blockCopy=null; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/containers/TTGhostSlot.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.containers; 2 | 3 | import net.minecraft.entity.player.EntityPlayer; 4 | import net.minecraft.inventory.IInventory; 5 | import net.minecraft.inventory.InventoryBasic; 6 | import net.minecraft.inventory.Slot; 7 | import net.minecraft.item.ItemStack; 8 | import org.jetbrains.annotations.NotNull; 9 | 10 | 11 | /** 12 | * Ghost slot for Thaumic Tinkerer 13 | */ 14 | public class TTGhostSlot extends Slot { 15 | private static final IInventory emptyInventory = new InventoryBasic("[Null]", true, 0); 16 | private ItemStack itemStack; 17 | 18 | /** 19 | * Constructor for ghost slot 20 | * @param inventoryIn Item stack for ghost slot 21 | * @param index index in container 22 | * @param xPosition X Position of the slot 23 | * @param yPosition Y Position of the slot 24 | */ 25 | public TTGhostSlot(ItemStack inventoryIn, int index, int xPosition, int yPosition) { 26 | super(emptyInventory, index, xPosition, yPosition); 27 | this.itemStack = inventoryIn; 28 | } 29 | 30 | /** 31 | * Gets the item stack showing 32 | * @return item stack 33 | */ 34 | public ItemStack getItemStack() { 35 | return itemStack; 36 | } 37 | 38 | /** 39 | * Sets the item stack of the slot 40 | * @param itemStack item stack to use as ghost 41 | */ 42 | public void setItemStack(ItemStack itemStack) { 43 | this.itemStack = itemStack; 44 | } 45 | 46 | /** 47 | * Gets a copy of the stack 48 | * @return copy of the item stack 49 | */ 50 | @Override 51 | public @NotNull ItemStack getStack() { 52 | return itemStack.copy(); 53 | } 54 | 55 | /** 56 | * Can the player take the stack (Always false) 57 | * @param playerIn Player 58 | * @return false always 59 | */ 60 | @Override 61 | public boolean canTakeStack(EntityPlayer playerIn) { 62 | return false; 63 | } 64 | 65 | /** 66 | * Just returns a copy of the stack 67 | * @param amount amount to decrease by (ignored) 68 | * @return copy of the item stack 69 | */ 70 | @Override 71 | public @NotNull ItemStack decrStackSize(int amount) { 72 | return itemStack.copy(); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/api/MobAspect.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.api; 6 | 7 | import thaumcraft.api.aspects.AspectList; 8 | 9 | public class MobAspect { 10 | private Class entityClass; 11 | private AspectList aspects; 12 | private float scale; 13 | private float offset; 14 | private String prefix="minecraft"; 15 | 16 | public MobAspect(Class entityClass, AspectList aspects, float scale, float offset) { 17 | this.entityClass = entityClass; 18 | this.aspects = aspects; 19 | this.scale = scale; 20 | this.offset = offset; 21 | } 22 | 23 | public MobAspect(Class entityClass, AspectList aspects) { 24 | this.entityClass = entityClass; 25 | this.aspects = aspects; 26 | this.scale = 1.0f; 27 | this.offset = 0.0f; 28 | } 29 | 30 | 31 | public String getPrefix() { 32 | return prefix; 33 | } 34 | 35 | public MobAspect setPrefix(String prefix) { 36 | this.prefix = prefix; 37 | return this; 38 | } 39 | 40 | public Class getEntityClass() { 41 | return entityClass; 42 | } 43 | 44 | public MobAspect setEntityClass(Class entityClass) { 45 | this.entityClass = entityClass; 46 | return this; 47 | } 48 | 49 | public AspectList getAspects() { 50 | return aspects; 51 | } 52 | 53 | public MobAspect setAspects(AspectList aspects) { 54 | this.aspects = aspects; 55 | return this; 56 | } 57 | 58 | public float getScale() { 59 | return scale; 60 | } 61 | 62 | public MobAspect setScale(float scale) { 63 | this.scale = scale; 64 | return this; 65 | } 66 | 67 | public float getOffset() { 68 | return offset; 69 | } 70 | 71 | public MobAspect setOffset(float offset) { 72 | this.offset = offset; 73 | return this; 74 | } 75 | 76 | @Override 77 | public String toString() { 78 | final StringBuffer sb = new StringBuffer("MobAspect{"); 79 | sb.append("entityClass=").append(entityClass); 80 | sb.append(", aspects=").append(aspects); 81 | sb.append(", scale=").append(scale); 82 | sb.append(", offset=").append(offset); 83 | sb.append(", prefix='").append(prefix).append('\''); 84 | sb.append('}'); 85 | return sb.toString(); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/blocks/TTBlock.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.blocks; 2 | 3 | import com.nekokittygames.thaumictinkerer.ThaumicTinkerer; 4 | import com.nekokittygames.thaumictinkerer.client.libs.LibClientMisc; 5 | import com.nekokittygames.thaumictinkerer.common.libs.LibMisc; 6 | import net.minecraft.block.Block; 7 | import net.minecraft.block.material.MapColor; 8 | import net.minecraft.block.material.Material; 9 | import net.minecraft.client.resources.I18n; 10 | import net.minecraft.client.util.ITooltipFlag; 11 | import net.minecraft.item.ItemStack; 12 | import net.minecraft.util.ResourceLocation; 13 | import net.minecraft.world.World; 14 | import net.minecraftforge.fml.relauncher.Side; 15 | import net.minecraftforge.fml.relauncher.SideOnly; 16 | 17 | import javax.annotation.Nullable; 18 | import java.util.List; 19 | import java.util.Objects; 20 | 21 | public class TTBlock extends Block { 22 | private String baseName; 23 | 24 | public TTBlock(String name, Material blockMaterialIn, MapColor blockMapColorIn) { 25 | super(blockMaterialIn, blockMapColorIn); 26 | baseName = name; 27 | setBlockName(this, name); 28 | setHardness(2); 29 | if (isInCreativeTab()) 30 | setCreativeTab(ThaumicTinkerer.getTab()); 31 | } 32 | 33 | public TTBlock(String name, Material materialIn) { 34 | this(name, materialIn, materialIn.getMaterialMapColor()); 35 | 36 | } 37 | 38 | private static void setBlockName(final TTBlock block, final String blockName) { 39 | block.setRegistryName(LibMisc.MOD_ID, blockName); 40 | final ResourceLocation registryName = Objects.requireNonNull(block.getRegistryName()); 41 | block.setTranslationKey(registryName.toString()); 42 | } 43 | 44 | protected boolean isInCreativeTab() { 45 | return true; 46 | } 47 | 48 | 49 | @Override 50 | @SideOnly(Side.CLIENT) 51 | public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { 52 | super.addInformation(stack, worldIn, tooltip, flagIn); 53 | int i = 0; 54 | String name = "item." + LibClientMisc.RESOURCE_PREFIX + baseName + "." + i; 55 | while (I18n.hasKey(name)) { 56 | tooltip.add(I18n.format(name)); 57 | i++; 58 | name = "item." + LibClientMisc.RESOURCE_PREFIX + baseName + "." + i; 59 | } 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/misc/ThaumicFakePlayer.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.misc; 2 | 3 | import com.mojang.authlib.GameProfile; 4 | import net.minecraft.inventory.Container; 5 | import net.minecraft.inventory.IInventory; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.potion.PotionEffect; 8 | import net.minecraft.tileentity.TileEntityCommandBlock; 9 | import net.minecraft.util.NonNullList; 10 | import net.minecraft.world.WorldServer; 11 | import net.minecraftforge.common.util.FakePlayer; 12 | 13 | import javax.annotation.Nonnull; 14 | import javax.annotation.Nullable; 15 | 16 | 17 | // Fake player a mix of Lemonszz and Shadows-of-Fire 18 | public class ThaumicFakePlayer extends FakePlayer { 19 | 20 | private final @Nonnull 21 | WorldServer originalWorld; 22 | 23 | ThaumicFakePlayer(WorldServer world, GameProfile name) { 24 | super(world, name); 25 | this.connection = new FakeNetHandler(this); 26 | this.originalWorld = super.getServerWorld(); 27 | } 28 | 29 | @Override 30 | public void displayGUIChest(IInventory chestInventory) { 31 | // Empty 32 | } 33 | 34 | @Override 35 | public void displayGuiCommandBlock(TileEntityCommandBlock commandBlock) { 36 | // Empty 37 | } 38 | 39 | @Override 40 | public void sendAllContents(Container containerToSend, NonNullList itemsList) { 41 | // Empty 42 | } 43 | 44 | @Override 45 | public float getCooledAttackStrength(float adjustTicks) { 46 | return 1; 47 | } 48 | 49 | @Override 50 | public void onUpdate() { 51 | this.interactionManager.updateBlockRemoving(); 52 | } 53 | 54 | @Override 55 | public float getEyeHeight() { 56 | return 0; 57 | } 58 | 59 | @Override 60 | protected void onNewPotionEffect(@Nonnull PotionEffect p_70670_1_) { 61 | // Empty 62 | } 63 | 64 | @Override 65 | protected void onChangedPotionEffect(@Nonnull PotionEffect p_70695_1_, boolean p_70695_2_) { 66 | // Empty 67 | } 68 | 69 | @Override 70 | protected void onFinishedPotionEffect(@Nonnull PotionEffect p_70688_1_) { 71 | // Empty 72 | } 73 | 74 | @Override 75 | protected void playEquipSound(@Nullable ItemStack stack) { 76 | // Empty 77 | } 78 | 79 | @Nonnull 80 | @Override 81 | public WorldServer getServerWorld() { 82 | return originalWorld; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/items/ItemFormRevealer.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.items; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.blocks.ModBlocks; 4 | import com.nekokittygames.thaumictinkerer.common.libs.LibItemNames; 5 | import com.nekokittygames.thaumictinkerer.common.multiblocks.Multiblock; 6 | import com.nekokittygames.thaumictinkerer.common.multiblocks.MultiblockBlock; 7 | import com.nekokittygames.thaumictinkerer.common.multiblocks.MultiblockLayer; 8 | import com.nekokittygames.thaumictinkerer.common.multiblocks.MultiblockManager; 9 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityExample; 10 | import net.minecraft.entity.player.EntityPlayer; 11 | import net.minecraft.tileentity.TileEntity; 12 | import net.minecraft.util.EnumActionResult; 13 | import net.minecraft.util.EnumFacing; 14 | import net.minecraft.util.EnumHand; 15 | import net.minecraft.util.math.BlockPos; 16 | import net.minecraft.world.World; 17 | 18 | public class ItemFormRevealer extends TTItem { 19 | public ItemFormRevealer() { 20 | super(LibItemNames.FORM_REVEALER); 21 | } 22 | 23 | @Override 24 | public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { 25 | Multiblock tmp = MultiblockManager.getMultiblock(worldIn.getBlockState(pos)); 26 | if (tmp == null) 27 | return EnumActionResult.PASS; 28 | for (MultiblockLayer layer : tmp) { 29 | for (MultiblockBlock block : layer) { 30 | int x = pos.getX() + block.getxOffset(); 31 | int y = pos.getY() + layer.getyLevel(); 32 | int z = pos.getZ() + block.getzOffset(); 33 | BlockPos newPos = new BlockPos(x, y, z); 34 | if (worldIn.isAirBlock(newPos)) { 35 | worldIn.setBlockState(newPos, ModBlocks.example.getDefaultState(), 3); 36 | TileEntity te = worldIn.getTileEntity(newPos); 37 | if (te instanceof TileEntityExample) { 38 | TileEntityExample example = (TileEntityExample) te; 39 | example.getGuideBlockType().addAll(tmp.getBlocks().get(block.getBlockName()).getBlockTypes()); 40 | example.setActivated(true); 41 | example.sendUpdates(); 42 | 43 | } 44 | } 45 | } 46 | } 47 | 48 | 49 | return EnumActionResult.SUCCESS; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/items/ModItems.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.items; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.libs.LibMisc; 4 | import net.minecraft.item.Item; 5 | import net.minecraftforge.event.RegistryEvent; 6 | import net.minecraftforge.fml.common.Mod; 7 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 8 | import net.minecraftforge.fml.common.registry.GameRegistry; 9 | import net.minecraftforge.registries.IForgeRegistry; 10 | 11 | import java.util.HashSet; 12 | import java.util.Set; 13 | 14 | import static com.nekokittygames.thaumictinkerer.common.utils.MiscUtils.nullz; 15 | 16 | @SuppressWarnings("WeakerAccess") 17 | @GameRegistry.ObjectHolder(LibMisc.MOD_ID) 18 | public class ModItems { 19 | 20 | public static final ItemShareBook share_book = nullz(); 21 | public static final ItemBlackQuartz black_quartz = nullz(); 22 | public static final ItemConnector connector = nullz(); 23 | public static final ItemSoulMould soul_mould = nullz(); 24 | public static final ItemEnergeticNitor energetic_nitor = nullz(); 25 | public static final ItemSpellbindingCloth spellbinding_cloth=nullz(); 26 | public static final ItemBloodSword blood_sword=nullz(); 27 | public static final ItemMobAspect mob_aspect=nullz(); 28 | //public static final ItemFormRevealer form_revealer = nullz(); 29 | 30 | @Mod.EventBusSubscriber(modid = LibMisc.MOD_ID) 31 | public static class RegistrationHandler { 32 | public static final Set ITEMS = new HashSet<>(); 33 | 34 | /** 35 | * Register this mod's {@link Item}s. 36 | * 37 | * @param event The event 38 | */ 39 | @SubscribeEvent 40 | public static void registerItems(final RegistryEvent.Register event) { 41 | final Item[] items = { 42 | new ItemShareBook(), 43 | new ItemBlackQuartz(), 44 | new ItemConnector(), 45 | new ItemSoulMould(), 46 | new ItemEnergeticNitor(), 47 | new ItemSpellbindingCloth(), 48 | new ItemBloodSword(), 49 | new ItemMobAspect() 50 | // new ItemFormRevealer() 51 | }; 52 | final IForgeRegistry registry = event.getRegistry(); 53 | 54 | for (final Item item : items) { 55 | registry.register(item); 56 | ITEMS.add(item); 57 | } 58 | 59 | 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/client/gui/button/GuiTexturedButton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.client.gui.button; 6 | 7 | import net.minecraft.client.Minecraft; 8 | import net.minecraft.client.gui.GuiButton; 9 | import net.minecraft.util.ResourceLocation; 10 | 11 | import javax.annotation.Nonnull; 12 | 13 | /** 14 | * Gui button that uses a preset texture rather then inbuilt 15 | */ 16 | public class GuiTexturedButton extends GuiButton { 17 | private ResourceLocation textureLocation; 18 | private boolean buttonEnabled; 19 | 20 | /** 21 | * @param buttonId id of the button 22 | * @param x xPos of the button 23 | * @param y yPos of the button 24 | * @param textureLocation texture Location for the button 25 | * @param enabled is the button enabled? 26 | */ 27 | public GuiTexturedButton(int buttonId, int x, int y, ResourceLocation textureLocation, boolean enabled) { 28 | super(buttonId, x, y, 13, 13, ""); 29 | this.textureLocation = textureLocation; 30 | this.buttonEnabled = enabled; 31 | } 32 | 33 | /** 34 | * @return the button's texture location 35 | */ 36 | public ResourceLocation getTextureLocation() { 37 | return textureLocation; 38 | } 39 | 40 | /** 41 | * @param textureLocation the required texture location 42 | */ 43 | public void setTextureLocation(ResourceLocation textureLocation) { 44 | this.textureLocation = textureLocation; 45 | } 46 | 47 | /** 48 | * Is the button enabled? 49 | * 50 | * @return status of the button 51 | */ 52 | public boolean isButtonEnabled() { 53 | return buttonEnabled; 54 | } 55 | 56 | /** 57 | * Sets the enabled status of the button 58 | * 59 | * @param buttonEnabled status of the button 60 | */ 61 | public void setButtonEnabled(boolean buttonEnabled) { 62 | this.buttonEnabled = buttonEnabled; 63 | } 64 | 65 | /** 66 | * @param mc Minecraft instance 67 | * @param mouseX xPos of the mouse 68 | * @param mouseY yPos of the mouse 69 | * @param partialTicks how many ticks 70 | */ 71 | @Override 72 | public void drawButton(@Nonnull Minecraft mc, int mouseX, int mouseY, float partialTicks) { 73 | mc.renderEngine.bindTexture(textureLocation); 74 | int y = buttonEnabled ? 13 : 0; 75 | drawTexturedModalRect(x, this.y, 176, y, width, height); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/client/libs/LibClientResources.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.client.libs; 6 | 7 | import net.minecraft.util.ResourceLocation; 8 | 9 | /** 10 | * The Client Resource Library 11 | */ 12 | public class LibClientResources { 13 | private static final String ASSET_NAME = "thaumictinkerer"; 14 | /** 15 | * The constant GUI_MOBMAGNET. 16 | */ 17 | public static final ResourceLocation GUI_MOBMAGNET = new ResourceLocation(ASSET_NAME, "textures/gui/mob_magnet.png"); 18 | /** 19 | * The constant GUI_ENCHANTER. 20 | */ 21 | public static final ResourceLocation GUI_ENCHANTER = new ResourceLocation(ASSET_NAME, "textures/gui/enchanter.png"); 22 | /** 23 | * The constant GUI_ANIMATION_TABLET. 24 | */ 25 | public static final ResourceLocation GUI_ANIMATION_TABLET = new ResourceLocation(ASSET_NAME, "textures/gui/animation_tablet.png"); 26 | /** 27 | * The constant MISC_AT_CENTER. 28 | */ 29 | public static final ResourceLocation MISC_AT_CENTER = new ResourceLocation(ASSET_NAME, "textures/misc/animation_tablet/center.png"); 30 | /** 31 | * The constant MISC_AT_LEFT. 32 | */ 33 | public static final ResourceLocation MISC_AT_LEFT = new ResourceLocation(ASSET_NAME, "textures/misc/animation_tablet/left.png"); 34 | /** 35 | * The constant MISC_AT_RIGHT. 36 | */ 37 | public static final ResourceLocation MISC_AT_RIGHT = new ResourceLocation(ASSET_NAME, "textures/misc/animation_tablet/right.png"); 38 | /** 39 | * The constant MISC_AT_INDENT. 40 | */ 41 | public static final ResourceLocation MISC_AT_INDENT = new ResourceLocation(ASSET_NAME, "textures/misc/animation_tablet/facing_indent.png"); 42 | /** 43 | * The constant MARK_TEXTURE. 44 | */ 45 | public static final ResourceLocation MARK_TEXTURE=new ResourceLocation(ASSET_NAME,"misc/mark"); 46 | 47 | 48 | /** 49 | * The type Shaders. 50 | */ 51 | public static final class Shaders { 52 | /** 53 | * The constant PREFIX_SHADER. 54 | */ 55 | public static final String PREFIX_SHADER = "/assets/thaumictinkerer/shaders/"; 56 | /** 57 | * The constant CHANGE_ALPHA_VERT. 58 | */ 59 | public static final String CHANGE_ALPHA_VERT = PREFIX_SHADER + "change_alpha.vert"; 60 | /** 61 | * The constant CHANGE_ALPHA_FRAG. 62 | */ 63 | public static final String CHANGE_ALPHA_FRAG = PREFIX_SHADER + "change_alpha.frag"; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/api/MobAspects.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.api; 6 | 7 | import net.minecraft.entity.monster.*; 8 | import net.minecraft.entity.passive.EntityBat; 9 | import net.minecraft.entity.passive.EntityChicken; 10 | import net.minecraft.entity.passive.EntityCow; 11 | import net.minecraft.entity.passive.EntityHorse; 12 | import thaumcraft.api.aspects.Aspect; 13 | import thaumcraft.api.aspects.AspectList; 14 | import thaumcraft.common.entities.monster.EntityBrainyZombie; 15 | import thaumcraft.common.entities.monster.EntityFireBat; 16 | 17 | import java.util.Dictionary; 18 | import java.util.Hashtable; 19 | 20 | public class MobAspects { 21 | private static final Dictionary,MobAspect> aspects=new Hashtable<>(); 22 | 23 | public static Dictionary, MobAspect> getAspects() { 24 | return aspects; 25 | } 26 | 27 | static { 28 | aspects.put(EntitySnowman.class,new MobAspect(EntitySnowman.class,new AspectList().add(Aspect.WATER,2).add(Aspect.MAN,1))); 29 | aspects.put(EntityBat.class,new MobAspect(EntityBat.class,new AspectList().add(Aspect.AIR,2).add(Aspect.FLIGHT,1))); 30 | aspects.put(EntityBlaze.class,new MobAspect(EntityBlaze.class,new AspectList().add(Aspect.FIRE,3))); 31 | aspects.put(EntityBrainyZombie.class,new MobAspect(EntityBrainyZombie.class,new AspectList().add(Aspect.MAGIC,1).add(Aspect.UNDEAD,1).add(Aspect.DARKNESS,1)).setPrefix("thaumcraft")); 32 | aspects.put(EntityFireBat.class,new MobAspect(EntityFireBat.class,new AspectList().add(Aspect.FLIGHT,1).add(Aspect.FIRE,1).add(Aspect.MAGIC,1)).setPrefix("thaumcraft")); 33 | aspects.put(EntityCaveSpider.class,new MobAspect(EntityCaveSpider.class,new AspectList().add(Aspect.BEAST,1).add(Aspect.DEATH,2))); 34 | aspects.put(EntityChicken.class,new MobAspect(EntityChicken.class,new AspectList().add(Aspect.LIFE,1).add(Aspect.FLIGHT,1).add(Aspect.BEAST,1))); 35 | aspects.put(EntityCow.class,new MobAspect(EntityCow.class,new AspectList().add(Aspect.BEAST,2).add(Aspect.EARTH,1))); 36 | aspects.put(EntityCreeper.class,new MobAspect(EntityCreeper.class,new AspectList().add(Aspect.MAGIC,1).add(Aspect.BEAST,1).add(Aspect.ELDRITCH,1))); 37 | aspects.put(EntityEnderman.class,new MobAspect(EntityEnderman.class,new AspectList().add(Aspect.ELDRITCH,2).add(Aspect.MAN,1),0.3f,0.0f)); 38 | aspects.put(EntityGhast.class,new MobAspect(EntityGhast.class,new AspectList().add(Aspect.FIRE,1).add(Aspect.FLIGHT,2),0.1f,0.2f)); 39 | aspects.put(EntityHorse.class,new MobAspect(EntityHorse.class,new AspectList().add(Aspect.BEAST,2).add(Aspect.AIR,1))); 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/packets/PacketMobMagnet.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.packets; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityMobMagnet; 4 | import io.netty.buffer.ByteBuf; 5 | import net.minecraft.entity.player.EntityPlayerMP; 6 | import net.minecraft.tileentity.TileEntity; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.World; 9 | import net.minecraftforge.fml.common.FMLCommonHandler; 10 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 11 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 12 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 13 | 14 | public class PacketMobMagnet implements IMessage { 15 | private BlockPos pos; 16 | private boolean adult; 17 | 18 | public PacketMobMagnet() { 19 | 20 | } 21 | public PacketMobMagnet(TileEntity te, boolean adult) { 22 | this(te.getPos(), adult); 23 | } 24 | 25 | public PacketMobMagnet(BlockPos pos, boolean adult) { 26 | this.pos = pos; 27 | this.adult = adult; 28 | } 29 | 30 | public BlockPos getPos() { 31 | return pos; 32 | } 33 | 34 | public void setPos(BlockPos pos) { 35 | this.pos = pos; 36 | } 37 | 38 | @Override 39 | public void fromBytes(ByteBuf byteBuf) { 40 | 41 | this.pos = BlockPos.fromLong(byteBuf.readLong()); 42 | this.adult = byteBuf.readBoolean(); 43 | } 44 | 45 | @Override 46 | public void toBytes(ByteBuf byteBuf) { 47 | byteBuf.writeLong(pos.toLong()); 48 | byteBuf.writeBoolean(adult); 49 | } 50 | 51 | public static class Handler implements IMessageHandler { 52 | 53 | @Override 54 | public IMessage onMessage(PacketMobMagnet packetMobMagnet, MessageContext messageContext) { 55 | FMLCommonHandler.instance().getWorldThread(messageContext.netHandler).addScheduledTask(() -> handle(packetMobMagnet, messageContext)); 56 | return null; 57 | } 58 | 59 | private void handle(PacketMobMagnet packetMobMagnet, MessageContext ctx) { 60 | EntityPlayerMP playerEntity = ctx.getServerHandler().player; 61 | World world = playerEntity.getEntityWorld(); 62 | if (world.isBlockLoaded(packetMobMagnet.getPos())) { 63 | TileEntity te = world.getTileEntity(packetMobMagnet.getPos()); 64 | if (te instanceof TileEntityMobMagnet) { 65 | TileEntityMobMagnet magnet = (TileEntityMobMagnet) te; 66 | magnet.setPullAdults(packetMobMagnet.adult); 67 | } 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/multiblocks/MultiblockBlockType.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.multiblocks; 2 | 3 | import com.google.gson.JsonArray; 4 | import com.google.gson.JsonElement; 5 | import com.google.gson.JsonObject; 6 | import net.minecraft.block.Block; 7 | import net.minecraft.block.state.IBlockState; 8 | import net.minecraft.util.ResourceLocation; 9 | import net.minecraftforge.fml.common.registry.ForgeRegistries; 10 | 11 | import java.io.IOException; 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | import java.util.Objects; 15 | 16 | @SuppressWarnings("deprecation") 17 | public class MultiblockBlockType { 18 | 19 | private String blockName; 20 | private List blockTypes = new ArrayList<>(); 21 | 22 | MultiblockBlockType(JsonObject object) throws Exception { 23 | if (!object.has("name")) 24 | throw new IOException("Multiblock json malformed, missing name for object " + object.toString()); 25 | blockName = object.get("name").getAsString(); 26 | if (!object.has("block")) 27 | throw new IOException("Multiblock json malformed, missing block array for object " + object.toString()); 28 | JsonElement blocksObject = object.get("block"); 29 | if (blocksObject.isJsonArray()) { 30 | JsonArray blocks = (JsonArray) blocksObject; 31 | for (JsonElement block : blocks) { 32 | addBlock(block); 33 | } 34 | } else 35 | addBlock(blocksObject); 36 | 37 | } 38 | 39 | private void addBlock(JsonElement blocksObject) throws Exception { 40 | IBlockState state; 41 | if (blocksObject.isJsonObject()) { 42 | JsonObject blockObj = (JsonObject) blocksObject; 43 | if (!blockObj.has("blockType")) 44 | throw new IOException("Multiblock json malformed, missing block array for object " + blockObj.toString()); 45 | Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(blockObj.get("blockType").getAsString())); 46 | int meta = 0; 47 | if (blockObj.has("blockMeta")) 48 | meta = blockObj.get("blockMeta").getAsInt(); 49 | state = Objects.requireNonNull(block).getStateFromMeta(meta); 50 | } else { 51 | Block block = ForgeRegistries.BLOCKS.getValue(new ResourceLocation(blocksObject.getAsString())); 52 | state = Objects.requireNonNull(block).getStateFromMeta(0); 53 | } 54 | blockTypes.add(state); 55 | } 56 | 57 | protected String getBlockName() { 58 | return blockName; 59 | } 60 | 61 | public void setBlockName(String blockName) { 62 | this.blockName = blockName; 63 | } 64 | 65 | public List getBlockTypes() { 66 | return blockTypes; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/recipes/SpellClothRecipe.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.recipes; 2 | 3 | import com.nekokittygames.thaumictinkerer.api.INoRemoveEnchant; 4 | import com.nekokittygames.thaumictinkerer.common.libs.LibMisc; 5 | import net.minecraft.inventory.InventoryCrafting; 6 | import net.minecraft.item.Item; 7 | import net.minecraft.item.ItemStack; 8 | import net.minecraft.item.crafting.IRecipe; 9 | import net.minecraft.nbt.NBTTagCompound; 10 | import net.minecraft.util.ResourceLocation; 11 | import net.minecraft.world.World; 12 | import net.minecraftforge.registries.IForgeRegistryEntry; 13 | 14 | import javax.annotation.Nullable; 15 | 16 | public class SpellClothRecipe extends IForgeRegistryEntry.Impl implements IRecipe { 17 | 18 | Item item; 19 | 20 | public SpellClothRecipe(Item item) { 21 | this.item = item; 22 | this.setRegistryName(LibMisc.MOD_ID,"spellbinding_cloth"); 23 | } 24 | 25 | @Override 26 | public boolean matches(InventoryCrafting inv, World worldIn) { 27 | boolean foundCloth = false; 28 | boolean foundEnchanted = false; 29 | for (int i = 0; i < inv.getSizeInventory(); i++) { 30 | ItemStack stack = inv.getStackInSlot(i); 31 | if (stack != ItemStack.EMPTY) { 32 | // TODO: Add config / IMC based blacklist 33 | if (stack.isItemEnchanted() && !(stack.getItem() instanceof INoRemoveEnchant) && !foundEnchanted) 34 | foundEnchanted = true; 35 | 36 | else if (stack.getItem() == item && !foundCloth) 37 | foundCloth = true; 38 | 39 | else return false; // Found an invalid item, breaking the recipe 40 | } 41 | } 42 | 43 | return foundCloth && foundEnchanted; 44 | } 45 | 46 | @Override 47 | public ItemStack getCraftingResult(InventoryCrafting inv) { 48 | ItemStack stackToDisenchant = ItemStack.EMPTY; 49 | for (int i = 0; i < inv.getSizeInventory(); i++) { 50 | ItemStack stack = inv.getStackInSlot(i); 51 | if (stack != null && stack.isItemEnchanted()) { 52 | stackToDisenchant = stack.copy(); 53 | break; 54 | } 55 | } 56 | 57 | if (stackToDisenchant == ItemStack.EMPTY) 58 | return ItemStack.EMPTY; 59 | NBTTagCompound cmp = (NBTTagCompound) stackToDisenchant.getTagCompound().copy(); 60 | cmp.removeTag("ench"); // Remove enchantments 61 | stackToDisenchant.setTagCompound(cmp); 62 | 63 | return stackToDisenchant; 64 | } 65 | 66 | @Override 67 | public boolean canFit(int width, int height) { 68 | return width>=2 && height>=2; 69 | } 70 | 71 | @Override 72 | public ItemStack getRecipeOutput() { 73 | return ItemStack.EMPTY; 74 | } 75 | 76 | @Override 77 | public boolean isDynamic() { 78 | return true; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/tileentity/TileEntityThaumicTinkerer.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.tileentity; 2 | 3 | import net.minecraft.nbt.NBTTagCompound; 4 | import net.minecraft.network.NetworkManager; 5 | import net.minecraft.network.play.server.SPacketUpdateTileEntity; 6 | import net.minecraft.tileentity.TileEntity; 7 | 8 | import javax.annotation.Nullable; 9 | 10 | public abstract class TileEntityThaumicTinkerer extends TileEntity { 11 | 12 | private boolean redstonePowered; 13 | 14 | public void sendUpdates() { 15 | world.markBlockRangeForRenderUpdate(pos, pos); 16 | world.notifyBlockUpdate(pos, world.getBlockState(pos), world.getBlockState(pos), 3); 17 | 18 | markDirty(); 19 | } 20 | 21 | @Override 22 | public NBTTagCompound writeToNBT(NBTTagCompound compound) { 23 | writeExtraNBT(compound); 24 | return super.writeToNBT(compound); 25 | 26 | } 27 | 28 | public void writeExtraNBT(NBTTagCompound nbttagcompound) { 29 | nbttagcompound.setBoolean("redstone", redstonePowered); 30 | } 31 | 32 | @Override 33 | public void readFromNBT(NBTTagCompound compound) { 34 | readExtraNBT(compound); 35 | super.readFromNBT(compound); 36 | } 37 | 38 | public void readExtraNBT(NBTTagCompound nbttagcompound) { 39 | // todo: remove if in a couple versions time 40 | if (nbttagcompound.hasKey("redstone")) 41 | redstonePowered = nbttagcompound.getBoolean("redstone"); 42 | else 43 | redstonePowered = false; 44 | } 45 | 46 | @Override 47 | public NBTTagCompound getUpdateTag() { 48 | NBTTagCompound cmp = super.getUpdateTag(); 49 | writeExtraNBT(cmp); 50 | return cmp; 51 | } 52 | 53 | @Override 54 | public void handleUpdateTag(NBTTagCompound tag) { 55 | super.handleUpdateTag(tag); 56 | readExtraNBT(tag); 57 | } 58 | 59 | @Override 60 | public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) { 61 | super.onDataPacket(net, pkt); 62 | handleUpdateTag(pkt.getNbtCompound()); 63 | sendUpdates(); 64 | } 65 | 66 | @Nullable 67 | @Override 68 | public SPacketUpdateTileEntity getUpdatePacket() { 69 | return new SPacketUpdateTileEntity(this.pos, 5, this.getUpdateTag()); 70 | } 71 | 72 | public abstract boolean respondsToPulses(); 73 | 74 | public void activateOnPulse() { 75 | // Empty 76 | } 77 | 78 | public boolean getRedstonePowered() { 79 | return redstonePowered; 80 | } 81 | 82 | public void setRedstonePowered(boolean b) { 83 | boolean oldRedstone = redstonePowered; 84 | redstonePowered = b; 85 | if (redstonePowered != oldRedstone) 86 | this.sendUpdates(); 87 | } 88 | 89 | public boolean canRedstoneConnect() { 90 | return false; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/items/ItemMobAspect.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020. Katrina Knight 3 | */ 4 | 5 | package com.nekokittygames.thaumictinkerer.common.items; 6 | 7 | import com.nekokittygames.thaumictinkerer.common.helper.IItemVariants; 8 | import com.nekokittygames.thaumictinkerer.common.libs.LibItemNames; 9 | import net.minecraft.client.resources.I18n; 10 | import net.minecraft.client.util.ITooltipFlag; 11 | import net.minecraft.creativetab.CreativeTabs; 12 | import net.minecraft.item.ItemStack; 13 | import net.minecraft.nbt.NBTTagCompound; 14 | import net.minecraft.util.NonNullList; 15 | import net.minecraft.world.World; 16 | import net.minecraftforge.fml.relauncher.Side; 17 | import net.minecraftforge.fml.relauncher.SideOnly; 18 | import thaumcraft.api.aspects.Aspect; 19 | 20 | import javax.annotation.Nullable; 21 | import java.util.List; 22 | import java.util.Set; 23 | import java.util.SortedSet; 24 | import java.util.TreeSet; 25 | 26 | public class ItemMobAspect extends TTItem implements IItemVariants { 27 | public static String ASPECT_NAME="aspectName"; 28 | public ItemMobAspect() { 29 | super(LibItemNames.MOB_ASPECT); 30 | } 31 | 32 | 33 | @Override 34 | public String GetVariant(ItemStack stack) { 35 | return stack.getTagCompound() != null ? stack.getTagCompound().getString(ASPECT_NAME) : "aer"; 36 | } 37 | 38 | @Override 39 | public Set GetVariants() { 40 | return Aspect.aspects.keySet(); 41 | } 42 | 43 | @Override 44 | @SideOnly(Side.CLIENT) 45 | public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { 46 | super.addInformation(stack, worldIn, tooltip, flagIn); 47 | if(stack.hasTagCompound() && stack.getTagCompound().hasKey(ASPECT_NAME)) { 48 | Aspect aspect=Aspect.getAspect(stack.getTagCompound().getString(ASPECT_NAME)); 49 | if(aspect!=null) { 50 | tooltip.add(I18n.format("thaumictinkerer.mobaspect.type", aspect.getName())); 51 | } 52 | else 53 | { 54 | tooltip.add(I18n.format("thaumictinkerer.mobaspect.invalid")); 55 | } 56 | } 57 | else { 58 | tooltip.add(I18n.format("thaumictinkerer.mobaspect.invalid")); 59 | } 60 | } 61 | 62 | @Override 63 | public void getSubItems(CreativeTabs tab, NonNullList items) { 64 | if (this.isInCreativeTab(tab)) 65 | { 66 | SortedSet sortedAspects = new TreeSet<>(GetVariants()); 67 | for(String aspect:sortedAspects) { 68 | ItemStack itemStack=new ItemStack(this); 69 | NBTTagCompound cmp=itemStack.getTagCompound(); 70 | if(cmp==null) 71 | cmp=new NBTTagCompound(); 72 | cmp.setString(ASPECT_NAME,aspect); 73 | itemStack.setTagCompound(cmp); 74 | items.add(itemStack); 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/foci/FocusEffectTelekenesis.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.foci; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.misc.MiscHelper; 4 | import net.minecraft.entity.item.EntityItem; 5 | import net.minecraft.util.math.AxisAlignedBB; 6 | import net.minecraft.util.math.RayTraceResult; 7 | import net.minecraft.world.World; 8 | import thaumcraft.api.aspects.Aspect; 9 | import thaumcraft.api.casters.FocusEffect; 10 | import thaumcraft.api.casters.NodeSetting; 11 | import thaumcraft.api.casters.Trajectory; 12 | import thaumcraft.client.fx.FXDispatcher; 13 | import thaumcraft.codechicken.lib.vec.Vector3; 14 | 15 | import javax.annotation.Nullable; 16 | import java.util.List; 17 | 18 | public class FocusEffectTelekenesis extends FocusEffect { 19 | @Override 20 | public boolean execute(RayTraceResult paramRayTraceResult, @Nullable Trajectory paramTrajectory, float paramFloat, int paramInt) { 21 | if ( paramRayTraceResult.typeOfHit!= RayTraceResult.Type.BLOCK) 22 | return false; 23 | if (paramTrajectory == null) 24 | return false; 25 | Vector3 target = new Vector3(paramTrajectory.source); 26 | final int range = 6 + getSettingValue("power"); 27 | final double distance = range - 1; 28 | if (this.getPackage().getCaster().isSneaking()) 29 | target.add(new Vector3(this.getPackage().getCaster().getLookVec()).multiply(distance)); 30 | target.y += 0.5; 31 | List entities = getPackage().world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(target.x - range, target.y - range, target.z - range, target.x + range, target.y + range, target.z + range)); 32 | if (!entities.isEmpty()) { 33 | for (EntityItem item : entities) { 34 | MiscHelper.setEntityMotionFromVector(item, target, 0.3333F); 35 | FXDispatcher.INSTANCE.sparkle((float) item.posX, (float) item.posY, (float) item.posZ, 0, 0, 0); 36 | } 37 | } 38 | 39 | return false; 40 | } 41 | 42 | @Override 43 | public NodeSetting[] createSettings() { 44 | return new NodeSetting[]{new NodeSetting("power", "focus.common.power", new NodeSetting.NodeSettingIntRange(1, 5))}; 45 | } 46 | 47 | @Override 48 | public void renderParticleFX(World paramWorld, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, double paramDouble6) { 49 | // empty 50 | } 51 | 52 | @Override 53 | public int getComplexity() { 54 | return 3 * getSettingValue("power"); 55 | } 56 | 57 | @Override 58 | public Aspect getAspect() { 59 | return Aspect.MAGIC; 60 | } 61 | 62 | @Override 63 | public String getKey() { 64 | return "thaumictinkerer.TELEKENESIS"; 65 | } 66 | 67 | @Override 68 | public String getResearch() { 69 | return "TT_TELEKENESIS"; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/packets/PacketMagnetMode.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.packets; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.blocks.BlockMagnet; 4 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityMagnet; 5 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityMobMagnet; 6 | import io.netty.buffer.ByteBuf; 7 | import net.minecraft.entity.player.EntityPlayerMP; 8 | import net.minecraft.tileentity.TileEntity; 9 | import net.minecraft.util.math.BlockPos; 10 | import net.minecraft.world.World; 11 | import net.minecraftforge.fml.common.FMLCommonHandler; 12 | import net.minecraftforge.fml.common.network.ByteBufUtils; 13 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 14 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 15 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 16 | 17 | public class PacketMagnetMode implements IMessage { 18 | private BlockPos pos; 19 | private BlockMagnet.MagnetPull mode; 20 | 21 | public PacketMagnetMode() { 22 | 23 | } 24 | public PacketMagnetMode(TileEntity te, BlockMagnet.MagnetPull mode) { 25 | this(te.getPos(), mode); 26 | } 27 | 28 | public PacketMagnetMode(BlockPos pos, BlockMagnet.MagnetPull mode) { 29 | this.pos = pos; 30 | this.mode = mode; 31 | } 32 | 33 | public BlockPos getPos() { 34 | return pos; 35 | } 36 | 37 | public void setPos(BlockPos pos) { 38 | this.pos = pos; 39 | } 40 | 41 | @Override 42 | public void fromBytes(ByteBuf byteBuf) { 43 | 44 | this.pos = BlockPos.fromLong(byteBuf.readLong()); 45 | // tmp 46 | this.mode = ByteBufUtils.readUTF8String(byteBuf).equalsIgnoreCase("push")?BlockMagnet.MagnetPull.PUSH:BlockMagnet.MagnetPull.PULL; 47 | } 48 | 49 | @Override 50 | public void toBytes(ByteBuf byteBuf) { 51 | byteBuf.writeLong(pos.toLong()); 52 | ByteBufUtils.writeUTF8String(byteBuf,mode.getName()); 53 | } 54 | 55 | public static class Handler implements IMessageHandler { 56 | 57 | @Override 58 | public IMessage onMessage(PacketMagnetMode packetMobMagnet, MessageContext messageContext) { 59 | FMLCommonHandler.instance().getWorldThread(messageContext.netHandler).addScheduledTask(() -> handle(packetMobMagnet, messageContext)); 60 | return null; 61 | } 62 | 63 | private void handle(PacketMagnetMode packetMobMagnet, MessageContext ctx) { 64 | EntityPlayerMP playerEntity = ctx.getServerHandler().player; 65 | World world = playerEntity.getEntityWorld(); 66 | if (world.isBlockLoaded(packetMobMagnet.getPos())) { 67 | TileEntity te = world.getTileEntity(packetMobMagnet.getPos()); 68 | if (te instanceof TileEntityMagnet) { 69 | TileEntityMagnet magnet = (TileEntityMagnet) te; 70 | magnet.setMode(packetMobMagnet.mode); 71 | 72 | } 73 | } 74 | } 75 | } 76 | } 77 | 78 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/packets/PacketAddEnchant.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.packets; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityEnchanter; 4 | import io.netty.buffer.ByteBuf; 5 | import net.minecraft.entity.player.EntityPlayerMP; 6 | import net.minecraft.tileentity.TileEntity; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.World; 9 | import net.minecraftforge.fml.common.FMLCommonHandler; 10 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 11 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 12 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 13 | 14 | public class PacketAddEnchant implements IMessage { 15 | 16 | 17 | private BlockPos pos; 18 | private int enchantID; 19 | 20 | public PacketAddEnchant() { 21 | 22 | } 23 | 24 | public PacketAddEnchant(TileEntityEnchanter enchanter, int enchantID) { 25 | this.pos = enchanter.getPos(); 26 | this.enchantID = enchantID; 27 | } 28 | 29 | public PacketAddEnchant(BlockPos pos, int enchantID) { 30 | this.pos = pos; 31 | this.enchantID = enchantID; 32 | } 33 | 34 | public BlockPos getPos() { 35 | return pos; 36 | } 37 | 38 | public void setPos(BlockPos pos) { 39 | this.pos = pos; 40 | } 41 | 42 | public int getEnchantID() { 43 | return enchantID; 44 | } 45 | 46 | public void setEnchantID(int enchantID) { 47 | this.enchantID = enchantID; 48 | } 49 | 50 | @Override 51 | public void fromBytes(ByteBuf byteBuf) { 52 | pos = BlockPos.fromLong(byteBuf.readLong()); 53 | enchantID = byteBuf.readInt(); 54 | } 55 | 56 | @Override 57 | public void toBytes(ByteBuf byteBuf) { 58 | byteBuf.writeLong(pos.toLong()); 59 | byteBuf.writeInt(enchantID); 60 | } 61 | 62 | public static class Handler implements IMessageHandler { 63 | 64 | @Override 65 | public IMessage onMessage(PacketAddEnchant packetAddEnchant, MessageContext messageContext) { 66 | FMLCommonHandler.instance().getWorldThread(messageContext.netHandler).addScheduledTask(() -> handle(packetAddEnchant, messageContext)); 67 | return null; 68 | } 69 | 70 | private void handle(PacketAddEnchant packetAddEnchant, MessageContext ctx) { 71 | EntityPlayerMP playerEntity = ctx.getServerHandler().player; 72 | World world = playerEntity.getEntityWorld(); 73 | if (world.isBlockLoaded(packetAddEnchant.getPos())) { 74 | TileEntity te = world.getTileEntity(packetAddEnchant.getPos()); 75 | if (te instanceof TileEntityEnchanter) { 76 | TileEntityEnchanter enchanter = (TileEntityEnchanter) te; 77 | enchanter.appendEnchant(packetAddEnchant.enchantID); 78 | enchanter.appendLevel(1); 79 | } 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/blocks/BlockNitorVapor.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.blocks; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.items.ModItems; 4 | import com.nekokittygames.thaumictinkerer.common.libs.LibBlockNames; 5 | import net.minecraft.block.state.BlockFaceShape; 6 | import net.minecraft.block.state.IBlockState; 7 | import net.minecraft.entity.player.EntityPlayer; 8 | import net.minecraft.item.ItemStack; 9 | import net.minecraft.util.EnumFacing; 10 | import net.minecraft.util.math.AxisAlignedBB; 11 | import net.minecraft.util.math.BlockPos; 12 | import net.minecraft.world.IBlockAccess; 13 | import net.minecraft.world.World; 14 | import net.minecraftforge.fml.relauncher.Side; 15 | import net.minecraftforge.fml.relauncher.SideOnly; 16 | import thaumcraft.client.fx.FXDispatcher; 17 | 18 | import java.util.List; 19 | import java.util.Random; 20 | 21 | public class BlockNitorVapor extends BlockGas { 22 | 23 | public BlockNitorVapor() { 24 | super(LibBlockNames.ENERGETIC_NITOR_VAPOR); 25 | this.setTickRandomly(true); 26 | } 27 | 28 | @Override 29 | public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) { 30 | return BlockFaceShape.UNDEFINED; 31 | //return super.getBlockFaceShape(worldIn, state, pos, face); 32 | } 33 | 34 | 35 | //@Override 36 | //public int tickRate(World world) { 37 | // return world.provider.getDimensionType() == DimensionType.OVERWORLD ? 60 : 20; 38 | //} 39 | 40 | @Override 41 | @SideOnly(Side.CLIENT) 42 | public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand) { 43 | if (rand.nextFloat() < 0.03F) 44 | FXDispatcher.INSTANCE.sparkle(pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, 1F, 4, rand.nextFloat() / 2); 45 | } 46 | 47 | 48 | @Override 49 | public void updateTick(World world, BlockPos pos, IBlockState state, Random random) { 50 | 51 | 52 | if (!world.isRemote) { 53 | List players = world.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(pos.getX() - 1, pos.getY() - 1, pos.getZ() - 1, pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1)); 54 | 55 | if (players.isEmpty()) world.setBlockToAir(pos); 56 | else if (players.stream().noneMatch(p -> p.inventory.hasItemStack(new ItemStack(ModItems.energetic_nitor)))) 57 | world.setBlockToAir(pos); 58 | 59 | //world.scheduleBlockUpdate(pos, this, tickRate(world), 0); 60 | 61 | } 62 | } 63 | 64 | @Override 65 | protected boolean isInCreativeTab() { 66 | return false; 67 | } 68 | 69 | @Override 70 | public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos) { 71 | return 15; 72 | } 73 | 74 | @Override 75 | public void onBlockAdded(World world, BlockPos pos, IBlockState state) { 76 | if (!world.isRemote) 77 | world.scheduleBlockUpdate(pos, this, tickRate(world), 0); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/packets/PacketTabletButton.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.packets; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityAnimationTablet; 4 | import io.netty.buffer.ByteBuf; 5 | import net.minecraft.entity.player.EntityPlayerMP; 6 | import net.minecraft.tileentity.TileEntity; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.World; 9 | import net.minecraftforge.fml.common.FMLCommonHandler; 10 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 11 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 12 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 13 | 14 | public class PacketTabletButton implements IMessage { 15 | private BlockPos pos; 16 | private boolean rightClick; 17 | 18 | public PacketTabletButton() { 19 | 20 | } 21 | public PacketTabletButton(TileEntityAnimationTablet te, boolean rightClick) { 22 | this(te.getPos(), rightClick); 23 | } 24 | 25 | public PacketTabletButton(BlockPos pos, boolean rightClick) { 26 | this.pos = pos; 27 | this.rightClick = rightClick; 28 | } 29 | 30 | public BlockPos getPos() { 31 | return pos; 32 | } 33 | 34 | public void setPos(BlockPos pos) { 35 | this.pos = pos; 36 | } 37 | 38 | public boolean isRightClick() { 39 | return rightClick; 40 | } 41 | 42 | public void setRightClick(boolean rightClick) { 43 | this.rightClick = rightClick; 44 | } 45 | 46 | @Override 47 | public void fromBytes(ByteBuf byteBuf) { 48 | this.pos = BlockPos.fromLong(byteBuf.readLong()); 49 | this.rightClick = byteBuf.readBoolean(); 50 | } 51 | 52 | @Override 53 | public void toBytes(ByteBuf byteBuf) { 54 | byteBuf.writeLong(this.pos.toLong()); 55 | byteBuf.writeBoolean(this.rightClick); 56 | } 57 | 58 | public static class Handler implements IMessageHandler { 59 | 60 | @Override 61 | public IMessage onMessage(PacketTabletButton packetTabletButton, MessageContext messageContext) { 62 | FMLCommonHandler.instance().getWorldThread(messageContext.netHandler).addScheduledTask(() -> handle(packetTabletButton, messageContext)); 63 | return null; 64 | } 65 | 66 | private void handle(PacketTabletButton packetTabletButton, MessageContext messageContext) { 67 | EntityPlayerMP playerEntity = messageContext.getServerHandler().player; 68 | World world = playerEntity.getEntityWorld(); 69 | if (world.isBlockLoaded(packetTabletButton.getPos())) { 70 | TileEntity te = world.getTileEntity(packetTabletButton.getPos()); 71 | if (te instanceof TileEntityAnimationTablet) { 72 | TileEntityAnimationTablet animationTablet = (TileEntityAnimationTablet) te; 73 | animationTablet.setRightClick(packetTabletButton.isRightClick()); 74 | } 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/tileentity/TileEntityMobMagnet.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.tileentity; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.items.ItemSoulMould; 4 | import net.minecraft.block.state.IBlockState; 5 | import net.minecraft.entity.Entity; 6 | import net.minecraft.entity.EntityAgeable; 7 | import net.minecraft.entity.EntityList; 8 | import net.minecraft.entity.EntityLiving; 9 | import net.minecraft.entity.player.EntityPlayer; 10 | import net.minecraft.item.ItemStack; 11 | import net.minecraft.nbt.NBTTagCompound; 12 | import net.minecraft.util.EnumFacing; 13 | import net.minecraft.util.math.BlockPos; 14 | import net.minecraft.world.World; 15 | import net.minecraftforge.common.capabilities.Capability; 16 | import net.minecraftforge.items.CapabilityItemHandler; 17 | import net.minecraftforge.items.ItemStackHandler; 18 | 19 | import javax.annotation.Nonnull; 20 | import javax.annotation.Nullable; 21 | import java.util.function.Predicate; 22 | 23 | public class TileEntityMobMagnet extends TileEntityMagnet { 24 | 25 | 26 | private boolean pullAdults = true; 27 | 28 | public boolean isPullAdults() { 29 | return pullAdults; 30 | } 31 | 32 | public void setPullAdults(boolean pullAdults) { 33 | this.pullAdults = pullAdults; 34 | sendUpdates(); 35 | } 36 | @Override 37 | protected boolean isItemValidForSlot(int index, ItemStack stack) { 38 | return stack.getItem() instanceof ItemSoulMould; 39 | } 40 | 41 | public ItemStackHandler getInventory() { 42 | return inventory; 43 | } 44 | 45 | @Override 46 | public void writeExtraNBT(NBTTagCompound nbttagcompound) { 47 | super.writeExtraNBT(nbttagcompound); 48 | nbttagcompound.setBoolean("adults", pullAdults); 49 | } 50 | 51 | @Override 52 | public void readExtraNBT(NBTTagCompound nbttagcompound) { 53 | super.readExtraNBT(nbttagcompound); 54 | 55 | pullAdults = nbttagcompound.getBoolean("adults"); 56 | } 57 | 58 | @Override 59 | public boolean respondsToPulses() { 60 | return false; 61 | } 62 | 63 | 64 | 65 | @Override 66 | protected Predicate selectedEntities() { 67 | return o -> o instanceof EntityLiving && filterEntity((Entity) o); 68 | } 69 | 70 | @Override 71 | protected boolean filterEntity(Entity entity) { 72 | EntityLiving entityLiving = (EntityLiving) entity; 73 | boolean agePull = false; 74 | if (entityLiving instanceof EntityAgeable) { 75 | agePull = isPullAdults() != ((EntityAgeable) entity).isChild(); 76 | } else 77 | agePull = true; 78 | boolean typePull = true; 79 | if (this.getInventory().getStackInSlot(0) != ItemStack.EMPTY) { 80 | String selectedEntity = ItemSoulMould.getEntityName(this.getInventory().getStackInSlot(0)); 81 | String targetEntity = EntityList.getEntityString(entity); 82 | if (selectedEntity != null && !(selectedEntity.equalsIgnoreCase(targetEntity))) 83 | typePull = false; 84 | } 85 | return agePull && typePull; 86 | } 87 | 88 | 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/commands/CommandThaumicTinkererClient.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.commands; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.config.TTConfig; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.resources.IResource; 6 | import net.minecraft.command.CommandBase; 7 | import net.minecraft.command.CommandException; 8 | import net.minecraft.command.ICommandSender; 9 | import net.minecraft.enchantment.Enchantment; 10 | import net.minecraft.server.MinecraftServer; 11 | import net.minecraft.util.ResourceLocation; 12 | import net.minecraft.util.text.TextComponentString; 13 | import org.apache.commons.lang3.ArrayUtils; 14 | 15 | import java.io.IOException; 16 | import java.util.ArrayList; 17 | import java.util.List; 18 | 19 | public class CommandThaumicTinkererClient extends CommandBase { 20 | private List aliases = new ArrayList(); 21 | 22 | public CommandThaumicTinkererClient() { 23 | this.aliases.add("thaumictinkererc"); 24 | this.aliases.add("ttc"); 25 | } 26 | 27 | @Override 28 | public String getName() { 29 | return "thaumictinkererc"; 30 | } 31 | 32 | public List getAliases() { 33 | return this.aliases; 34 | } 35 | 36 | public String getUsage(ICommandSender icommandsender) { 37 | return "/thaumictinkerer [ []]"; 38 | } 39 | 40 | public int getRequiredPermissionLevel() { 41 | return 2; 42 | } 43 | 44 | public boolean isUsernameIndex(String[] astring, int i) { 45 | return i == 1; 46 | } 47 | 48 | @Override 49 | public void execute(MinecraftServer minecraftServer, ICommandSender sender, String[] args) throws CommandException { 50 | if (args.length == 0) { 51 | sender.sendMessage(new TextComponentString("§cInvalid arguments")); 52 | sender.sendMessage(new TextComponentString("§cUse /tt help to get help")); 53 | } else { 54 | if (args[0].equalsIgnoreCase("listunknownenchants")) { 55 | for (Enchantment enchantment : Enchantment.REGISTRY) { 56 | if (ArrayUtils.contains(TTConfig.blacklistedEnchants, Enchantment.REGISTRY.getIDForObject(enchantment))) 57 | continue; 58 | ResourceLocation object = Enchantment.REGISTRY.getNameForObject(enchantment); 59 | ResourceLocation iconLoc = new ResourceLocation(object.getNamespace(), "textures/enchant_icons/" + object.getPath() + ".png"); 60 | 61 | try { 62 | IResource res = Minecraft.getMinecraft().getResourceManager().getResource(iconLoc); 63 | if (res == null) 64 | sender.sendMessage(new TextComponentString("Enchantment name: " + iconLoc + " has no icon")); 65 | } catch (IOException e) { 66 | sender.sendMessage(new TextComponentString("Enchantment name: " + iconLoc + " has no icon")); 67 | } 68 | } 69 | 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/com/nekokittygames/thaumictinkerer/common/tileentity/transvector/TileEntityTransvector.java: -------------------------------------------------------------------------------- 1 | package com.nekokittygames.thaumictinkerer.common.tileentity.transvector; 2 | 3 | import com.nekokittygames.thaumictinkerer.common.tileentity.TileEntityCamoflage; 4 | import net.minecraft.nbt.NBTTagCompound; 5 | import net.minecraft.tileentity.TileEntity; 6 | import net.minecraft.util.ITickable; 7 | import net.minecraft.util.math.BlockPos; 8 | 9 | public abstract class TileEntityTransvector extends TileEntityCamoflage implements ITickable { 10 | private static final String TAG_X_TARGET = "xt"; 11 | private static final String TAG_Y_TARGET = "yt"; 12 | private static final String TAG_Z_TARGET = "zt"; 13 | private static final String TAG_CHEATY_MODE = "cheatyMode"; 14 | private BlockPos tilePos; 15 | 16 | private boolean cheaty; 17 | 18 | @Override 19 | public void readExtraNBT(NBTTagCompound compound) { 20 | super.readExtraNBT(compound); 21 | int x; 22 | int y; 23 | int z; 24 | if (compound.hasKey(TAG_X_TARGET)) { 25 | x = compound.getInteger(TAG_X_TARGET); 26 | y = compound.getInteger(TAG_Y_TARGET); 27 | z = compound.getInteger(TAG_Z_TARGET); 28 | tilePos = new BlockPos(x, y, z); 29 | cheaty = compound.getBoolean(TAG_CHEATY_MODE); 30 | } 31 | } 32 | 33 | @Override 34 | public void writeExtraNBT(NBTTagCompound compound) { 35 | super.writeExtraNBT(compound); 36 | if (tilePos != null) { 37 | compound.setInteger(TAG_X_TARGET, tilePos.getX()); 38 | compound.setInteger(TAG_Y_TARGET, tilePos.getY()); 39 | compound.setInteger(TAG_Z_TARGET, tilePos.getZ()); 40 | compound.setBoolean(TAG_CHEATY_MODE, cheaty); 41 | } 42 | } 43 | 44 | public BlockPos getTilePos() { 45 | return tilePos; 46 | } 47 | 48 | public boolean setTilePos(BlockPos tilePos) { 49 | TileEntity tile = world.getTileEntity(tilePos); 50 | if (checkTile(tilePos, tile)) return false; 51 | this.tilePos = tilePos; 52 | return true; 53 | } 54 | 55 | public boolean checkTile(BlockPos tilePos, TileEntity tile) { 56 | return tile == null && tileRequiredAtLink() || (tilePos.distanceSq(getPos()) > getMaxDistance()); 57 | } 58 | 59 | public boolean isCheaty() { 60 | return cheaty; 61 | } 62 | 63 | public void setCheaty(boolean cheaty) { 64 | this.cheaty = cheaty; 65 | } 66 | 67 | public final TileEntity getTile() { 68 | if (tilePos == null) 69 | return null; 70 | if (world.isAirBlock(tilePos)) 71 | return null; 72 | TileEntity tile = world.getTileEntity(tilePos); 73 | if (checkTile(tilePos, tile)) { 74 | tilePos = null; 75 | return null; 76 | } 77 | return tile; 78 | } 79 | 80 | 81 | @Override 82 | public void update() { 83 | // Empty 84 | } 85 | 86 | public abstract int getMaxDistance(); 87 | 88 | private boolean tileRequiredAtLink() { 89 | return !cheaty; 90 | } 91 | } 92 | --------------------------------------------------------------------------------