Timeless and Classics Guns Zero is a gun mod for Minecraft Forge 1.20.1.
- This is a mirror project of TACZ use neoforge mod loader and mc 1.21.1
- Try same as original project, just code difference about different mod loader, 1.20.1 and 1.21.1
- If you want jar, build it by your self
- State: Playable May has some issue
- Mod
controllable
not available because it's not support mc 1.21.1- In class
com.tacz.guns.compat.controllable.ControllableInner
- In class
- NBT tag not same as 1.20.1, because in 1.20.5/.6/1.21, forge/neoforge is rework capability system, not item has this nbt tags:
{components:{"tacz:data":{GunCurrentAmmoCount:7,GunFireMode:"SEMI",GunId:"tacz:deagle",HasBulletInBarrel:1b}},count:1,id:"tacz:modern_kinetic_gun"}
- before:
{Count:1b,id:"tacz:modern_kinetic_gun",tag:{GunCurrentAmmoCount:17,GunFireMode:"SEMI",GunId:"tacz:glock_17",HasBulletInBarrel:1b}}
- and saves will be not compilable with official mod when it becomes 1.21, because official may not use same components resource location id or same structural.
- Config
tacz-pre.toml
is not working - Missing lag compensation, because
ServerPlayer
is no longer has latency counter cache.- In class
com.tacz.guns.util.HitboxHelper.getFixedBoundingBox
- In class
- Craft recipe in smith table will not accept part of nbt tags and must be equals, because in lib code is use equals between tags, may caused by Unit tag?
net.neoforged.neoforge.common.crafting.DataComponentIngredient.test
net.minecraft.core.component.DataComponentPredicate.test(net.minecraft.core.component.DataComponentMap)
net.minecraft.world.item.component.CustomData.equals
- Scope render works in wrong way, so remove mask and UI to prevent black screen in normal render or iris shader.
com.tacz.guns.client.model.BedrockAttachmentModel.renderScope
- Don't use JEI bookmark or creative mode cheat item (TA31 Scope) to main-hand, seems will crash client or cause GUI render error.
- May has another items can cause issue same as this scope.
- May this issue is caused by bypass scope render fix.
- Test ItemStack.set(DataComponents.CUSTOM_DATA, CustomData.of(CompoundTag)); correctly merge not replac
9159
ed.
com.tacz.guns.crafting.result.RawGunTableResult
com.tacz.guns.resource.serialize.GunSmithTableResultSerializer
com.tacz.guns.api.item.nbt.AmmoBoxItemDataAccessor
com.tacz.guns.api.item.nbt.AmmoItemDataAccessor
com.tacz.guns.api.item.nbt.AttachmentItemDataAccessor
com.tacz.guns.api.item.nbt.BlockItemDataAccessor
com.tacz.guns.api.item.nbt.GunItemDataAccessor
com.tacz.guns.item.GunTooltipPart
- Two of others can try https://docs.neoforged.net/docs/items/datacomponents :
ItemStack.applyComponents(DataComponentPatch.builder().set(DataComponents.CUSTOM_DATA, CustomData.of(CompoundTag)).build());
ItemStack.applyComponents(DataComponentMap.builder().set(DataComponents.CUSTOM_DATA, CustomData.of(CompoundTag)).build());
- Can test when open creative tab at first time, break point in ``, manually add tags and test manually call
- Need debug to check how to correctly get nbt tag
com.tacz.guns.api.item.nbt.AmmoBoxItemDataAccessor.getAmmoId
- Now my function is an inefficient method to direct modify custom tags about item, not suggest but just can do.
- Getter is readonly because it use
copyTag()
. If need writeable, modify tag and write it back to ItemStack.
- Need debug to check how to use CustomData type and migrate from old forge, This method used by another one to doing set with readonly tags
com.tacz.guns.api.item.nbt.GunItemDataAccessor.getAttachmentTag
com.tacz.guns.entity.shooter.LivingEntityAim.zoom
com.tacz.guns.entity.sync.core.bak.IDataSerializer#write
- Need test destory gun smith table in creative if it correctly canceled
com.tacz.guns.block.GunSmithTableBlockB.playerWillDestroy
- There is no method return AABB and produce something about rendering bounding box for block entity, why?
com.tacz.guns.block.entity.GunSmithTableBlockEntity
com.tacz.guns.block.entity.TargetBlockEntity
com.tacz.guns.block.entity.StatueBlockEntity
- Turn it into
net.neoforged.neoforge.client.extensions.IBlockEntityRendererExtension
interface and implements it in Render class, client only.
- Use try-with-resource with resource pack?
com.tacz.guns.resource.GunPackLoader.discoverExtensions
- looks it normally
- How to migrate config system?
com.tacz.guns.config.PreLoadConfig.load
com.tacz.guns.config.PreLoadModConfig
- Check config screen is working
com.tacz.guns.compat.cloth.MenuIntegration.registerModsPage
com.tacz.guns.client.gui.compat.ClothConfigScreen.registerNoClothConfigPage
- Check player animation is can use this deprecated method
com.tacz.guns.compat.playeranimator.animation.PlayerAnimatorAssetManager
- Can't known how to replace AttachCapabilitiesEvent
com.tacz.guns.event.SyncedEntityDataEvent.attachCapabilities
com.tacz.guns.entity.sync.core.DataHolderCapabilityProvider
- May be
IAttachmentSerializer
? replaced bycom.tacz.guns.entity.sync.core.DataHolderSerializer
- May be
com.tacz.guns.init.CapabilityRegistry
- And Capability System reworked, can't known how to do this
com.tacz.guns.event.SyncedEntityDataEvent.onPlayerClone
- Just try ignore this and upgrade lib code
- Can't find spawner data interface replaced by, but it thinks are serialize/deserialize method.
com.tacz.guns.entity.EntityKineticBullet.writeSpawnData
com.tacz.guns.entity.EntityKineticBullet.readSpawnData
- Implements
IEntityWithComplexSpawn
- Each server tick produce twice????
com.tacz.guns.event.ServerTickEvent.onServerTick
com.tacz.guns.client.event.TickAnimationEvent.tickAnimation
com.tacz.guns.client.animation.screen.RefitTransform.tickInterpolation
com.tacz.guns.client.event.InventoryEvent.onPlayerChangeSelect
- Seems no problem
- Check DYED_COLOR is same as "color" tag
com.tacz.guns.item.AmmoBoxItem.getTagColor
- Fake migrate ItemStack's Attachment to CUSTOM_DATA
com.tacz.guns.api.item.nbt.AttachmentItemDataAccessor.isAttachmentLike(net.minecraft.world.item.ItemStack)
- May changed mixin and confused how to modify it
com.tacz.guns.mixin.client.MouseHandlerMixin.reduceSensitivity
com.tacz.guns.mixin.client.StairBlockAccessor.invokeGetModelBlock
- hack provider
com.tacz.guns.client.resource.index.ClientAmmoIndex.checkParticle
com.tacz.guns.client.resource.GunDisplayInstance.checkGunAmmo
- Hide debug
com.tacz.guns.network.message.ServerMessageSyncBaseTimestamp.updateBaseTimestamp
com.tacz.guns.network.message.ClientMessageSyncBaseTimestamp
- Its a bug I missing replay correctly packet to server, fixed. And not be hide this debug message.
- Can I use as Unit DataComponents?
com.tacz.guns.init.ModComponents.CUSTOM_DATA
now without.networkSynchronized(CustomData.STREAM_CODEC)
as Unit DataComponents.
- Twice check nbt tag direct write, rework as get readonly tag and write back when source is ItemStack and no provider.
com.tacz.guns.api.util.LuaNbtAccessor
any put method likeputCompound
com.tacz.guns.block.entity.StatueBlockEntity.loadAdditional
now statue is not working, may its problemcom.tacz.guns.block.entity.TargetBlockEntity.saveAdditional
is used for target block render as player?com.tacz.guns.block.TargetBlock.onProjectileHit
not working
- These classes are not modify correctly
com.tacz.guns.init.CapabilityRegistry
- Fix rpg crash when explode with entity
com.tacz.guns.util.block.ProjectileExplosion.explode
with null entity calledBlockRayTrace.rayTraceBlocks
- GunSmithTable not work
- Statue not work
- But seems work probably at render item, when take gun left from statue, it still show ItemStack model. BlockEntity in memory from Render and actual Holder is two difference object, why?
- 3rd gun pack not loading
- Maybe same problem with GunSmithTable recipe problem
com.tacz.guns.resource.CommonAssetsManager.onReload(net.neoforged.neoforge.event.TagsUpdatedEvent)
- Find unzip folder can loading, why
- Sometimes just /tacz reload then texture can load, why???
- Maybe same problem with GunSmithTable recipe problem
- Test recipe with type
forge:partial_nbt
in gun pack, may need convert to neoforge accepted formatnet.neoforged.neoforge.common.crafting.DataComponentIngredient
- type
forge:partial_nbt
->neoforge:components
nbt: {}
->components: {}
- but still can't render texture directory
- Ingredient tooltip can't show - add resource id?
com.tacz.guns.client.gui.GunSmithTableScreen.renderIngredient
- Or just fix ingredient loading
com.tacz.guns.util.helper.IngredientHelper.fromJson(com.google.gson.JsonElement, boolean)
- Or just fix ingredient loading
- Scope attachment is not working
- Seems some angle can see though scope, wtf, need check render method
- Temp remove code
com.tacz.guns.client.model.BedrockAttachmentModel.renderScope
- Internal (and gun pack ? or just recipes json) need be upgrade
- pack.mcmeta must be upgrade to version 48
https://minecraft.wiki/w/Tutorial:Creating_a_data_pack
- folder structure need modify
https://minecraft.wiki/w/Data_pack#Folder_structure
- make gun pack updater util
- May only need change folder name, gun pack recipes folder name, and try to fix
com.tacz.guns.crafting.GunSmithTableSerializer.codec
fromfromJson
- How to get resource location of recipes? what about keys method..
- Fine, json format is changed, see
https://minecraft.wiki/w/Recipe#crafting_shaped
andsrc\main\resources\data\tacz\recipe\iron_ammo_box.json
- pack.mcmeta must be upgrade to version 48
- full runtime test
- Registries
- net.minecraft.core.registries.BuiltInRegistries
- net.neoforged.neoforge.registries.NeoForgeRegistries
- DataComponents
- net.minecraft.core.component.DataComponents
- ItemTags
- net.minecraft.tags.ItemTags
- SoundEvents Holder
- net.minecraft.sounds.SoundEvents
- MobEffects Holder
- net.minecraft.world.effect.MobEffects
- Potions Holder
- net.minecraft.world.item.alchemy.Potions
- ParticleTypes
- net.minecraft.core.particles.ParticleTypes
- BlockEntityTypes
- net.minecraft.world.level.block.entity.BlockEntityType
- Stats & StatTypes
- net.minecraft.stats.Stats
- MenuTypes
- net.minecraft.world.inventory.MenuType
- RecipeTypes
- net.minecraft.world.item.crafting.RecipeType
- RecipeSerializer
- net.minecraft.world.item.crafting.RecipeSerializer
- Attributes Holder
- net.minecraft.world.entity.ai.attributes.Attributes
- PotionSourceTypes
- net.minecraft.world.level.gameevent.PositionSourceType
- Capability register tutorial
- net.neoforged.neoforge.capabilities.CapabilityHooks.registerVanillaProviders
- Gui Layers
- net.neoforged.neoforge.client.gui.VanillaGuiLayers
- Networks
- net.minecraft.network.protocol.game.GameProtocols
- net.minecraft.network.protocol.game.GamePacketTypes
- Tags (used for data pack)
- net.neoforged.neoforge.common.Tags
- IngredientTypes
- net.neoforged.neoforge.common.NeoForgeMod.INGREDIENT_TYPES
- net.neoforged.neoforge.common.NeoForgeMod.DATA_COMPONENT_INGREDIENT_TYPE
- Color Util
- net.minecraft.util.FastColor.ARGB32.colorFromFloat
- Mappings tool
https://linkie.shedaniel.dev/mappings