diff --git a/common/src/main/java/me/shedaniel/architectury/hooks/EntityHooks.java b/common/src/main/java/me/shedaniel/architectury/hooks/EntityHooks.java new file mode 100644 index 00000000..9360d96b --- /dev/null +++ b/common/src/main/java/me/shedaniel/architectury/hooks/EntityHooks.java @@ -0,0 +1,43 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package me.shedaniel.architectury.hooks; + +import me.shedaniel.architectury.ArchitecturyPopulator; +import me.shedaniel.architectury.Populatable; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.world.entity.Entity; + +@Environment(EnvType.CLIENT) +public final class EntityHooks { + private EntityHooks() {} + + @Populatable + private static final Impl IMPL = null; + + public static String getEncodeId(Entity entity) { + return IMPL.getEncodeId(entity); + } + + public interface Impl { + String getEncodeId(Entity entity); + } + + static { + ArchitecturyPopulator.populate(ItemEntityHooks.class); + } +} diff --git a/common/src/main/java/me/shedaniel/architectury/registry/BlockProperties.java b/common/src/main/java/me/shedaniel/architectury/registry/BlockProperties.java index 55403c80..39ee0ed9 100644 --- a/common/src/main/java/me/shedaniel/architectury/registry/BlockProperties.java +++ b/common/src/main/java/me/shedaniel/architectury/registry/BlockProperties.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.registry; import me.shedaniel.architectury.ArchitecturyPopulator; diff --git a/common/src/main/java/me/shedaniel/architectury/registry/BlockPropertiesExtension.java b/common/src/main/java/me/shedaniel/architectury/registry/BlockPropertiesExtension.java index f2a49f0e..11e55977 100644 --- a/common/src/main/java/me/shedaniel/architectury/registry/BlockPropertiesExtension.java +++ b/common/src/main/java/me/shedaniel/architectury/registry/BlockPropertiesExtension.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.registry; public interface BlockPropertiesExtension { diff --git a/common/src/main/java/me/shedaniel/architectury/registry/ToolType.java b/common/src/main/java/me/shedaniel/architectury/registry/ToolType.java index 28c3f585..f2407c55 100644 --- a/common/src/main/java/me/shedaniel/architectury/registry/ToolType.java +++ b/common/src/main/java/me/shedaniel/architectury/registry/ToolType.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.registry; import me.shedaniel.architectury.Populatable; diff --git a/fabric/src/main/java/me/shedaniel/architectury/hooks/fabric/EntityHooksImpl.java b/fabric/src/main/java/me/shedaniel/architectury/hooks/fabric/EntityHooksImpl.java new file mode 100644 index 00000000..9645bb70 --- /dev/null +++ b/fabric/src/main/java/me/shedaniel/architectury/hooks/fabric/EntityHooksImpl.java @@ -0,0 +1,27 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package me.shedaniel.architectury.hooks.fabric; + +import me.shedaniel.architectury.hooks.EntityHooks; +import net.minecraft.world.entity.Entity; + +public class EntityHooksImpl implements EntityHooks.Impl { + @Override + public String getEncodeId(Entity entity) { + return entity.getEncodeId(); + } +} diff --git a/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinFurnaceResultSlot.java b/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinFurnaceResultSlot.java index 50c6cc6d..2ee0c723 100644 --- a/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinFurnaceResultSlot.java +++ b/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinFurnaceResultSlot.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.mixin.fabric; import me.shedaniel.architectury.event.events.PlayerEvent; diff --git a/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinItemEntity.java b/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinItemEntity.java index 7464cab7..3933c326 100644 --- a/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinItemEntity.java +++ b/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinItemEntity.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.mixin.fabric; import me.shedaniel.architectury.event.events.PlayerEvent; diff --git a/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinLivingEntity.java b/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinLivingEntity.java index 88fff6f4..0b59a36a 100644 --- a/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinLivingEntity.java +++ b/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/MixinLivingEntity.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.mixin.fabric; import me.shedaniel.architectury.event.events.EntityEvent; diff --git a/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/PlayerAttackInvoker.java b/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/PlayerAttackInvoker.java index b7257d52..fab24074 100644 --- a/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/PlayerAttackInvoker.java +++ b/fabric/src/main/java/me/shedaniel/architectury/mixin/fabric/PlayerAttackInvoker.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.mixin.fabric; import me.shedaniel.architectury.event.events.EntityEvent; diff --git a/fabric/src/main/java/me/shedaniel/architectury/registry/fabric/BlockPropertiesImpl.java b/fabric/src/main/java/me/shedaniel/architectury/registry/fabric/BlockPropertiesImpl.java index 55e74a6d..821b42a1 100644 --- a/fabric/src/main/java/me/shedaniel/architectury/registry/fabric/BlockPropertiesImpl.java +++ b/fabric/src/main/java/me/shedaniel/architectury/registry/fabric/BlockPropertiesImpl.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.registry.fabric; import me.shedaniel.architectury.registry.BlockProperties; diff --git a/fabric/src/main/java/me/shedaniel/architectury/registry/fabric/ToolTypeImpl.java b/fabric/src/main/java/me/shedaniel/architectury/registry/fabric/ToolTypeImpl.java index 147c9bec..7f38d115 100644 --- a/fabric/src/main/java/me/shedaniel/architectury/registry/fabric/ToolTypeImpl.java +++ b/fabric/src/main/java/me/shedaniel/architectury/registry/fabric/ToolTypeImpl.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.registry.fabric; import me.shedaniel.architectury.registry.ToolType; diff --git a/fabric/src/main/resources/architectury.accessWidener b/fabric/src/main/resources/architectury.accessWidener index c8ea1d44..15112cba 100644 --- a/fabric/src/main/resources/architectury.accessWidener +++ b/fabric/src/main/resources/architectury.accessWidener @@ -46,4 +46,5 @@ mutable field net/minecraft/world/level/block/state/BlockBehaviour$Properties ha accessible field net/minecraft/world/level/block/state/BlockBehaviour$Properties emissiveRendering Lnet/minecraft/world/level/block/state/BlockBehaviour$StatePredicate; mutable field net/minecraft/world/level/block/state/BlockBehaviour$Properties emissiveRendering Lnet/minecraft/world/level/block/state/BlockBehaviour$StatePredicate; accessible field net/minecraft/world/level/block/state/BlockBehaviour$Properties dynamicShape Z -mutable field net/minecraft/world/level/block/state/BlockBehaviour$Properties dynamicShape Z \ No newline at end of file +mutable field net/minecraft/world/level/block/state/BlockBehaviour$Properties dynamicShape Z +accessible method net/minecraft/world/entity/Entity getEncodeId ()Ljava/lang/String; \ No newline at end of file diff --git a/forge/src/main/java/me/shedaniel/architectury/forge/ArchitecturyForge.java b/forge/src/main/java/me/shedaniel/architectury/forge/ArchitecturyForge.java index a59013dd..5d149e91 100644 --- a/forge/src/main/java/me/shedaniel/architectury/forge/ArchitecturyForge.java +++ b/forge/src/main/java/me/shedaniel/architectury/forge/ArchitecturyForge.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.forge; import net.minecraftforge.fml.common.Mod; diff --git a/forge/src/main/java/me/shedaniel/architectury/hooks/forge/EntityHooksImpl.java b/forge/src/main/java/me/shedaniel/architectury/hooks/forge/EntityHooksImpl.java new file mode 100644 index 00000000..e4167764 --- /dev/null +++ b/forge/src/main/java/me/shedaniel/architectury/hooks/forge/EntityHooksImpl.java @@ -0,0 +1,27 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package me.shedaniel.architectury.hooks.forge; + +import me.shedaniel.architectury.hooks.EntityHooks; +import net.minecraft.entity.Entity; + +public class EntityHooksImpl implements EntityHooks.Impl { + @Override + public String getEncodeId(Entity entity) { + return entity.getEncodeId(); + } +} diff --git a/forge/src/main/java/me/shedaniel/architectury/registry/forge/BlockPropertiesImpl.java b/forge/src/main/java/me/shedaniel/architectury/registry/forge/BlockPropertiesImpl.java index 342354c1..12ebdca7 100644 --- a/forge/src/main/java/me/shedaniel/architectury/registry/forge/BlockPropertiesImpl.java +++ b/forge/src/main/java/me/shedaniel/architectury/registry/forge/BlockPropertiesImpl.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.registry.forge; import me.shedaniel.architectury.registry.BlockProperties; diff --git a/forge/src/main/java/me/shedaniel/architectury/registry/forge/ToolTypeImpl.java b/forge/src/main/java/me/shedaniel/architectury/registry/forge/ToolTypeImpl.java index 7f6f29ea..74a462af 100644 --- a/forge/src/main/java/me/shedaniel/architectury/registry/forge/ToolTypeImpl.java +++ b/forge/src/main/java/me/shedaniel/architectury/registry/forge/ToolTypeImpl.java @@ -1,3 +1,19 @@ +/* + * Copyright 2020 shedaniel + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package me.shedaniel.architectury.registry.forge;