shedaniel 4 éve
szülő
commit
0e8754d7a6

+ 43 - 0
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);
+    }
+}

+ 16 - 0
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;

+ 16 - 0
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 {

+ 16 - 0
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;

+ 27 - 0
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();
+    }
+}

+ 16 - 0
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;

+ 16 - 0
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;

+ 16 - 0
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;

+ 16 - 0
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;

+ 16 - 0
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;

+ 16 - 0
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;

+ 2 - 1
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
+mutable field net/minecraft/world/level/block/state/BlockBehaviour$Properties dynamicShape Z
+accessible method net/minecraft/world/entity/Entity getEncodeId ()Ljava/lang/String;

+ 16 - 0
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;

+ 27 - 0
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();
+    }
+}

+ 16 - 0
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;

+ 16 - 0
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;